diff --git a/200.html b/200.html
index d20c69a..e311431 100644
--- a/200.html
+++ b/200.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html >
-<head><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="prefetch" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="prefetch" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body ><div id="__nuxt"></div><script>window.__NUXT__=(function(a,b,c,d){return {serverRendered:a,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[b,"c","go","graphql","scss",b,c,"docker","typescript","javascript","nginx","bash","yaml",c],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:d,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:d}},data:{},state:{}}}(false,"shell","sh",""))</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script></body>
+<body ><div id="__nuxt"></div><script>window.__NUXT__=(function(a,b,c,d){return {serverRendered:a,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[b,"c","go","graphql","scss",b,c,"docker","typescript","javascript","nginx","bash","yaml",c],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:d,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:d}},data:{},state:{}}}(false,"shell","sh",""))</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/404.html b/404.html
index d20c69a..e311431 100644
--- a/404.html
+++ b/404.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html >
-<head><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="prefetch" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="prefetch" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body ><div id="__nuxt"></div><script>window.__NUXT__=(function(a,b,c,d){return {serverRendered:a,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[b,"c","go","graphql","scss",b,c,"docker","typescript","javascript","nginx","bash","yaml",c],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:d,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:d}},data:{},state:{}}}(false,"shell","sh",""))</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script></body>
+<body ><div id="__nuxt"></div><script>window.__NUXT__=(function(a,b,c,d){return {serverRendered:a,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[b,"c","go","graphql","scss",b,c,"docker","typescript","javascript","nginx","bash","yaml",c],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:d,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:d}},data:{},state:{}}}(false,"shell","sh",""))</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/_payload.js b/_payload.js
index 71678dd..b691e1c 100644
--- a/_payload.js
+++ b/_payload.js
@@ -1 +1 @@
-export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}]},prerenderedAt:1667812490900}
\ No newline at end of file
+export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}]},prerenderedAt:1667813353301}
\ No newline at end of file
diff --git a/api/_content/cache.json b/api/_content/cache.json
index a52c491..84b8c99 100644
--- a/api/_content/cache.json
+++ b/api/_content/cache.json
@@ -1 +1 @@
-{"generatedAt":1667812496547,"generateTime":69,"contents":[{"_path":"/blockchain/common-typescript-examples","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Common Typescript Examples","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// URL of your node"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://...'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-832f93"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-930ba7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-0c3276"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-930ba7"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4196a1"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// first we need to authorize"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// then we can get wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getCurrentAddressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getTransactionCount"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      gasLimit: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      nonce: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"EthUtil"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"Transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"sign"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"serialize"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"this"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"`0x${"}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-ac6681"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-ac6681"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'hex'"}]},{"type":"element","tag":"span","props":{"class":"ct-ac6681"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"estimateFee"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"asciiToHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    })."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"fromWei"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-99e7a2"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"())"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"multiply"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-99e7a2"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"()))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'accountsChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'chainChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"handler"}]},{"type":"element","tag":"span","props":{"class":"ct-34f27a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'wallet_watchAsset'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    params: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      type: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ERC20'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      options: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        address: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'FOO'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-58cded"},"children":[{"type":"text","value":"18"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        image: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://foo.io/token-image.svg'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-832f93"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-0c3276"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'FOO successfully added to wallet!'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99e7a2"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'Something went wrong.'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getChainID"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'eth_chainId'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'wallet_switchEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    params: [{ chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" }], "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"switchError"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// This error code indicates that the chain has not been added to MetaMask."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cded"},"children":[{"type":"text","value":"4902"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'wallet_addEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        params: [{ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          chainName: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'Ropsten Test Network'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          nativeCurrency: { "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"              name: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"              symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"              decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-58cded"},"children":[{"type":"text","value":"18"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          }, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          rpcUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"], "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          blockExplorerUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://ropsten.etherscan.io'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        }] ,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"addError"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// handle \"add\" error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// handle other \"switch\" errors"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-58cded{color:#79C0FF}.ct-34f27a{color:#C9D1D9}.ct-99e7a2{color:#79C0FF}.ct-ac6681{color:#A5D6FF}.ct-4196a1{color:#79C0FF}.ct-0c3276{color:#FFA657}.ct-930ba7{color:#FF7B72}.ct-832f93{color:#D2A8FF}.ct-dcdfaf{color:#C9D1D9}.ct-e18cdc{color:#FF7B72}.ct-b7644c{color:#D2A8FF}.ct-4f105d{color:#79C0FF}.ct-86f4ab{color:#FF7B72}.ct-5e418d{color:#8B949E}.ct-6bd6d4{color:#A5D6FF}.ct-862b9b{color:#C9D1D9}.ct-d1af39{color:#C9D1D9}.ct-b084f5{color:#FF7B72}.light .ct-b084f5{color:#859900}.light .ct-d1af39{color:#657B83}.light .ct-862b9b{color:#268BD2}.light .ct-6bd6d4{color:#2AA198}.light .ct-5e418d{color:#93A1A1}.light .ct-86f4ab{color:#073642}.light .ct-4f105d{color:#268BD2}.light .ct-b7644c{color:#268BD2}.light .ct-e18cdc{color:#073642}.light .ct-dcdfaf{color:#657B83}.light .ct-832f93{color:#268BD2}.light .ct-930ba7{color:#859900}.light .ct-0c3276{color:#657B83}.light .ct-4196a1{color:#859900}.light .ct-ac6681{color:#657B83}.light .ct-99e7a2{color:#859900}.light .ct-34f27a{color:#859900}.light .ct-58cded{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"connecting-to-node","depth":2,"text":"Connecting to node"},{"id":"getting-wallet-balance","depth":2,"text":"Getting wallet balance"},{"id":"getting-wallet-address","depth":2,"text":"Getting wallet address"},{"id":"sending-transaction","depth":2,"text":"Sending transaction"},{"id":"estimating-transaction-fee","depth":2,"text":"Estimating transaction FEE"},{"id":"subscribing-to-wallet-address-change","depth":2,"text":"Subscribing to wallet address change"},{"id":"watching-network-change","depth":2,"text":"Watching network change"},{"id":"adding-custom-token-to-wallet","depth":2,"text":"Adding custom token to wallet"},{"id":"changing-network-to-custom","depth":2,"text":"Changing network to custom"}]}},"_type":"markdown","_id":"content:Blockchain:Common typescript examples.md","_source":"content","_file":"Blockchain/Common typescript examples.md","_extension":"md"},{"_path":"/blockchain/smart-contracts","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Smart Contracts","description":"For common functions see Common typescript examples.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'web3-eth-contract'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"abi"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6a4bf1"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b92caf"},"children":[{"type":"text","value":"JSON"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6a4bf1"},"children":[{"type":"text","value":"parse"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// ABI of contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// address for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ({}) "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// Calling write method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// authorizing with Metamask"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// getting wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// calling \"store\" store method for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// payload should include `from` address, that matches"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// current user's wallet"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'Parameter'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"send"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      from: "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c97e13"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// calling read method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// this method can return data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"retrieve"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c97e13"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// ABI контракта"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// contract address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// account's private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// write-methods requires private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"privateKeyToAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      to: "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"encodeABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      gas: "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"({ from: "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"signTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"rawTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"requests"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"balanceOf"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getStaked"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"call"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  ]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"any"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"[]) "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getWeb3NoAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"BatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"map"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"add"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"            } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"execute"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c97e13"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"all"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-379fe1"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'YOUR_RPC_ENDPOINT_HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'YOUR ABI HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'YOUR CONTRACT ADDRESS HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"referralProgramContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"events"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"RegisterUser"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-52b2ad"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"`| UserRegistered | events | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"boolean"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f9ea63"},"children":[{"type":"text","value":"RegisterUserResponseInterface"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    }) "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"`| ONCE | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-52b2ad"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f9ea63"},"children":[{"type":"text","value":"ErrnoException"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        value: [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"events"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    address: ["}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'address-1'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'address-2'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"],    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"//Only get events from specific addresses"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    topics: []                              "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"//What topics to subscribe to"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'logs'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"nr"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"//example options(optional)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// only get events where transfer value was 1000 or 1337"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        value: ["}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'1000'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'1337'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"]    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// number | \"earliest\" | \"pending\" | \"latest\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":",                  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    toBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'latest'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getPastEvents"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'Transfer'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"results"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-f9ea63{color:#FFA657}.ct-52b2ad{color:#A5D6FF}.ct-379fe1{color:#79C0FF}.ct-c97e13{color:#79C0FF}.ct-5e5af7{color:#79C0FF}.ct-56c89d{color:#79C0FF}.ct-cd60fa{color:#FF7B72}.ct-4323f8{color:#8B949E}.ct-854fa3{color:#FFA657}.ct-afd0a6{color:#D2A8FF}.ct-b92caf{color:#79C0FF}.ct-6a4bf1{color:#79C0FF}.ct-11520d{color:#79C0FF}.ct-9561a5{color:#FFA657}.ct-0b1079{color:#FF7B72}.ct-56bd12{color:#D2A8FF}.ct-defe47{color:#C9D1D9}.ct-dade4d{color:#FF7B72}.ct-fa7691{color:#A5D6FF}.ct-b6261e{color:#C9D1D9}.ct-95ba07{color:#C9D1D9}.ct-70f244{color:#FF7B72}.light .ct-70f244{color:#859900}.light .ct-95ba07{color:#657B83}.light .ct-b6261e{color:#268BD2}.light .ct-fa7691{color:#2AA198}.light .ct-dade4d{color:#073642}.light .ct-defe47{color:#657B83}.light .ct-56bd12{color:#268BD2}.light .ct-0b1079{color:#859900}.light .ct-9561a5{color:#657B83}.light .ct-11520d{color:#859900}.light .ct-6a4bf1{color:#268BD2}.light .ct-b92caf{color:#657B83}.light .ct-afd0a6{color:#268BD2}.light .ct-854fa3{color:#657B83}.light .ct-4323f8{color:#93A1A1}.light .ct-cd60fa{color:#073642}.light .ct-56c89d{color:#268BD2}.light .ct-5e5af7{color:#D33682}.light .ct-c97e13{color:#859900}.light .ct-379fe1{color:#B58900}.light .ct-52b2ad{color:#2AA198}.light .ct-f9ea63{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"getting-smart-contract-instance","depth":2,"text":"Getting smart contract instance"},{"id":"executing-contract-method","depth":2,"text":"Executing contract method","children":[{"id":"example-for-metamask-without-private-key","depth":3,"text":"Example for #Metamask without private key"},{"id":"nodejs-and-react-native-example","depth":3,"text":"Node.js and React Native example"},{"id":"calling-a-batch-of-contracts-methods","depth":3,"text":"Calling a batch of contract's methods"}]},{"id":"subscribing-to-smart-contract-events","depth":2,"text":"Subscribing to smart contract events","children":[{"id":"by-accessing-contractevents","depth":3,"text":"By accessing contract.events"},{"id":"with-filtering","depth":3,"text":"With filtering"},{"id":"common-subscribe-method","depth":3,"text":"Common Subscribe method"},{"id":"getting-event-history","depth":3,"text":"Getting event history"}]}]}},"_type":"markdown","_id":"content:Blockchain:Smart contracts.md","_source":"content","_file":"Blockchain/Smart contracts.md","_extension":"md"},{"_path":"/css/automatic-grid-like-masonry-with-pure-css","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Automatic Grid Like Masonry With Pure CSS","description":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a01e96"},"children":[{"type":"text","value":"$cell: "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"250"}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a01e96"},"children":[{"type":"text","value":"$gap: "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"20"}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".grid"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"display"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-93ab44"},"children":[{"type":"text","value":"grid"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-template-columns"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-62ad3a"},"children":[{"type":"text","value":"repeat"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"auto-fit"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62ad3a"},"children":[{"type":"text","value":"minmax"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"$cell"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f42e6b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-4288f1"},"children":[{"type":"text","value":"fr"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-auto-rows"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"256"}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-auto-flow"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-93ab44"},"children":[{"type":"text","value":"row"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93ab44"},"children":[{"type":"text","value":"dense"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-column-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-row-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".h-2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// takes 2 columns"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-column-end"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".v-2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// takes 2 rows"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-row-end"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".full-width"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// height: 1 row"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".top-right"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// height here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"-2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// width here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-145210{color:#8B949E}.ct-43821f{color:#79C0FF}.ct-4288f1{color:#FF7B72}.ct-f42e6b{color:#79C0FF}.ct-4fac47{color:#FFA657}.ct-62ad3a{color:#79C0FF}.ct-93ab44{color:#79C0FF}.ct-a54cfd{color:#79C0FF}.ct-573002{color:#C9D1D9}.ct-74caba{color:#79C0FF}.ct-299fdc{color:#C9D1D9}.ct-28dcfd{color:#FF7B72}.ct-48e8e4{color:#79C0FF}.ct-a01e96{color:#FFA657}.light .ct-a01e96{color:#657B83}.light .ct-48e8e4{color:#D33682}.light .ct-28dcfd{color:#859900}.light .ct-299fdc{color:#657B83}.light .ct-74caba{color:#93A1A1}.light .ct-573002{color:#657B83}.light .ct-a54cfd{color:#859900}.light .ct-93ab44{color:#657B83}.light .ct-62ad3a{color:#268BD2}.light .ct-4fac47{color:#657B83}.light .ct-f42e6b{color:#D33682}.light .ct-4288f1{color:#859900}.light .ct-43821f{color:#859900}.light .ct-145210{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"basic-elements-with-double-height-or-width","depth":3,"text":"Basic elements with double height or width"},{"id":"header-that-fills-all-columns","depth":3,"text":"Header, that fills all columns"},{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner","depth":3,"text":"Stamp element, that takes 3 rows in the top right corner"}]}},"_type":"markdown","_id":"content:CSS:Automatic Grid like Masonry with pure CSS.md","_source":"content","_file":"CSS/Automatic Grid like Masonry with pure CSS.md","_extension":"md"},{"_path":"/css/sass-nth-child-iterate-mixin","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Sass Nth Child Iterate Mixin","description":"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db034d"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bea120"},"children":[{"type":"text","value":"color-per-child"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-db034d"},"children":[{"type":"text","value":"@each"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db034d"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2afc97"},"children":[{"type":"text","value":"&"}]},{"type":"element","tag":"span","props":{"class":"ct-ecf10f"},"children":[{"type":"text","value":":nth-child"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"#{"}]},{"type":"element","tag":"span","props":{"class":"ct-628599"},"children":[{"type":"text","value":"index"}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"(($colors), ($color))}"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0755e5"},"children":[{"type":"text","value":"color"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-54686e"},"children":[{"type":"text","value":".item"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cec943"},"children":[{"type":"text","value":"@include"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0e527b"},"children":[{"type":"text","value":"color_per_child"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#ded187"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#dbde87"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#bade87"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#9cde87"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#87deaa"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-58e517{color:#79C0FF}.ct-0e527b{color:#D2A8FF}.ct-cec943{color:#FF7B72}.ct-54686e{color:#79C0FF}.ct-0eb9c8{color:#C9D1D9}.ct-0755e5{color:#79C0FF}.ct-628599{color:#79C0FF}.ct-ecf10f{color:#79C0FF}.ct-2afc97{color:#7EE787}.ct-25f491{color:#FFA657}.ct-bea120{color:#D2A8FF}.ct-28aa2f{color:#C9D1D9}.ct-db034d{color:#FF7B72}.light .ct-db034d{color:#859900}.light .ct-28aa2f{color:#657B83}.light .ct-bea120{color:#268BD2}.light .ct-25f491{color:#657B83}.light .ct-2afc97{color:#268BD2}.light .ct-ecf10f{color:#93A1A1}.light .ct-628599{color:#268BD2}.light .ct-0755e5{color:#859900}.light .ct-0eb9c8{color:#657B83}.light .ct-54686e{color:#93A1A1}.light .ct-cec943{color:#859900}.light .ct-0e527b{color:#268BD2}.light .ct-58e517{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Sass nth-child iterate mixin.md","_source":"content","_file":"CSS/Sass nth-child iterate mixin.md","_extension":"md"},{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2be314"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-57b956"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-643614"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cfa359"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-673c15"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-934fd2"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-a4496f"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-185100"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-620a55"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-f80d95"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-2be314"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-57b956"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-643614"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"  ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-f80d95{color:#79C0FF}.ct-620a55{color:#FF7B72}.ct-185100{color:#79C0FF}.ct-a4496f{color:#79C0FF}.ct-934fd2{color:#79C0FF}.ct-bfa258{color:#C9D1D9}.ct-673c15{color:#D2A8FF}.ct-cfa359{color:#7EE787}.ct-643614{color:#79C0FF}.ct-57b956{color:#79C0FF}.ct-2be314{color:#79C0FF}.ct-1f3dfa{color:#C9D1D9}.ct-4c9724{color:#FF7B72}.light .ct-4c9724{color:#859900}.light .ct-1f3dfa{color:#657B83}.light .ct-2be314{color:#859900}.light .ct-57b956{color:#268BD2}.light .ct-643614{color:#D33682}.light .ct-cfa359{color:#268BD2}.light .ct-673c15{color:#268BD2}.light .ct-bfa258{color:#657B83}.light .ct-934fd2{color:#859900}.light .ct-a4496f{color:#268BD2}.light .ct-185100{color:#D33682}.light .ct-620a55{color:#859900}.light .ct-f80d95{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"},{"_path":"/docker/building-static-pages-with-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Building Static Pages With Docker","description":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Building static pages with Docker.md","_source":"content","_file":"Docker/Building static pages with Docker.md","_extension":"md"},{"_path":"/docker/drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Drone Ci","description":"Can be used with Private docker registry to deploy things using #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"drone repo update $1 --trusted=true && drone repo info $1\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"build-master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"plugins/docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"when"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"branch"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"dockerfile"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"Dockerfile"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"tag"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"${DRONE_BRANCH}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"global_docker_login"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"global_docker_password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"global_docker_registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"repo"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"docker_repo"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"drone"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone/drone:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_SERVER_HOST=drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_SERVER_PROTO=https"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_TLS_AUTOCERT=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_LOGS_DEBUG=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_LOGS_TRACE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"./data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"8090:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"drone-agent"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone__agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone/agent:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_RPC_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a33e40"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" DRONE_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a33e40"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" DRONE_TOKEN=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"drone info"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"drone repo update "}]},{"type":"element","tag":"span","props":{"class":"ct-74bbe4"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-edde8e"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" --trusted=true "}]},{"type":"element","tag":"span","props":{"class":"ct-b08bd8"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" drone repo info "}]},{"type":"element","tag":"span","props":{"class":"ct-74bbe4"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-edde8e"},"children":[{"type":"text","value":"1"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b08bd8{color:#FF7B72}.ct-edde8e{color:#C9D1D9}.ct-74bbe4{color:#C9D1D9}.ct-a33e40{color:#FF7B72}.ct-ec4a4f{color:#A5D6FF}.ct-16f205{color:#C9D1D9}.ct-341687{color:#7EE787}.light .ct-341687{color:#268BD2}.light .ct-16f205{color:#657B83}.light .ct-ec4a4f{color:#2AA198}.light .ct-a33e40{color:#073642}.light .ct-74bbe4{color:#859900}.light .ct-edde8e{color:#268BD2}.light .ct-b08bd8{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"pushing-to-private-docker_registry","depth":2,"text":"Pushing to private docker_registry"},{"id":"docker-compose-file-for-drone-ci","depth":2,"text":"Docker-compose file for drone-ci"},{"id":"caching-builds","depth":2,"text":"Caching builds"},{"id":"get-user-info","depth":2,"text":"Get user info"},{"id":"mark-user-as-trusted","depth":2,"text":"Mark user as trusted"}]}},"_type":"markdown","_id":"content:Docker:Drone-ci.md","_source":"content","_file":"Docker/Drone-ci.md","_extension":"md"},{"_path":"/docker/github-pages-with-drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Github Pages With Drone Ci","description":"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"node:16"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"commands"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"yarn"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"yarn generate"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"rm -rf ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"mv ./.output/public ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"touch ./docs/.nojekyll"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"publish"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"plugins/gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"target_branch"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"github_username"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"github_token"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-4e8a40{color:#A5D6FF}.ct-2f72e3{color:#C9D1D9}.ct-6d5714{color:#7EE787}.light .ct-6d5714{color:#268BD2}.light .ct-2f72e3{color:#657B83}.light .ct-4e8a40{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"additional-reading","depth":2,"text":"Additional reading"}]}},"_type":"markdown","_id":"content:Docker:Github pages with drone-ci.md","_source":"content","_file":"Docker/Github pages with drone-ci.md","_extension":"md"},{"_path":"/docker/private-docker-registry","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Private Docker Registry","description":"Suitable to work with Drone-ci for hosting private #docker images.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --entrypoint htpasswd registry:2 \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  -Bbn user mypassword "}]},{"type":"element","tag":"span","props":{"class":"ct-5f875a"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":" auth/registry.password"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"docker__registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"registry:2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"5000:5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_AUTH=htpasswd"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_HTTP_SECRET=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"./registry/auth:/auth"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"./registry/data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"ui"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"docker__ui"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"parabuzzle/craneoperator:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"80:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_HOST=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_PORT=5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_PROTOCOL=http"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"ALLOW_REGISTRY_LOGIN=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_ALLOW_DELETE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"USERNAME=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"PASSWORD=password"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db26b7"},"children":[{"type":"text","value":"# Try this first"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --rm anoxis/registry-cli \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  -r https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  -l user:password \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --delete \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --num 2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db26b7"},"children":[{"type":"text","value":"# Then this "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"docker run -it \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -v /path/to/registry/data:/registry \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -e REGISTRY_URL=https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -e DRY_RUN="}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -e REGISTRY_AUTH="}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"\"user:password\""}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    mortensrasmussen/docker-registry-manifest-cleanup"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-db26b7{color:#8B949E}.ct-f3cf32{color:#A5D6FF}.ct-95058f{color:#7EE787}.ct-5f875a{color:#FF7B72}.ct-47d708{color:#C9D1D9}.light .ct-47d708{color:#657B83}.light .ct-5f875a{color:#859900}.light .ct-95058f{color:#268BD2}.light .ct-f3cf32{color:#2AA198}.light .ct-db26b7{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"sample-docker-compose-for-custom-docker-registry","depth":2,"text":"Sample docker-compose for custom docker registry"},{"id":"squash-layers-on-registry","depth":2,"text":"Squash layers on registry"}]}},"_type":"markdown","_id":"content:Docker:Private docker registry.md","_source":"content","_file":"Docker/Private docker registry.md","_extension":"md"},{"_path":"/docker/refresh-containers-on-pull","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Containers On Pull","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"watchtower"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"docker__watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"v2tec/watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"/home/user/.docker/config.json:/config.json"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"--interval 60 image_1 image_2"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-427dcf{color:#A5D6FF}.ct-9a7ff4{color:#C9D1D9}.ct-675a2e{color:#7EE787}.light .ct-675a2e{color:#268BD2}.light .ct-9a7ff4{color:#657B83}.light .ct-427dcf{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-watchtower","depth":2,"text":"Setting up watchtower"}]}},"_type":"markdown","_id":"content:Docker:Refresh containers on pull.md","_source":"content","_file":"Docker/Refresh containers on pull.md","_extension":"md"},{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fef622"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fef622"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fef622"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-7a6d34"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-7a6d34"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-7a6d34"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99e5e1"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-211c1b"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-211c1b{color:#79C0FF}.ct-99e5e1{color:#FF7B72}.ct-7a6d34{color:#A5D6FF}.ct-5f8edc{color:#C9D1D9}.ct-14932b{color:#C9D1D9}.ct-5cfde0{color:#C9D1D9}.ct-fef622{color:#8B949E}.light .ct-fef622{color:#93A1A1}.light .ct-5cfde0{color:#657B83}.light .ct-14932b{color:#859900}.light .ct-5f8edc{color:#268BD2}.light .ct-7a6d34{color:#2AA198}.light .ct-99e5e1{color:#859900}.light .ct-211c1b{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"},{"_path":"/docker/wait-for-mysql","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Mysql","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2180e3"},"children":[{"type":"text","value":"# Waits for mysql to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-10f0a2"},"children":[{"type":"text","value":"wait_for_mysql"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  query="}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\"SELECT count(*) FROM users\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-2180e3"},"children":[{"type":"text","value":"# 3 minutes limit"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-6d1c8e"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" mysql --user="}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" -e "}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-13d7bb"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d1c8e"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\"[Error] can't properly query MySQL after "}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d1c8e"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2180e3"},"children":[{"type":"text","value":"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-13d7bb{color:#79C0FF}.ct-d7d1a7{color:#C9D1D9}.ct-484fb2{color:#C9D1D9}.ct-6d1c8e{color:#79C0FF}.ct-69e703{color:#FF7B72}.ct-243af1{color:#A5D6FF}.ct-b616f9{color:#C9D1D9}.ct-10f0a2{color:#D2A8FF}.ct-2180e3{color:#8B949E}.light .ct-2180e3{color:#93A1A1}.light .ct-10f0a2{color:#268BD2}.light .ct-b616f9{color:#657B83}.light .ct-243af1{color:#2AA198}.light .ct-69e703{color:#859900}.light .ct-6d1c8e{color:#268BD2}.light .ct-484fb2{color:#859900}.light .ct-d7d1a7{color:#268BD2}.light .ct-13d7bb{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for mysql.md","_source":"content","_file":"Docker/Wait for mysql.md","_extension":"md"},{"_path":"/docker/wait-for-redis","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Redis","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4f0f5f"},"children":[{"type":"text","value":"# Waits for redis to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-88f37d"},"children":[{"type":"text","value":"wait_for_redis"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-4f0f5f"},"children":[{"type":"text","value":"# 3 minutes"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-d454d3"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" redis-cli -h localhost -p 6379 -a "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" ping "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\"PONG\""}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"/dev/null "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"2>&1;"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-f879cc"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d454d3"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\"[Error] can't properly ping Redis container after "}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d454d3"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4f0f5f"},"children":[{"type":"text","value":"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-f879cc{color:#79C0FF}.ct-2d0cd3{color:#C9D1D9}.ct-f87068{color:#C9D1D9}.ct-75e354{color:#A5D6FF}.ct-d454d3{color:#79C0FF}.ct-d81cf7{color:#FF7B72}.ct-fde2e0{color:#C9D1D9}.ct-88f37d{color:#D2A8FF}.ct-4f0f5f{color:#8B949E}.light .ct-4f0f5f{color:#93A1A1}.light .ct-88f37d{color:#268BD2}.light .ct-fde2e0{color:#657B83}.light .ct-d81cf7{color:#859900}.light .ct-d454d3{color:#268BD2}.light .ct-75e354{color:#2AA198}.light .ct-f87068{color:#859900}.light .ct-2d0cd3{color:#268BD2}.light .ct-f879cc{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for redis.md","_source":"content","_file":"Docker/Wait for redis.md","_extension":"md"},{"_path":"/frontend/react-native/oauth2-login","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"OAuth2 Login","description":"Use #oauth2 login with React-Native","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-53e16d"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'react-native-app-auth'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e2cf44"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eb0424"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  issuer: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'https://accounts.google.com'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}.apps.googleusercontent.com`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`com.yourapp:/oauth2redirect/google`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'openid'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'profile'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-7a29da"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"});"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-e2cf44"},"children":[{"type":"text","value":"// better hide it somehow"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'com.yourapp'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eb0424"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  serviceConfiguration: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"    authorizationEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/authorize?response_type=code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}&redirect_uri=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e2cf44"},"children":[{"type":"text","value":"// TODO: replace it with your own backend to secure client_secret:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"    tokenEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}&client_secret=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'login:info'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'login:avatar'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-7a29da"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb0424"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-53e16d"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-53e16d"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-7a29da{color:#79C0FF}.ct-eb0424{color:#D2A8FF}.ct-e2cf44{color:#8B949E}.ct-647b71{color:#79C0FF}.ct-b7182d{color:#FF7B72}.ct-08d1e5{color:#A5D6FF}.ct-53e16d{color:#C9D1D9}.ct-fc33e3{color:#C9D1D9}.ct-62cb9a{color:#FF7B72}.light .ct-62cb9a{color:#859900}.light .ct-fc33e3{color:#657B83}.light .ct-53e16d{color:#268BD2}.light .ct-08d1e5{color:#2AA198}.light .ct-b7182d{color:#073642}.light .ct-647b71{color:#268BD2}.light .ct-e2cf44{color:#93A1A1}.light .ct-eb0424{color:#268BD2}.light .ct-7a29da{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"common-oauth2-providers","depth":2,"text":"Common OAuth2 providers","children":[{"id":"example-for-google","depth":3,"text":"Example for #Google"},{"id":"example-for-yandex","depth":3,"text":"Example for #Yandex"}]},{"id":"apple-id-login","depth":2,"text":"Apple ID login"}]}},"_type":"markdown","_id":"content:Frontend:React Native:OAuth2 login.md","_source":"content","_file":"Frontend/React Native/OAuth2 login.md","_extension":"md"},{"_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Preserve FlatList Scroll Position In React Native","description":"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b4fb03"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d39a2a"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"; }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-26da6a"},"children":[{"type":"text","value":"SomeList"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" ({ "}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// set it to `true` before interaction and back to `false` right after"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"NativeSyntheticEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"NativeScrollEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":">) "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"nativeEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"contentOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"y"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8dee8d"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-26da6a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d3d5"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d3d5"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"scrollToOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      offset: "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      animated: "}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// onInteraction wraps interaction to preserve scroll position"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"onInteraction"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    () "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"500"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    ["}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"setSelectedSubThemes"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-5ff58d"},"children":[{"type":"text","value":"FlatList"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// ...required FlatList options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"/>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-5ff58d{color:#FFA657}.ct-03d3d5{color:#79C0FF}.ct-8dee8d{color:#79C0FF}.ct-2704a7{color:#C9D1D9}.ct-09cabd{color:#79C0FF}.ct-87fdb6{color:#79C0FF}.ct-03f514{color:#79C0FF}.ct-5b3757{color:#FFA657}.ct-02453f{color:#FFA657}.ct-cee0e9{color:#FF7B72}.ct-26da6a{color:#D2A8FF}.ct-0ed0cd{color:#C9D1D9}.ct-0506c3{color:#FF7B72}.ct-d39a2a{color:#79C0FF}.ct-498eca{color:#D2A8FF}.ct-995aac{color:#FF7B72}.ct-b4fb03{color:#FFA657}.ct-36a801{color:#C9D1D9}.ct-0f7321{color:#FF7B72}.ct-8d188c{color:#8B949E}.light .ct-8d188c{color:#93A1A1}.light .ct-0f7321{color:#073642}.light .ct-36a801{color:#657B83}.light .ct-b4fb03{color:#268BD2}.light .ct-995aac{color:#859900}.light .ct-498eca{color:#268BD2}.light .ct-d39a2a{color:#859900}.light .ct-0506c3{color:#073642}.light .ct-0ed0cd{color:#657B83}.light .ct-26da6a{color:#268BD2}.light .ct-cee0e9{color:#859900}.light .ct-02453f{color:#268BD2}.light .ct-5b3757{color:#657B83}.light .ct-03f514{color:#268BD2}.light .ct-87fdb6{color:#D33682}.light .ct-09cabd{color:#B58900}.light .ct-2704a7{color:#268BD2}.light .ct-8dee8d{color:#268BD2}.light .ct-03d3d5{color:#859900}.light .ct-5ff58d{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md","_source":"content","_file":"Frontend/React Native/Preserve FlatList scroll position in React Native.md","_extension":"md"},{"_path":"/frontend/react-native/useful-comands","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Useful Comands","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"adb logcat com.application:I \"*:S\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"keytool -printcert -jarfile \"$1\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"adb logcat com.application:I "}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\"*:S\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"keytool -printcert -jarfile "}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"npx react-native bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --platform android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --dev "}]},{"type":"element","tag":"span","props":{"class":"ct-c76252"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --entry-file index.js \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --bundle-output android/app/src/main/assets/index.android.bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --assets-dest android/app/src/main/res/"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c76252"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" android "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" ./gradlew assembleDebug"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7680f5"},"children":[{"type":"text","value":"# do your stuff"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"./gradlew clean"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c76252"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" ./android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" ./gradlew assembleRelease \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" adb install ./app/build/outputs/apk/release/app-release.apk"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7680f5"},"children":[{"type":"text","value":"# ios "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"xcrun simctl openurl booted "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7680f5"},"children":[{"type":"text","value":"# android"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"adb shell am start -W -a android.intent.action.VIEW -d "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"com.application"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"PACKAGE="}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\"com.application\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"adb shell pm set-app-links --package "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"PACKAGE"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" 0 all "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  adb shell pm verify-app-links --re-verify "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"PACKAGE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-7680f5{color:#8B949E}.ct-3aa5ab{color:#FF7B72}.ct-c76252{color:#79C0FF}.ct-79725d{color:#C9D1D9}.ct-b8df69{color:#C9D1D9}.ct-3cfff2{color:#A5D6FF}.ct-04e482{color:#C9D1D9}.light .ct-04e482{color:#657B83}.light .ct-3cfff2{color:#2AA198}.light .ct-b8df69{color:#859900}.light .ct-79725d{color:#268BD2}.light .ct-c76252{color:#268BD2}.light .ct-3aa5ab{color:#859900}.light .ct-7680f5{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"show-android-logcat","depth":2,"text":"Show android logcat"},{"id":"get-apks-sha-256","depth":2,"text":"Get .apk's SHA-256"},{"id":"assemble-debug-release-on-android","depth":2,"text":"Assemble debug release on Android"},{"id":"send-release-to-android-device","depth":2,"text":"Send release to Android device"},{"id":"deep-links","depth":2,"text":"Deep links","children":[{"id":"open-deep-links","depth":3,"text":"Open deep links"},{"id":"reverify-links-on-android","depth":3,"text":"Reverify links on Android"}]}]}},"_type":"markdown","_id":"content:Frontend:React Native:Useful comands.md","_source":"content","_file":"Frontend/React Native/Useful comands.md","_extension":"md"},{"_path":"/frontend/react/axios-refresh-token-on-react","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios Refresh Token On React","description":"<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"axios\""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"React"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-706917"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7232c4"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-a6fb7c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-a6fb7c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be5dc3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-a6fb7c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be5dc3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  client: "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03cd7c"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-03cd7c"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  )."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"<() "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":">(() "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-11fa4d"},"children":[{"type":"text","value":"// TODO: implement me"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"not implemented\""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-11fa4d"},"children":[{"type":"text","value":"// append `access` token to all requests"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"`Bearer ${"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-4c3a40"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-11fa4d"},"children":[{"type":"text","value":"// refreshing interceptor"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c10737"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f16f1"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"              Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"Bearer \""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"{{ "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" }}"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"        {"}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"</"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useAPI"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0f16f1{color:#79C0FF}.ct-c10737{color:#79C0FF}.ct-4c3a40{color:#A5D6FF}.ct-11fa4d{color:#8B949E}.ct-03cd7c{color:#FFA657}.ct-acc80e{color:#79C0FF}.ct-c81972{color:#79C0FF}.ct-2503cc{color:#FF7B72}.ct-e8515f{color:#D2A8FF}.ct-be5dc3{color:#79C0FF}.ct-a6fb7c{color:#FF7B72}.ct-e6282b{color:#FFA657}.ct-7232c4{color:#79C0FF}.ct-706917{color:#FFA657}.ct-799eb0{color:#C9D1D9}.ct-d3a7a8{color:#FF7B72}.ct-d81eef{color:#A5D6FF}.ct-592be9{color:#C9D1D9}.ct-11a550{color:#C9D1D9}.ct-9878b7{color:#FF7B72}.light .ct-9878b7{color:#859900}.light .ct-11a550{color:#657B83}.light .ct-592be9{color:#268BD2}.light .ct-d81eef{color:#2AA198}.light .ct-d3a7a8{color:#073642}.light .ct-799eb0{color:#657B83}.light .ct-706917{color:#268BD2}.light .ct-7232c4{color:#657B83}.light .ct-e6282b{color:#657B83}.light .ct-a6fb7c{color:#859900}.light .ct-be5dc3{color:#859900}.light .ct-e8515f{color:#268BD2}.light .ct-2503cc{color:#073642}.light .ct-c81972{color:#859900}.light .ct-acc80e{color:#268BD2}.light .ct-03cd7c{color:#268BD2}.light .ct-11fa4d{color:#93A1A1}.light .ct-4c3a40{color:#657B83}.light .ct-c10737{color:#D33682}.light .ct-0f16f1{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios refresh token on React.md","_source":"content","_file":"Frontend/React/Axios refresh token on React.md","_extension":"md"},{"_path":"/frontend/react/axios-with-abortcontroller","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios With AbortController","description":"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9aea1b"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9aea1b"},"children":[{"type":"text","value":"'axios'"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useGetUsers"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"());"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9aea1b"},"children":[{"type":"text","value":"\"/\""}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-03ead4"},"children":[{"type":"text","value":"// params and props here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"        signal: "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"signal"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"data"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"abort"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-03ead4"},"children":[{"type":"text","value":"// controller should be rewritten or all requests will fail"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-03ead4{color:#8B949E}.ct-4cc01b{color:#D2A8FF}.ct-07b026{color:#79C0FF}.ct-e966be{color:#FF7B72}.ct-9aea1b{color:#A5D6FF}.ct-0da03b{color:#C9D1D9}.ct-6c6595{color:#C9D1D9}.ct-8e94e6{color:#FF7B72}.light .ct-8e94e6{color:#859900}.light .ct-6c6595{color:#657B83}.light .ct-0da03b{color:#268BD2}.light .ct-9aea1b{color:#2AA198}.light .ct-e966be{color:#073642}.light .ct-07b026{color:#268BD2}.light .ct-4cc01b{color:#268BD2}.light .ct-03ead4{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios with AbortController.md","_source":"content","_file":"Frontend/React/Axios with AbortController.md","_extension":"md"},{"_path":"/frontend/vue/adding-global-properties-to-component","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Adding Global Properties To Component","description":"The topic's fully covered in the official documentation and in Add global variable to window.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-964d2b"},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a5de92"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3ca8a"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a5de92"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-49add5"},"children":[{"type":"text","value":"'axios'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f0d2a"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f0d2a"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-49add5"},"children":[{"type":"text","value":"'vue'"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8f0d2a"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cee846"},"children":[{"type":"text","value":"ComponentCustomProperties"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9299ea"},"children":[{"type":"text","value":"$translate"}]},{"type":"element","tag":"span","props":{"class":"ct-00bcc1"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-ad6170"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-00bcc1"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cb7d06"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c23435"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cb7d06"},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-c23435{color:#FF7B72}.ct-cb7d06{color:#79C0FF}.ct-ad6170{color:#FFA657}.ct-00bcc1{color:#FF7B72}.ct-9299ea{color:#D2A8FF}.ct-38a198{color:#C9D1D9}.ct-cee846{color:#FFA657}.ct-8f0d2a{color:#FF7B72}.ct-49add5{color:#A5D6FF}.ct-a3ca8a{color:#C9D1D9}.ct-59b12a{color:#C9D1D9}.ct-a5de92{color:#FF7B72}.ct-964d2b{color:#8B949E}.light .ct-964d2b{color:#93A1A1}.light .ct-a5de92{color:#859900}.light .ct-59b12a{color:#657B83}.light .ct-a3ca8a{color:#268BD2}.light .ct-49add5{color:#2AA198}.light .ct-8f0d2a{color:#073642}.light .ct-cee846{color:#268BD2}.light .ct-38a198{color:#657B83}.light .ct-9299ea{color:#268BD2}.light .ct-00bcc1{color:#859900}.light .ct-ad6170{color:#657B83}.light .ct-cb7d06{color:#859900}.light .ct-c23435{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Adding global properties to component.md","_source":"content","_file":"Frontend/Vue/Adding global properties to component.md","_extension":"md"},{"_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Make Nuxt Handle Obsidian Highlights","description":"By default Nuxt Content Plugin not handling <span class=\"highlight\">highlight</span> links. To fix that we will create Nitro plugin:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-07bca4"},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac2020"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ac2020"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-61e645"},"children":[{"type":"text","value":"defineNitroPlugin"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":"((nitroApp) "}]},{"type":"element","tag":"span","props":{"class":"ct-1a60f0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0ba54a"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"nitroApp"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"hooks"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d24565"},"children":[{"type":"text","value":"hook"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-89c7d8"},"children":[{"type":"text","value":"\"content:file:beforeParse\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"_id"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d24565"},"children":[{"type":"text","value":"endsWith"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-89c7d8"},"children":[{"type":"text","value":"\".md\""}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d24565"},"children":[{"type":"text","value":"replace"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-061337"},"children":[{"type":"text","value":"/==("}]},{"type":"element","tag":"span","props":{"class":"ct-6a52e4"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"^"}]},{"type":"element","tag":"span","props":{"class":"ct-6a52e4"},"children":[{"type":"text","value":"=]"}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-061337"},"children":[{"type":"text","value":")==/"}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"gs"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-89c7d8"},"children":[{"type":"text","value":"`<span class=\"highlight\">$1</span>`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"      );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0ba54a"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-0ba54a"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6a52e4{color:#79C0FF}.ct-061337{color:#A5D6FF}.ct-1be858{color:#FF7B72}.ct-89c7d8{color:#A5D6FF}.ct-d24565{color:#D2A8FF}.ct-64dc60{color:#C9D1D9}.ct-67d53e{color:#C9D1D9}.ct-0ba54a{color:#C9D1D9}.ct-1a60f0{color:#FF7B72}.ct-61e645{color:#D2A8FF}.ct-6fcf5f{color:#FFA657}.ct-ac2020{color:#FF7B72}.ct-07bca4{color:#8B949E}.light .ct-07bca4{color:#93A1A1}.light .ct-ac2020{color:#859900}.light .ct-6fcf5f{color:#657B83}.light .ct-61e645{color:#268BD2}.light .ct-1a60f0{color:#073642}.light .ct-0ba54a{color:#657B83}.light .ct-67d53e{color:#657B83}.light .ct-64dc60{color:#268BD2}.light .ct-d24565{color:#268BD2}.light .ct-89c7d8{color:#2AA198}.light .ct-1be858{color:#859900}.light .ct-061337{color:#D30102}.light .ct-6a52e4{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md","_source":"content","_file":"Frontend/Vue/Make Nuxt handle Obsidian highlights.md","_extension":"md"},{"_path":"/git/force-git-to-use-https","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Force Git To Use HTTPS","description":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":"[url "}]},{"type":"element","tag":"span","props":{"class":"ct-ea0e55"},"children":[{"type":"text","value":"\"https://github.com\""}]},{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":"    insteadOf "}]},{"type":"element","tag":"span","props":{"class":"ct-93e5d8"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":" git:"}]},{"type":"element","tag":"span","props":{"class":"ct-0da74e"},"children":[{"type":"text","value":"//github.com"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0da74e{color:#8B949E}.ct-93e5d8{color:#FF7B72}.ct-ea0e55{color:#A5D6FF}.ct-696cb4{color:#C9D1D9}.light .ct-696cb4{color:#657B83}.light .ct-ea0e55{color:#2AA198}.light .ct-93e5d8{color:#859900}.light .ct-0da74e{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Force git to use HTTPS.md","_source":"content","_file":"Git/Force git to use HTTPS.md","_extension":"md"},{"_path":"/git/git-aliases-and-useful-commands","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Git Aliases And Useful Commands","description":"Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n"}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"[alias]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    flush "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" git clean"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"branches branch "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"v master "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" xargs git branch "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"D"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    lol "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" log "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"oneline "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"graph"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    l "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" lol"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    c "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    cv "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"no"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"verify "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    p "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" push"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    pf "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"force"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"with"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"lease"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    ignore"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"now "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" update"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"index "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"skip"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"worktree"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-24779b{color:#FF7B72}.ct-1c723b{color:#C9D1D9}.light .ct-1c723b{color:#657B83}.light .ct-24779b{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Git aliases and useful commands.md","_source":"content","_file":"Git/Git aliases and useful commands.md","_extension":"md"},{"_path":"/graphql/apollo-client-pagination","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Apollo Client Pagination","description":"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"listItems"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"filter"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"sort"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"limit"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"): "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"input"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dfd676"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dfd676"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Item"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Int"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'@apollo/client'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  cache: "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"({ "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d80610"},"children":[{"type":"text","value":"TypePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  Query: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    fields: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// query name"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      listItems: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// apollo will serialize and use keyArgs as unique"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// identifier in cache for every query"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// consider choosing the right fields, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// i.e. limit and offset won't work here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        keyArgs: ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'sort'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// primitive type"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'filter'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", ["}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'name'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'type'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// nested fields of `filter`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        ],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        merge: "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-640d5b"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e20842"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-640d5b"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// no existing data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// If hook was called multiple times"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// merge cache and incoming data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// apply latest result for totalCount"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-e20842{color:#D2A8FF}.ct-640d5b{color:#FF7B72}.ct-d80610{color:#FFA657}.ct-2d8226{color:#8B949E}.ct-926fbe{color:#79C0FF}.ct-d1eb42{color:#FF7B72}.ct-4b4e55{color:#A5D6FF}.ct-e1caea{color:#C9D1D9}.ct-15d01a{color:#FF7B72}.ct-dfd676{color:#79C0FF}.ct-877fdf{color:#79C0FF}.ct-5ccade{color:#FFA657}.ct-2f7e13{color:#C9D1D9}.ct-321bed{color:#D2A8FF}.ct-a237a4{color:#C9D1D9}.ct-58cc9f{color:#FF7B72}.light .ct-58cc9f{color:#859900}.light .ct-a237a4{color:#657B83}.light .ct-321bed{color:#268BD2}.light .ct-2f7e13{color:#657B83}.light .ct-5ccade{color:#657B83}.light .ct-877fdf{color:#859900}.light .ct-dfd676{color:#859900}.light .ct-15d01a{color:#859900}.light .ct-e1caea{color:#268BD2}.light .ct-4b4e55{color:#2AA198}.light .ct-d1eb42{color:#073642}.light .ct-926fbe{color:#268BD2}.light .ct-2d8226{color:#93A1A1}.light .ct-d80610{color:#268BD2}.light .ct-640d5b{color:#073642}.light .ct-e20842{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Apollo Client pagination.md","_source":"content","_file":"GraphQL/Apollo Client pagination.md","_extension":"md"},{"_path":"/graphql/refresh-token-in-apollo-client","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Token In Apollo Client","description":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"createApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"authorization"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f47e40"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"<"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"    { "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  >,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"ApolloClientBase"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    link: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"ApolloLink"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"setContext"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"HttpLink"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        fetch: "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    ]),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f47e40"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** Checks if GraphQl errors has unauthenticated error */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<{ "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"ErrorCode"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" }>)"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"isArray"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"some"}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b69e3c"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// Distinguish unauthorized error here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** Detects if customFetch is sending refresh request */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"operationName"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"'RefreshToken'"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      { accessToken: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  ) "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Response"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// already refreshing token, wait for it and then use refreshed token"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// or use empty authorization if refreshing failed"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f47e40"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":">)?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// check for unauthorized errors, if not present, just return result"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          ok: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"unknown"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// If unauthorized, refresh token and try again"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// can't refresh token. logging out"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// success or any non-auth error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// wait for other request's refreshing query to finish, when retry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1b4494{color:#A5D6FF}.ct-50e6c4{color:#79C0FF}.ct-b69e3c{color:#79C0FF}.ct-29d287{color:#FFA657}.ct-a0ec17{color:#79C0FF}.ct-356b7f{color:#C9D1D9}.ct-0f6e5e{color:#8B949E}.ct-f47e40{color:#FFA657}.ct-9d9165{color:#FF7B72}.ct-0e97d6{color:#D2A8FF}.ct-77f781{color:#79C0FF}.ct-4d36d3{color:#79C0FF}.ct-ea52b2{color:#FF7B72}.ct-37732a{color:#FFA657}.ct-fb4541{color:#C9D1D9}.ct-c33345{color:#D2A8FF}.ct-c40f93{color:#FF7B72}.ct-f5cf46{color:#C9D1D9}.ct-908211{color:#FF7B72}.light .ct-908211{color:#859900}.light .ct-f5cf46{color:#657B83}.light .ct-c40f93{color:#073642}.light .ct-c33345{color:#268BD2}.light .ct-fb4541{color:#657B83}.light .ct-37732a{color:#657B83}.light .ct-ea52b2{color:#859900}.light .ct-4d36d3{color:#859900}.light .ct-77f781{color:#859900}.light .ct-0e97d6{color:#268BD2}.light .ct-9d9165{color:#073642}.light .ct-f47e40{color:#268BD2}.light .ct-0f6e5e{color:#93A1A1}.light .ct-356b7f{color:#268BD2}.light .ct-a0ec17{color:#B58900}.light .ct-29d287{color:#268BD2}.light .ct-b69e3c{color:#D33682}.light .ct-50e6c4{color:#268BD2}.light .ct-1b4494{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Refresh token in Apollo client.md","_source":"content","_file":"GraphQL/Refresh token in Apollo client.md","_extension":"md"},{"_path":"/linux/gitea-for-git-hosting","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Gitea For Git Hosting","description":"Self-hosted #git repositories with gitea and #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"gitea"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"external"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-231705"},"children":[{"type":"text","value":"false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"gitea/gitea:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"USER_UID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"USER_GID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"./var/lib/gitea:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"./etc/gitea:/etc/gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"/etc/timezone:/etc/timezone:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"/etc/localtime:/etc/localtime:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"\"3000:3000\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"\"222:22\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-231705{color:#79C0FF}.ct-7a640c{color:#A5D6FF}.ct-e171ba{color:#C9D1D9}.ct-eb8891{color:#7EE787}.light .ct-eb8891{color:#268BD2}.light .ct-e171ba{color:#657B83}.light .ct-7a640c{color:#2AA198}.light .ct-231705{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-with-docker-compose","depth":2,"text":"Setting up with docker-compose"}]}},"_type":"markdown","_id":"content:Linux:Gitea for git hosting.md","_source":"content","_file":"Linux/Gitea for git hosting.md","_extension":"md"},{"_path":"/linux/google-photos-alternative-with-photoprism","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Google Photos Alternative With Photoprism","description":"Photo Prism is a free alternative to Google photos, can be set up with #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"'3.5'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"photoprism"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism__app"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism/photoprism:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"depends_on"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"mariadb"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"2342:2342"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdd322"},"children":[{"type":"text","value":"# HTTP port (host:container)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_ADMIN_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"password\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"https://service.url/\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_ORIGINALS_LIMIT"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-07fb9d"},"children":[{"type":"text","value":"5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_HTTP_COMPRESSION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"gzip\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DEBUG"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"          "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_PUBLIC"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_READONLY"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_EXPERIMENTAL"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CHOWN"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_WEBDAV"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_SETTINGS"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_FACES"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DARKTABLE_PRESETS"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DETECT_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"           "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_UPLOAD_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"true\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"            "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_DRIVER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"       "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_SERVER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"mariadb:3306\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_NAME"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"photoprism\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"root\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"         "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"insecure\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_TITLE"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"PhotoPrism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_CAPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"Browse Your Life\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_DESCRIPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_AUTHOR"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"HOME"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"working_dir"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./data/originals:/photoprism/originals\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./data/imports:/photoprism/import\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./data/storage:/photoprism/storage\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"mariadb"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism__db"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"mariadb:10.6"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./database:/var/lib/mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdd322"},"children":[{"type":"text","value":"# Important, don't remove"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_ROOT_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"insecure"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_DATABASE"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"insecure"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-07fb9d{color:#79C0FF}.ct-cdd322{color:#8B949E}.ct-0f2d67{color:#A5D6FF}.ct-f8a7f1{color:#C9D1D9}.ct-0cbc4d{color:#7EE787}.light .ct-0cbc4d{color:#268BD2}.light .ct-f8a7f1{color:#657B83}.light .ct-0f2d67{color:#2AA198}.light .ct-cdd322{color:#93A1A1}.light .ct-07fb9d{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"docker-compose-file-to-run-it","depth":2,"text":"Docker compose file to run it"}]}},"_type":"markdown","_id":"content:Linux:Google photos alternative with Photoprism.md","_source":"content","_file":"Linux/Google photos alternative with Photoprism.md","_extension":"md"},{"_path":"/linux/resume-or-start-screen-session","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Resume Or Start Screen Session","description":"Running this script will enter currently running screen session or will start new one.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":"( screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-0b3b6a"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":" ( screen -d bash "}]},{"type":"element","tag":"span","props":{"class":"ct-0b3b6a"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":" screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-0b3b6a"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":" screen -SAm bash bash ) )"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0b3b6a{color:#FF7B72}.ct-7ba6e5{color:#C9D1D9}.light .ct-7ba6e5{color:#657B83}.light .ct-0b3b6a{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Resume or start screen session.md","_source":"content","_file":"Linux/Resume or start screen session.md","_extension":"md"},{"_path":"/linux/rsync-file-with-ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Rsync File With SSH","description":"Downloads file from #SSH with rsync and puts it in current folder.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9e339"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"PORT=22"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"USER=user"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"HOST=example.com"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"REMOTE_PATH=/tmp"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"REMOTE_FILE=sample.text"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"DEST_PATH=./"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"rsync -a -e "}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\"ssh -p "}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"PORT"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":" -P -v \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"@"}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"HOST"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"REMOTE_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"REMOTE_FILE"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"DEST_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-87da56{color:#C9D1D9}.ct-d9fe04{color:#C9D1D9}.ct-39eea0{color:#A5D6FF}.ct-ac1646{color:#C9D1D9}.ct-d9e339{color:#8B949E}.light .ct-d9e339{color:#93A1A1}.light .ct-ac1646{color:#657B83}.light .ct-39eea0{color:#2AA198}.light .ct-d9fe04{color:#859900}.light .ct-87da56{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Rsync file with SSH.md","_source":"content","_file":"Linux/Rsync file with SSH.md","_extension":"md"},{"_path":"/linux/setting-up-nginx","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Setting Up NGINX","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-07132d"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-129576"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# First attempt to serve request as file, then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# as directory, then fall back to displaying a 404."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-dd96a9"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" client_max_body_size "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"200M;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"80;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-53c2fa"},"children":[{"type":"text","value":"301"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" https://next.vault48.org"}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"request_uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"[::]:443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# managed by Certbot"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" ssl_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/fullchain.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" ssl_certificate_key "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/privkey.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" ssl_trusted_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/chain.pem;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-07132d"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-129576"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_redirect "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"off;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"Host "}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"host"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"X-Real-IP "}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"remote_addr"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"X-Forwarded-For "}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"proxy_add_x_forwarded_for"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_pass "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"http://127.0.0.1:8080;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-5af68c{color:#C9D1D9}.ct-207f57{color:#C9D1D9}.ct-53c2fa{color:#79C0FF}.ct-d5b9b4{color:#FF7B72}.ct-dd96a9{color:#FF7B72}.ct-129576{color:#FFA657}.ct-07132d{color:#FF7B72}.ct-27e5ba{color:#C9D1D9}.ct-af5f1b{color:#8B949E}.ct-f74bf7{color:#C9D1D9}.ct-8e1f14{color:#FF7B72}.light .ct-8e1f14{color:#073642}.light .ct-f74bf7{color:#657B83}.light .ct-af5f1b{color:#93A1A1}.light .ct-27e5ba{color:#657B83}.light .ct-07132d{color:#073642}.light .ct-129576{color:#657B83}.light .ct-dd96a9{color:#657B83}.light .ct-d5b9b4{color:#859900}.light .ct-53c2fa{color:#D33682}.light .ct-207f57{color:#859900}.light .ct-5af68c{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"fallback-url-for-spa-s","depth":2,"text":"Fallback url for SPA-s"},{"id":"set-up-for-uploads","depth":2,"text":"Set up for uploads"},{"id":"reverse-proxy-for-https","depth":2,"text":"Reverse proxy for https"}]}},"_type":"markdown","_id":"content:Linux:Setting up NGINX.md","_source":"content","_file":"Linux/Setting up NGINX.md","_extension":"md"},{"_path":"/linux/ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"SSH","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"config-aliases-for-ssh-hosts","depth":2,"text":"Config aliases for #SSH hosts"}]}},"_type":"markdown","_id":"content:Linux:SSH.md","_source":"content","_file":"Linux/SSH.md","_extension":"md"},{"_path":"/sql/mysql-and-mariadb-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"MySQL And MariaDB Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"...\nbind-address = 0.0.0.0\n...\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FLUSH PRIVILEGES;\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"sudo apt install mariadb-server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"sudo mysql_secure_installation"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"bind-"}]},{"type":"element","tag":"span","props":{"class":"ct-96f3dd"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":" = 0.0.0.0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FLUSH PRIVILEGES;"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-96f3dd{color:#FF7B72}.ct-4fe866{color:#C9D1D9}.light .ct-4fe866{color:#657B83}.light .ct-96f3dd{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-mariadb-on-ubuntu-2004-lts","depth":2,"text":"Install MariaDB on Ubuntu 20.04 LTS"},{"id":"access-database-from-outside","depth":2,"text":"Access Database from outside"},{"id":"create-administrative-user","depth":2,"text":"Create Administrative User"}]}},"_type":"markdown","_id":"content:SQL:MySQL and MariaDB setup.md","_source":"content","_file":"SQL/MySQL and MariaDB setup.md","_extension":"md"},{"_path":"/sql/postgress-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Postgress Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"local   all             postgres                                md5\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo systemctl restart postgresql\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo systemctl status postgresql.service"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo -u postgres psql"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"Type "}]},{"type":"element","tag":"span","props":{"class":"ct-ac5306"},"children":[{"type":"text","value":"\"help\""}]},{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b2131c"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":" help."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"postgres="}]},{"type":"element","tag":"span","props":{"class":"ct-762d70"},"children":[{"type":"text","value":"#"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5c976"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"   all             postgres                                peer"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"local   all             postgres                                md5"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo systemctl restart postgresql"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d5c976{color:#FF7B72}.ct-762d70{color:#8B949E}.ct-b2131c{color:#FF7B72}.ct-ac5306{color:#A5D6FF}.ct-75e384{color:#C9D1D9}.light .ct-75e384{color:#657B83}.light .ct-ac5306{color:#2AA198}.light .ct-b2131c{color:#859900}.light .ct-762d70{color:#93A1A1}.light .ct-d5c976{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-postgresql-12-on-ubuntu-2004-lts","depth":2,"text":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"},{"id":"initial-database-connection","depth":2,"text":"Initial database connection"},{"id":"set-password-for-postgres-database-user","depth":2,"text":"Set password for postgres database user","children":[{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password","depth":3,"text":"Update pg_hba.conf to allow postgres user connections with password"}]},{"id":"creation-of-additional-database-users","depth":2,"text":"Creation of additional database users"},{"id":"creation-of-additional-databases","depth":2,"text":"Creation of additional databases"}]}},"_type":"markdown","_id":"content:SQL:Postgress setup.md","_source":"content","_file":"SQL/Postgress setup.md","_extension":"md"},{"_path":"/typescript/add-global-variable-to-window","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Add Global Variable To Window","description":"Sometimes you want to add global variable to your window. That thing's called global module augmentation.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"global"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93f845"},"children":[{"type":"text","value":"Window"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b93f44"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// Sample.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93f845"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// nothing :-)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// fancyThings.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93f845"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b93f44"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./fancyThings\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a422a6"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"(); "}]},{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// ok"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-a422a6{color:#79C0FF}.ct-42f354{color:#A5D6FF}.ct-d2a63c{color:#8B949E}.ct-b93f44{color:#79C0FF}.ct-681d7e{color:#FF7B72}.ct-c998a9{color:#D2A8FF}.ct-93f845{color:#FFA657}.ct-aa5074{color:#C9D1D9}.ct-a49f6e{color:#C9D1D9}.ct-1ecf29{color:#FF7B72}.light .ct-1ecf29{color:#073642}.light .ct-a49f6e{color:#657B83}.light .ct-aa5074{color:#268BD2}.light .ct-93f845{color:#268BD2}.light .ct-c998a9{color:#268BD2}.light .ct-681d7e{color:#859900}.light .ct-b93f44{color:#859900}.light .ct-d2a63c{color:#93A1A1}.light .ct-42f354{color:#2AA198}.light .ct-a422a6{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"augmenting-existing-interface","depth":2,"text":"Augmenting existing interface"}]}},"_type":"markdown","_id":"content:Typescript:Add global variable to window.md","_source":"content","_file":"Typescript/Add global variable to window.md","_extension":"md"},{"_path":"/typescript/flatten-object-with-periods","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Flatten Object With Periods","description":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'./en.json'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"typeof"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3c112b"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae19b1"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35880f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f0e7aa"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-35880f"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-894712"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f0e7aa"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-35880f"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-894712"},"children":[{"type":"text","value":"TranslateOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-3c112b"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"I18nLib"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c2ecc5"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// plural object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"''"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" { ["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"-?:"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]>> }["}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// Fix it for you plural form"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'one'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'few'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'many'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"}${''"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'.'}${"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"4"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":">];"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-3d66f1{color:#A5D6FF}.ct-62e845{color:#79C0FF}.ct-d16a4a{color:#79C0FF}.ct-5413fc{color:#8B949E}.ct-c2ecc5{color:#D2A8FF}.ct-894712{color:#FFA657}.ct-f0e7aa{color:#FFA657}.ct-35880f{color:#FF7B72}.ct-ae19b1{color:#D2A8FF}.ct-204eca{color:#C9D1D9}.ct-3c112b{color:#FF7B72}.ct-30ff73{color:#FFA657}.ct-86b04a{color:#FF7B72}.ct-222f42{color:#A5D6FF}.ct-c00405{color:#C9D1D9}.ct-ff8763{color:#C9D1D9}.ct-8087a0{color:#FF7B72}.light .ct-8087a0{color:#859900}.light .ct-ff8763{color:#657B83}.light .ct-c00405{color:#268BD2}.light .ct-222f42{color:#2AA198}.light .ct-86b04a{color:#073642}.light .ct-30ff73{color:#268BD2}.light .ct-3c112b{color:#073642}.light .ct-204eca{color:#657B83}.light .ct-ae19b1{color:#268BD2}.light .ct-35880f{color:#859900}.light .ct-f0e7aa{color:#657B83}.light .ct-894712{color:#268BD2}.light .ct-c2ecc5{color:#268BD2}.light .ct-5413fc{color:#93A1A1}.light .ct-d16a4a{color:#859900}.light .ct-62e845{color:#D33682}.light .ct-3d66f1{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Flatten object with periods.md","_source":"content","_file":"Typescript/Flatten object with periods.md","_extension":"md"},{"_path":"/typescript/type-guards","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Type Guards","description":"Useful for type checking at compile and run time:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a52ad5"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936a43"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9de1e3"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f0d0d"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f0d0d"},"children":[{"type":"text","value":"Bird"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9de1e3"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":"is"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f0d0d"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-efe19e"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"!=="}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d876"},"children":[{"type":"text","value":"undefined"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3520d8"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8ce90e"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"getSmallPet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"fly"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-e27096{color:#D2A8FF}.ct-8ce90e{color:#79C0FF}.ct-3520d8{color:#FF7B72}.ct-c8d876{color:#79C0FF}.ct-efe19e{color:#FFA657}.ct-49b21f{color:#C9D1D9}.ct-f00ca3{color:#FF7B72}.ct-023d5e{color:#C9D1D9}.ct-0f0d0d{color:#FFA657}.ct-7a0cdc{color:#FF7B72}.ct-9de1e3{color:#FFA657}.ct-936a43{color:#D2A8FF}.ct-efe60f{color:#C9D1D9}.ct-a52ad5{color:#FF7B72}.light .ct-a52ad5{color:#073642}.light .ct-efe60f{color:#657B83}.light .ct-936a43{color:#268BD2}.light .ct-9de1e3{color:#657B83}.light .ct-7a0cdc{color:#859900}.light .ct-0f0d0d{color:#268BD2}.light .ct-023d5e{color:#657B83}.light .ct-f00ca3{color:#859900}.light .ct-49b21f{color:#268BD2}.light .ct-efe19e{color:#268BD2}.light .ct-c8d876{color:#B58900}.light .ct-3520d8{color:#073642}.light .ct-8ce90e{color:#268BD2}.light .ct-e27096{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Type guards.md","_source":"content","_file":"Typescript/Type guards.md","_extension":"md"}],"navigation":[{"title":"Blockchain","_path":"/blockchain","children":[{"title":"Common Typescript Examples","_path":"/blockchain/common-typescript-examples"},{"title":"Smart Contracts","_path":"/blockchain/smart-contracts"}]},{"title":"Css","_path":"/css","children":[{"title":"Automatic Grid Like Masonry With Pure CSS","_path":"/css/automatic-grid-like-masonry-with-pure-css"},{"title":"Sass Nth Child Iterate Mixin","_path":"/css/sass-nth-child-iterate-mixin"},{"title":"Test If Browser Supports CSS Rules","_path":"/css/test-if-browser-supports-css-rules"}]},{"title":"Docker","_path":"/docker","children":[{"title":"Building Static Pages With Docker","_path":"/docker/building-static-pages-with-docker"},{"title":"Drone Ci","_path":"/docker/drone-ci"},{"title":"Github Pages With Drone Ci","_path":"/docker/github-pages-with-drone-ci"},{"title":"Private Docker Registry","_path":"/docker/private-docker-registry"},{"title":"Refresh Containers On Pull","_path":"/docker/refresh-containers-on-pull"},{"title":"Seed Dump Inside Docker","_path":"/docker/seed-dump-inside-docker"},{"title":"Wait For Mysql","_path":"/docker/wait-for-mysql"},{"title":"Wait For Redis","_path":"/docker/wait-for-redis"}]},{"title":"Frontend","_path":"/frontend","children":[{"title":"React Native","_path":"/frontend/react-native","children":[{"title":"OAuth2 Login","_path":"/frontend/react-native/oauth2-login"},{"title":"Preserve FlatList Scroll Position In React Native","_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native"},{"title":"Useful Comands","_path":"/frontend/react-native/useful-comands"}]},{"title":"React","_path":"/frontend/react","children":[{"title":"Axios Refresh Token On React","_path":"/frontend/react/axios-refresh-token-on-react"},{"title":"Axios With AbortController","_path":"/frontend/react/axios-with-abortcontroller"}]},{"title":"Vue","_path":"/frontend/vue","children":[{"title":"Adding Global Properties To Component","_path":"/frontend/vue/adding-global-properties-to-component"},{"title":"Make Nuxt Handle Obsidian Highlights","_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights"}]}]},{"title":"Git","_path":"/git","children":[{"title":"Force Git To Use HTTPS","_path":"/git/force-git-to-use-https"},{"title":"Git Aliases And Useful Commands","_path":"/git/git-aliases-and-useful-commands"}]},{"title":"Graphql","_path":"/graphql","children":[{"title":"Apollo Client Pagination","_path":"/graphql/apollo-client-pagination"},{"title":"Refresh Token In Apollo Client","_path":"/graphql/refresh-token-in-apollo-client"}]},{"title":"Linux","_path":"/linux","children":[{"title":"Gitea For Git Hosting","_path":"/linux/gitea-for-git-hosting"},{"title":"Google Photos Alternative With Photoprism","_path":"/linux/google-photos-alternative-with-photoprism"},{"title":"Resume Or Start Screen Session","_path":"/linux/resume-or-start-screen-session"},{"title":"Rsync File With SSH","_path":"/linux/rsync-file-with-ssh"},{"title":"Setting Up NGINX","_path":"/linux/setting-up-nginx"},{"title":"SSH","_path":"/linux/ssh"}]},{"title":"Sql","_path":"/sql","children":[{"title":"MySQL And MariaDB Setup","_path":"/sql/mysql-and-mariadb-setup"},{"title":"Postgress Setup","_path":"/sql/postgress-setup"}]},{"title":"Typescript","_path":"/typescript","children":[{"title":"Add Global Variable To Window","_path":"/typescript/add-global-variable-to-window"},{"title":"Flatten Object With Periods","_path":"/typescript/flatten-object-with-periods"},{"title":"Type Guards","_path":"/typescript/type-guards"}]}]}
\ No newline at end of file
+{"generatedAt":1667813358882,"generateTime":66,"contents":[{"_path":"/blockchain/common-typescript-examples","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Common Typescript Examples","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// URL of your node"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://...'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-619167"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c88325"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-388d87"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-c88325"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e5bd8a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// first we need to authorize"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// then we can get wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getCurrentAddressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getTransactionCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      gasLimit: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      nonce: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"EthUtil"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"Transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"sign"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"serialize"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"this"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"`0x${"}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-255b39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-255b39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'hex'"}]},{"type":"element","tag":"span","props":{"class":"ct-255b39"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"estimateFee"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"asciiToHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    })."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"fromWei"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-bba616"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"())"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"multiply"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-bba616"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"()))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'accountsChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'chainChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"handler"}]},{"type":"element","tag":"span","props":{"class":"ct-9c2fa8"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'wallet_watchAsset'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    params: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      type: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ERC20'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      options: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        address: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'FOO'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-b2d291"},"children":[{"type":"text","value":"18"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        image: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://foo.io/token-image.svg'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-619167"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-388d87"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'FOO successfully added to wallet!'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bba616"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'Something went wrong.'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getChainID"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'eth_chainId'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'wallet_switchEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    params: [{ chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" }], "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"switchError"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// This error code indicates that the chain has not been added to MetaMask."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b2d291"},"children":[{"type":"text","value":"4902"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'wallet_addEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        params: [{ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          chainName: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'Ropsten Test Network'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          nativeCurrency: { "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"              name: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"              symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"              decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-b2d291"},"children":[{"type":"text","value":"18"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          }, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          rpcUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"], "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          blockExplorerUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://ropsten.etherscan.io'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        }] ,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"addError"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// handle \"add\" error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// handle other \"switch\" errors"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b2d291{color:#79C0FF}.ct-9c2fa8{color:#C9D1D9}.ct-bba616{color:#79C0FF}.ct-255b39{color:#A5D6FF}.ct-e5bd8a{color:#79C0FF}.ct-388d87{color:#FFA657}.ct-c88325{color:#FF7B72}.ct-619167{color:#D2A8FF}.ct-001a1d{color:#C9D1D9}.ct-83b2aa{color:#FF7B72}.ct-76c663{color:#D2A8FF}.ct-a3bc7b{color:#79C0FF}.ct-51348d{color:#FF7B72}.ct-09d035{color:#8B949E}.ct-df7cba{color:#A5D6FF}.ct-4a3086{color:#C9D1D9}.ct-a39e24{color:#C9D1D9}.ct-8e8040{color:#FF7B72}.light .ct-8e8040{color:#859900}.light .ct-a39e24{color:#657B83}.light .ct-4a3086{color:#268BD2}.light .ct-df7cba{color:#2AA198}.light .ct-09d035{color:#93A1A1}.light .ct-51348d{color:#073642}.light .ct-a3bc7b{color:#268BD2}.light .ct-76c663{color:#268BD2}.light .ct-83b2aa{color:#073642}.light .ct-001a1d{color:#657B83}.light .ct-619167{color:#268BD2}.light .ct-c88325{color:#859900}.light .ct-388d87{color:#657B83}.light .ct-e5bd8a{color:#859900}.light .ct-255b39{color:#657B83}.light .ct-bba616{color:#859900}.light .ct-9c2fa8{color:#859900}.light .ct-b2d291{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"connecting-to-node","depth":2,"text":"Connecting to node"},{"id":"getting-wallet-balance","depth":2,"text":"Getting wallet balance"},{"id":"getting-wallet-address","depth":2,"text":"Getting wallet address"},{"id":"sending-transaction","depth":2,"text":"Sending transaction"},{"id":"estimating-transaction-fee","depth":2,"text":"Estimating transaction FEE"},{"id":"subscribing-to-wallet-address-change","depth":2,"text":"Subscribing to wallet address change"},{"id":"watching-network-change","depth":2,"text":"Watching network change"},{"id":"adding-custom-token-to-wallet","depth":2,"text":"Adding custom token to wallet"},{"id":"changing-network-to-custom","depth":2,"text":"Changing network to custom"}]}},"_type":"markdown","_id":"content:Blockchain:Common typescript examples.md","_source":"content","_file":"Blockchain/Common typescript examples.md","_extension":"md"},{"_path":"/blockchain/smart-contracts","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Smart Contracts","description":"For common functions see Common typescript examples.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'web3-eth-contract'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"abi"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a88101"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9a0108"},"children":[{"type":"text","value":"JSON"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a88101"},"children":[{"type":"text","value":"parse"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// ABI of contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// address for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ({}) "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// Calling write method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// authorizing with Metamask"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// getting wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// calling \"store\" store method for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// payload should include `from` address, that matches"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// current user's wallet"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'Parameter'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"send"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      from: "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6be8ce"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// calling read method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// this method can return data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"retrieve"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6be8ce"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// ABI контракта"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// contract address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// account's private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// write-methods requires private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"privateKeyToAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      to: "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"encodeABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      gas: "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"({ from: "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"signTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"rawTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"requests"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"balanceOf"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getStaked"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"call"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  ]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"any"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"[]) "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getWeb3NoAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"BatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"map"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"add"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"            } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"execute"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6be8ce"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"all"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4eb4f"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'YOUR_RPC_ENDPOINT_HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'YOUR ABI HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'YOUR CONTRACT ADDRESS HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"referralProgramContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"events"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"RegisterUser"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-88fe7c"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"`| UserRegistered | events | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"boolean"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b7056"},"children":[{"type":"text","value":"RegisterUserResponseInterface"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    }) "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"`| ONCE | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-88fe7c"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b7056"},"children":[{"type":"text","value":"ErrnoException"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        value: [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"events"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    address: ["}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'address-1'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'address-2'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"],    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"//Only get events from specific addresses"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    topics: []                              "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"//What topics to subscribe to"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'logs'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"nr"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"//example options(optional)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// only get events where transfer value was 1000 or 1337"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        value: ["}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'1000'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'1337'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"]    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// number | \"earliest\" | \"pending\" | \"latest\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":",                  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    toBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'latest'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getPastEvents"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'Transfer'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"results"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0b7056{color:#FFA657}.ct-88fe7c{color:#A5D6FF}.ct-f4eb4f{color:#79C0FF}.ct-6be8ce{color:#79C0FF}.ct-5d0b1c{color:#79C0FF}.ct-3a4cb4{color:#79C0FF}.ct-050e10{color:#FF7B72}.ct-5fbbf4{color:#8B949E}.ct-792f31{color:#FFA657}.ct-1b2dd4{color:#D2A8FF}.ct-9a0108{color:#79C0FF}.ct-a88101{color:#79C0FF}.ct-19af27{color:#79C0FF}.ct-4104ed{color:#FFA657}.ct-db30a0{color:#FF7B72}.ct-12b01c{color:#D2A8FF}.ct-c2cf18{color:#C9D1D9}.ct-bbc798{color:#FF7B72}.ct-79e8f5{color:#A5D6FF}.ct-f50cca{color:#C9D1D9}.ct-241f90{color:#C9D1D9}.ct-903217{color:#FF7B72}.light .ct-903217{color:#859900}.light .ct-241f90{color:#657B83}.light .ct-f50cca{color:#268BD2}.light .ct-79e8f5{color:#2AA198}.light .ct-bbc798{color:#073642}.light .ct-c2cf18{color:#657B83}.light .ct-12b01c{color:#268BD2}.light .ct-db30a0{color:#859900}.light .ct-4104ed{color:#657B83}.light .ct-19af27{color:#859900}.light .ct-a88101{color:#268BD2}.light .ct-9a0108{color:#657B83}.light .ct-1b2dd4{color:#268BD2}.light .ct-792f31{color:#657B83}.light .ct-5fbbf4{color:#93A1A1}.light .ct-050e10{color:#073642}.light .ct-3a4cb4{color:#268BD2}.light .ct-5d0b1c{color:#D33682}.light .ct-6be8ce{color:#859900}.light .ct-f4eb4f{color:#B58900}.light .ct-88fe7c{color:#2AA198}.light .ct-0b7056{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"getting-smart-contract-instance","depth":2,"text":"Getting smart contract instance"},{"id":"executing-contract-method","depth":2,"text":"Executing contract method","children":[{"id":"example-for-metamask-without-private-key","depth":3,"text":"Example for #Metamask without private key"},{"id":"nodejs-and-react-native-example","depth":3,"text":"Node.js and React Native example"},{"id":"calling-a-batch-of-contracts-methods","depth":3,"text":"Calling a batch of contract's methods"}]},{"id":"subscribing-to-smart-contract-events","depth":2,"text":"Subscribing to smart contract events","children":[{"id":"by-accessing-contractevents","depth":3,"text":"By accessing contract.events"},{"id":"with-filtering","depth":3,"text":"With filtering"},{"id":"common-subscribe-method","depth":3,"text":"Common Subscribe method"},{"id":"getting-event-history","depth":3,"text":"Getting event history"}]}]}},"_type":"markdown","_id":"content:Blockchain:Smart contracts.md","_source":"content","_file":"Blockchain/Smart contracts.md","_extension":"md"},{"_path":"/css/automatic-grid-like-masonry-with-pure-css","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Automatic Grid Like Masonry With Pure CSS","description":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-60df50"},"children":[{"type":"text","value":"$cell: "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"250"}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-60df50"},"children":[{"type":"text","value":"$gap: "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"20"}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".grid"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"display"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-55848a"},"children":[{"type":"text","value":"grid"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-template-columns"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-468a72"},"children":[{"type":"text","value":"repeat"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"auto-fit"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-468a72"},"children":[{"type":"text","value":"minmax"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"$cell"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6d144f"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-f3f734"},"children":[{"type":"text","value":"fr"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-auto-rows"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"256"}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-auto-flow"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-55848a"},"children":[{"type":"text","value":"row"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-55848a"},"children":[{"type":"text","value":"dense"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-column-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-row-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".h-2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// takes 2 columns"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-column-end"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".v-2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// takes 2 rows"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-row-end"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".full-width"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// height: 1 row"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".top-right"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// height here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"-2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// width here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ff566b{color:#8B949E}.ct-cabec8{color:#79C0FF}.ct-f3f734{color:#FF7B72}.ct-6d144f{color:#79C0FF}.ct-9985a3{color:#FFA657}.ct-468a72{color:#79C0FF}.ct-55848a{color:#79C0FF}.ct-19a0e1{color:#79C0FF}.ct-501742{color:#C9D1D9}.ct-e6dec3{color:#79C0FF}.ct-db3ba3{color:#C9D1D9}.ct-d0d996{color:#FF7B72}.ct-cf588b{color:#79C0FF}.ct-60df50{color:#FFA657}.light .ct-60df50{color:#657B83}.light .ct-cf588b{color:#D33682}.light .ct-d0d996{color:#859900}.light .ct-db3ba3{color:#657B83}.light .ct-e6dec3{color:#93A1A1}.light .ct-501742{color:#657B83}.light .ct-19a0e1{color:#859900}.light .ct-55848a{color:#657B83}.light .ct-468a72{color:#268BD2}.light .ct-9985a3{color:#657B83}.light .ct-6d144f{color:#D33682}.light .ct-f3f734{color:#859900}.light .ct-cabec8{color:#859900}.light .ct-ff566b{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"basic-elements-with-double-height-or-width","depth":3,"text":"Basic elements with double height or width"},{"id":"header-that-fills-all-columns","depth":3,"text":"Header, that fills all columns"},{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner","depth":3,"text":"Stamp element, that takes 3 rows in the top right corner"}]}},"_type":"markdown","_id":"content:CSS:Automatic Grid like Masonry with pure CSS.md","_source":"content","_file":"CSS/Automatic Grid like Masonry with pure CSS.md","_extension":"md"},{"_path":"/css/sass-nth-child-iterate-mixin","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Sass Nth Child Iterate Mixin","description":"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-45fe09"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08c8db"},"children":[{"type":"text","value":"color-per-child"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-45fe09"},"children":[{"type":"text","value":"@each"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45fe09"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-008a23"},"children":[{"type":"text","value":"&"}]},{"type":"element","tag":"span","props":{"class":"ct-48488b"},"children":[{"type":"text","value":":nth-child"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"#{"}]},{"type":"element","tag":"span","props":{"class":"ct-bf6575"},"children":[{"type":"text","value":"index"}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"(($colors), ($color))}"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-67dee1"},"children":[{"type":"text","value":"color"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-15b6b2"},"children":[{"type":"text","value":".item"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f24731"},"children":[{"type":"text","value":"@include"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e5b384"},"children":[{"type":"text","value":"color_per_child"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#ded187"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#dbde87"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#bade87"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#9cde87"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#87deaa"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-47d767{color:#79C0FF}.ct-e5b384{color:#D2A8FF}.ct-f24731{color:#FF7B72}.ct-15b6b2{color:#79C0FF}.ct-6df2db{color:#C9D1D9}.ct-67dee1{color:#79C0FF}.ct-bf6575{color:#79C0FF}.ct-48488b{color:#79C0FF}.ct-008a23{color:#7EE787}.ct-cbc8ea{color:#FFA657}.ct-08c8db{color:#D2A8FF}.ct-b3994d{color:#C9D1D9}.ct-45fe09{color:#FF7B72}.light .ct-45fe09{color:#859900}.light .ct-b3994d{color:#657B83}.light .ct-08c8db{color:#268BD2}.light .ct-cbc8ea{color:#657B83}.light .ct-008a23{color:#268BD2}.light .ct-48488b{color:#93A1A1}.light .ct-bf6575{color:#268BD2}.light .ct-67dee1{color:#859900}.light .ct-6df2db{color:#657B83}.light .ct-15b6b2{color:#93A1A1}.light .ct-f24731{color:#859900}.light .ct-e5b384{color:#268BD2}.light .ct-47d767{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Sass nth-child iterate mixin.md","_source":"content","_file":"CSS/Sass nth-child iterate mixin.md","_extension":"md"},{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9b82ea"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-779814"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-846a54"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-a2e8fa"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d92fbb"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-389c2d"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-852845"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c3ae60"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-fde8f9"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-ecf355"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-9b82ea"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-779814"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-846a54"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"  ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ecf355{color:#79C0FF}.ct-fde8f9{color:#FF7B72}.ct-c3ae60{color:#79C0FF}.ct-852845{color:#79C0FF}.ct-389c2d{color:#79C0FF}.ct-4a352c{color:#C9D1D9}.ct-d92fbb{color:#D2A8FF}.ct-a2e8fa{color:#7EE787}.ct-846a54{color:#79C0FF}.ct-779814{color:#79C0FF}.ct-9b82ea{color:#79C0FF}.ct-924852{color:#C9D1D9}.ct-0285b8{color:#FF7B72}.light .ct-0285b8{color:#859900}.light .ct-924852{color:#657B83}.light .ct-9b82ea{color:#859900}.light .ct-779814{color:#268BD2}.light .ct-846a54{color:#D33682}.light .ct-a2e8fa{color:#268BD2}.light .ct-d92fbb{color:#268BD2}.light .ct-4a352c{color:#657B83}.light .ct-389c2d{color:#859900}.light .ct-852845{color:#268BD2}.light .ct-c3ae60{color:#D33682}.light .ct-fde8f9{color:#859900}.light .ct-ecf355{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"},{"_path":"/docker/building-static-pages-with-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Building Static Pages With Docker","description":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Building static pages with Docker.md","_source":"content","_file":"Docker/Building static pages with Docker.md","_extension":"md"},{"_path":"/docker/drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Drone Ci","description":"Can be used with Private docker registry to deploy things using #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"drone repo update $1 --trusted=true && drone repo info $1\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"build-master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"plugins/docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"when"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"branch"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"dockerfile"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"Dockerfile"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"tag"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"${DRONE_BRANCH}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"global_docker_login"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"global_docker_password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"global_docker_registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"repo"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"docker_repo"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"drone"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone/drone:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_SERVER_HOST=drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_SERVER_PROTO=https"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_TLS_AUTOCERT=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_LOGS_DEBUG=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_LOGS_TRACE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"./data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"8090:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"drone-agent"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone__agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone/agent:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_RPC_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-229b76"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" DRONE_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-229b76"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" DRONE_TOKEN=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"drone info"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"drone repo update "}]},{"type":"element","tag":"span","props":{"class":"ct-e8532e"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-53bf39"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" --trusted=true "}]},{"type":"element","tag":"span","props":{"class":"ct-d2e356"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" drone repo info "}]},{"type":"element","tag":"span","props":{"class":"ct-e8532e"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-53bf39"},"children":[{"type":"text","value":"1"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d2e356{color:#FF7B72}.ct-53bf39{color:#C9D1D9}.ct-e8532e{color:#C9D1D9}.ct-229b76{color:#FF7B72}.ct-b66a67{color:#A5D6FF}.ct-baa1fd{color:#C9D1D9}.ct-c02afb{color:#7EE787}.light .ct-c02afb{color:#268BD2}.light .ct-baa1fd{color:#657B83}.light .ct-b66a67{color:#2AA198}.light .ct-229b76{color:#073642}.light .ct-e8532e{color:#859900}.light .ct-53bf39{color:#268BD2}.light .ct-d2e356{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"pushing-to-private-docker_registry","depth":2,"text":"Pushing to private docker_registry"},{"id":"docker-compose-file-for-drone-ci","depth":2,"text":"Docker-compose file for drone-ci"},{"id":"caching-builds","depth":2,"text":"Caching builds"},{"id":"get-user-info","depth":2,"text":"Get user info"},{"id":"mark-user-as-trusted","depth":2,"text":"Mark user as trusted"}]}},"_type":"markdown","_id":"content:Docker:Drone-ci.md","_source":"content","_file":"Docker/Drone-ci.md","_extension":"md"},{"_path":"/docker/github-pages-with-drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Github Pages With Drone Ci","description":"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"node:16"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"commands"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"yarn"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"yarn generate"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"rm -rf ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"mv ./.output/public ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"touch ./docs/.nojekyll"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"publish"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"plugins/gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"target_branch"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"github_username"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"github_token"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0342ff{color:#A5D6FF}.ct-a732cc{color:#C9D1D9}.ct-0386c3{color:#7EE787}.light .ct-0386c3{color:#268BD2}.light .ct-a732cc{color:#657B83}.light .ct-0342ff{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"additional-reading","depth":2,"text":"Additional reading"}]}},"_type":"markdown","_id":"content:Docker:Github pages with drone-ci.md","_source":"content","_file":"Docker/Github pages with drone-ci.md","_extension":"md"},{"_path":"/docker/private-docker-registry","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Private Docker Registry","description":"Suitable to work with Drone-ci for hosting private #docker images.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --entrypoint htpasswd registry:2 \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  -Bbn user mypassword "}]},{"type":"element","tag":"span","props":{"class":"ct-fdaae7"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":" auth/registry.password"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"docker__registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"registry:2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"5000:5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_AUTH=htpasswd"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_HTTP_SECRET=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"./registry/auth:/auth"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"./registry/data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"ui"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"docker__ui"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"parabuzzle/craneoperator:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"80:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_HOST=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_PORT=5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_PROTOCOL=http"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"ALLOW_REGISTRY_LOGIN=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_ALLOW_DELETE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"USERNAME=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"PASSWORD=password"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-03b34e"},"children":[{"type":"text","value":"# Try this first"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --rm anoxis/registry-cli \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  -r https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  -l user:password \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --delete \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --num 2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-03b34e"},"children":[{"type":"text","value":"# Then this "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"docker run -it \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -v /path/to/registry/data:/registry \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -e REGISTRY_URL=https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -e DRY_RUN="}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -e REGISTRY_AUTH="}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"\"user:password\""}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    mortensrasmussen/docker-registry-manifest-cleanup"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-03b34e{color:#8B949E}.ct-1825ed{color:#A5D6FF}.ct-21d1c7{color:#7EE787}.ct-fdaae7{color:#FF7B72}.ct-47328b{color:#C9D1D9}.light .ct-47328b{color:#657B83}.light .ct-fdaae7{color:#859900}.light .ct-21d1c7{color:#268BD2}.light .ct-1825ed{color:#2AA198}.light .ct-03b34e{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"sample-docker-compose-for-custom-docker-registry","depth":2,"text":"Sample docker-compose for custom docker registry"},{"id":"squash-layers-on-registry","depth":2,"text":"Squash layers on registry"}]}},"_type":"markdown","_id":"content:Docker:Private docker registry.md","_source":"content","_file":"Docker/Private docker registry.md","_extension":"md"},{"_path":"/docker/refresh-containers-on-pull","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Containers On Pull","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"watchtower"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"docker__watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"v2tec/watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"/home/user/.docker/config.json:/config.json"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"--interval 60 image_1 image_2"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-4ffe1b{color:#A5D6FF}.ct-66e287{color:#C9D1D9}.ct-f168d1{color:#7EE787}.light .ct-f168d1{color:#268BD2}.light .ct-66e287{color:#657B83}.light .ct-4ffe1b{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-watchtower","depth":2,"text":"Setting up watchtower"}]}},"_type":"markdown","_id":"content:Docker:Refresh containers on pull.md","_source":"content","_file":"Docker/Refresh containers on pull.md","_extension":"md"},{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-90172d"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-90172d"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-90172d"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-c1bb7b"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-c1bb7b"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-c1bb7b"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ea43c"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-216f2b"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-216f2b{color:#79C0FF}.ct-6ea43c{color:#FF7B72}.ct-c1bb7b{color:#A5D6FF}.ct-a3bf04{color:#C9D1D9}.ct-99cdf2{color:#C9D1D9}.ct-38509b{color:#C9D1D9}.ct-90172d{color:#8B949E}.light .ct-90172d{color:#93A1A1}.light .ct-38509b{color:#657B83}.light .ct-99cdf2{color:#859900}.light .ct-a3bf04{color:#268BD2}.light .ct-c1bb7b{color:#2AA198}.light .ct-6ea43c{color:#859900}.light .ct-216f2b{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"},{"_path":"/docker/wait-for-mysql","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Mysql","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-593766"},"children":[{"type":"text","value":"# Waits for mysql to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-234572"},"children":[{"type":"text","value":"wait_for_mysql"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  query="}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\"SELECT count(*) FROM users\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-593766"},"children":[{"type":"text","value":"# 3 minutes limit"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-87dfaf"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" mysql --user="}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" -e "}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-d4f923"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-87dfaf"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\"[Error] can't properly query MySQL after "}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-87dfaf"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-593766"},"children":[{"type":"text","value":"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d4f923{color:#79C0FF}.ct-90daab{color:#C9D1D9}.ct-961af7{color:#C9D1D9}.ct-87dfaf{color:#79C0FF}.ct-d8cd50{color:#FF7B72}.ct-9844eb{color:#A5D6FF}.ct-789078{color:#C9D1D9}.ct-234572{color:#D2A8FF}.ct-593766{color:#8B949E}.light .ct-593766{color:#93A1A1}.light .ct-234572{color:#268BD2}.light .ct-789078{color:#657B83}.light .ct-9844eb{color:#2AA198}.light .ct-d8cd50{color:#859900}.light .ct-87dfaf{color:#268BD2}.light .ct-961af7{color:#859900}.light .ct-90daab{color:#268BD2}.light .ct-d4f923{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for mysql.md","_source":"content","_file":"Docker/Wait for mysql.md","_extension":"md"},{"_path":"/docker/wait-for-redis","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Redis","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bf03e9"},"children":[{"type":"text","value":"# Waits for redis to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a7219d"},"children":[{"type":"text","value":"wait_for_redis"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-bf03e9"},"children":[{"type":"text","value":"# 3 minutes"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-54f348"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" redis-cli -h localhost -p 6379 -a "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" ping "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\"PONG\""}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"/dev/null "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"2>&1;"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-9e4889"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-54f348"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\"[Error] can't properly ping Redis container after "}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-54f348"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bf03e9"},"children":[{"type":"text","value":"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9e4889{color:#79C0FF}.ct-33c468{color:#C9D1D9}.ct-59ad82{color:#C9D1D9}.ct-47dd3f{color:#A5D6FF}.ct-54f348{color:#79C0FF}.ct-8482ac{color:#FF7B72}.ct-ed020c{color:#C9D1D9}.ct-a7219d{color:#D2A8FF}.ct-bf03e9{color:#8B949E}.light .ct-bf03e9{color:#93A1A1}.light .ct-a7219d{color:#268BD2}.light .ct-ed020c{color:#657B83}.light .ct-8482ac{color:#859900}.light .ct-54f348{color:#268BD2}.light .ct-47dd3f{color:#2AA198}.light .ct-59ad82{color:#859900}.light .ct-33c468{color:#268BD2}.light .ct-9e4889{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for redis.md","_source":"content","_file":"Docker/Wait for redis.md","_extension":"md"},{"_path":"/frontend/react-native/oauth2-login","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"OAuth2 Login","description":"Use #oauth2 login with React-Native","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-0a1449"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'react-native-app-auth'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-00a861"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-396058"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  issuer: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'https://accounts.google.com'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}.apps.googleusercontent.com`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`com.yourapp:/oauth2redirect/google`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'openid'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'profile'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e8c56"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"});"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-00a861"},"children":[{"type":"text","value":"// better hide it somehow"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'com.yourapp'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-396058"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  serviceConfiguration: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"    authorizationEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/authorize?response_type=code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}&redirect_uri=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-00a861"},"children":[{"type":"text","value":"// TODO: replace it with your own backend to secure client_secret:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"    tokenEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}&client_secret=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'login:info'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'login:avatar'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e8c56"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-396058"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-0a1449"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0a1449"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1e8c56{color:#79C0FF}.ct-396058{color:#D2A8FF}.ct-00a861{color:#8B949E}.ct-7335a4{color:#79C0FF}.ct-d7da86{color:#FF7B72}.ct-979b43{color:#A5D6FF}.ct-0a1449{color:#C9D1D9}.ct-3e85b2{color:#C9D1D9}.ct-f4335f{color:#FF7B72}.light .ct-f4335f{color:#859900}.light .ct-3e85b2{color:#657B83}.light .ct-0a1449{color:#268BD2}.light .ct-979b43{color:#2AA198}.light .ct-d7da86{color:#073642}.light .ct-7335a4{color:#268BD2}.light .ct-00a861{color:#93A1A1}.light .ct-396058{color:#268BD2}.light .ct-1e8c56{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"common-oauth2-providers","depth":2,"text":"Common OAuth2 providers","children":[{"id":"example-for-google","depth":3,"text":"Example for #Google"},{"id":"example-for-yandex","depth":3,"text":"Example for #Yandex"}]},{"id":"apple-id-login","depth":2,"text":"Apple ID login"}]}},"_type":"markdown","_id":"content:Frontend:React Native:OAuth2 login.md","_source":"content","_file":"Frontend/React Native/OAuth2 login.md","_extension":"md"},{"_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Preserve FlatList Scroll Position In React Native","description":"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-962ae9"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1df086"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"; }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-82b48d"},"children":[{"type":"text","value":"SomeList"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" ({ "}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// set it to `true` before interaction and back to `false` right after"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"NativeSyntheticEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"NativeScrollEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":">) "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"nativeEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"contentOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"y"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c04049"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-82b48d"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7dc0b2"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7dc0b2"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"scrollToOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      offset: "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      animated: "}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// onInteraction wraps interaction to preserve scroll position"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"onInteraction"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    () "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"500"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    ["}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"setSelectedSubThemes"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-87c7b6"},"children":[{"type":"text","value":"FlatList"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// ...required FlatList options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"/>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-87c7b6{color:#FFA657}.ct-7dc0b2{color:#79C0FF}.ct-c04049{color:#79C0FF}.ct-d9dfd6{color:#C9D1D9}.ct-bbd9de{color:#79C0FF}.ct-5e6b92{color:#79C0FF}.ct-b9f460{color:#79C0FF}.ct-c49042{color:#FFA657}.ct-4e09fa{color:#FFA657}.ct-88c97b{color:#FF7B72}.ct-82b48d{color:#D2A8FF}.ct-a5419a{color:#C9D1D9}.ct-cba0df{color:#FF7B72}.ct-1df086{color:#79C0FF}.ct-4702b7{color:#D2A8FF}.ct-35de31{color:#FF7B72}.ct-962ae9{color:#FFA657}.ct-574849{color:#C9D1D9}.ct-5fb3de{color:#FF7B72}.ct-cd0080{color:#8B949E}.light .ct-cd0080{color:#93A1A1}.light .ct-5fb3de{color:#073642}.light .ct-574849{color:#657B83}.light .ct-962ae9{color:#268BD2}.light .ct-35de31{color:#859900}.light .ct-4702b7{color:#268BD2}.light .ct-1df086{color:#859900}.light .ct-cba0df{color:#073642}.light .ct-a5419a{color:#657B83}.light .ct-82b48d{color:#268BD2}.light .ct-88c97b{color:#859900}.light .ct-4e09fa{color:#268BD2}.light .ct-c49042{color:#657B83}.light .ct-b9f460{color:#268BD2}.light .ct-5e6b92{color:#D33682}.light .ct-bbd9de{color:#B58900}.light .ct-d9dfd6{color:#268BD2}.light .ct-c04049{color:#268BD2}.light .ct-7dc0b2{color:#859900}.light .ct-87c7b6{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md","_source":"content","_file":"Frontend/React Native/Preserve FlatList scroll position in React Native.md","_extension":"md"},{"_path":"/frontend/react-native/useful-comands","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Useful Comands","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"adb logcat com.application:I \"*:S\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"keytool -printcert -jarfile \"$1\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"adb logcat com.application:I "}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\"*:S\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"keytool -printcert -jarfile "}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"npx react-native bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --platform android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --dev "}]},{"type":"element","tag":"span","props":{"class":"ct-445c29"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --entry-file index.js \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --bundle-output android/app/src/main/assets/index.android.bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --assets-dest android/app/src/main/res/"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-445c29"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" android "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" ./gradlew assembleDebug"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b49f06"},"children":[{"type":"text","value":"# do your stuff"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"./gradlew clean"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-445c29"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" ./android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" ./gradlew assembleRelease \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" adb install ./app/build/outputs/apk/release/app-release.apk"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b49f06"},"children":[{"type":"text","value":"# ios "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"xcrun simctl openurl booted "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b49f06"},"children":[{"type":"text","value":"# android"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"adb shell am start -W -a android.intent.action.VIEW -d "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"com.application"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"PACKAGE="}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\"com.application\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"adb shell pm set-app-links --package "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"PACKAGE"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" 0 all "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  adb shell pm verify-app-links --re-verify "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"PACKAGE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b49f06{color:#8B949E}.ct-962490{color:#FF7B72}.ct-445c29{color:#79C0FF}.ct-a8ebfa{color:#C9D1D9}.ct-1f82bb{color:#C9D1D9}.ct-bdbf7d{color:#A5D6FF}.ct-0bd10a{color:#C9D1D9}.light .ct-0bd10a{color:#657B83}.light .ct-bdbf7d{color:#2AA198}.light .ct-1f82bb{color:#859900}.light .ct-a8ebfa{color:#268BD2}.light .ct-445c29{color:#268BD2}.light .ct-962490{color:#859900}.light .ct-b49f06{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"show-android-logcat","depth":2,"text":"Show android logcat"},{"id":"get-apks-sha-256","depth":2,"text":"Get .apk's SHA-256"},{"id":"assemble-debug-release-on-android","depth":2,"text":"Assemble debug release on Android"},{"id":"send-release-to-android-device","depth":2,"text":"Send release to Android device"},{"id":"deep-links","depth":2,"text":"Deep links","children":[{"id":"open-deep-links","depth":3,"text":"Open deep links"},{"id":"reverify-links-on-android","depth":3,"text":"Reverify links on Android"}]}]}},"_type":"markdown","_id":"content:Frontend:React Native:Useful comands.md","_source":"content","_file":"Frontend/React Native/Useful comands.md","_extension":"md"},{"_path":"/frontend/react/axios-refresh-token-on-react","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios Refresh Token On React","description":"<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"axios\""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"React"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-658312"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fcc667"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-25aec3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-25aec3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c2e231"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-25aec3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c2e231"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  client: "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e6a4e"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8e6a4e"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  )."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"<() "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":">(() "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-3967a7"},"children":[{"type":"text","value":"// TODO: implement me"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"not implemented\""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-3967a7"},"children":[{"type":"text","value":"// append `access` token to all requests"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"`Bearer ${"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-2b09b3"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-3967a7"},"children":[{"type":"text","value":"// refreshing interceptor"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8c07f5"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9a486a"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"              Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"Bearer \""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"{{ "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" }}"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"        {"}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"</"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useAPI"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9a486a{color:#79C0FF}.ct-8c07f5{color:#79C0FF}.ct-2b09b3{color:#A5D6FF}.ct-3967a7{color:#8B949E}.ct-8e6a4e{color:#FFA657}.ct-401d6b{color:#79C0FF}.ct-ae446b{color:#79C0FF}.ct-1eb103{color:#FF7B72}.ct-3cc3c7{color:#D2A8FF}.ct-c2e231{color:#79C0FF}.ct-25aec3{color:#FF7B72}.ct-7609cd{color:#FFA657}.ct-fcc667{color:#79C0FF}.ct-658312{color:#FFA657}.ct-32b8c3{color:#C9D1D9}.ct-563bf4{color:#FF7B72}.ct-eebfe7{color:#A5D6FF}.ct-83746d{color:#C9D1D9}.ct-ffb1cf{color:#C9D1D9}.ct-c3ad92{color:#FF7B72}.light .ct-c3ad92{color:#859900}.light .ct-ffb1cf{color:#657B83}.light .ct-83746d{color:#268BD2}.light .ct-eebfe7{color:#2AA198}.light .ct-563bf4{color:#073642}.light .ct-32b8c3{color:#657B83}.light .ct-658312{color:#268BD2}.light .ct-fcc667{color:#657B83}.light .ct-7609cd{color:#657B83}.light .ct-25aec3{color:#859900}.light .ct-c2e231{color:#859900}.light .ct-3cc3c7{color:#268BD2}.light .ct-1eb103{color:#073642}.light .ct-ae446b{color:#859900}.light .ct-401d6b{color:#268BD2}.light .ct-8e6a4e{color:#268BD2}.light .ct-3967a7{color:#93A1A1}.light .ct-2b09b3{color:#657B83}.light .ct-8c07f5{color:#D33682}.light .ct-9a486a{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios refresh token on React.md","_source":"content","_file":"Frontend/React/Axios refresh token on React.md","_extension":"md"},{"_path":"/frontend/react/axios-with-abortcontroller","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios With AbortController","description":"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e58c4f"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e58c4f"},"children":[{"type":"text","value":"'axios'"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useGetUsers"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"());"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e58c4f"},"children":[{"type":"text","value":"\"/\""}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-916275"},"children":[{"type":"text","value":"// params and props here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"        signal: "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"signal"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"data"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"abort"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-916275"},"children":[{"type":"text","value":"// controller should be rewritten or all requests will fail"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-916275{color:#8B949E}.ct-786d0a{color:#D2A8FF}.ct-54619d{color:#79C0FF}.ct-607c3e{color:#FF7B72}.ct-e58c4f{color:#A5D6FF}.ct-d898c1{color:#C9D1D9}.ct-fa942d{color:#C9D1D9}.ct-8b8e9a{color:#FF7B72}.light .ct-8b8e9a{color:#859900}.light .ct-fa942d{color:#657B83}.light .ct-d898c1{color:#268BD2}.light .ct-e58c4f{color:#2AA198}.light .ct-607c3e{color:#073642}.light .ct-54619d{color:#268BD2}.light .ct-786d0a{color:#268BD2}.light .ct-916275{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios with AbortController.md","_source":"content","_file":"Frontend/React/Axios with AbortController.md","_extension":"md"},{"_path":"/frontend/vue/adding-global-properties-to-component","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Adding Global Properties To Component","description":"The topic's fully covered in the official documentation and in Add global variable to window.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cfd4ea"},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d02a4e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f9fd34"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d02a4e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9f76f6"},"children":[{"type":"text","value":"'axios'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7904bc"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7904bc"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9f76f6"},"children":[{"type":"text","value":"'vue'"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7904bc"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b4ae5a"},"children":[{"type":"text","value":"ComponentCustomProperties"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-fea5b6"},"children":[{"type":"text","value":"$translate"}]},{"type":"element","tag":"span","props":{"class":"ct-170947"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-de2a30"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-170947"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2d5bd5"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-82a210"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2d5bd5"},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-82a210{color:#FF7B72}.ct-2d5bd5{color:#79C0FF}.ct-de2a30{color:#FFA657}.ct-170947{color:#FF7B72}.ct-fea5b6{color:#D2A8FF}.ct-3f5f3d{color:#C9D1D9}.ct-b4ae5a{color:#FFA657}.ct-7904bc{color:#FF7B72}.ct-9f76f6{color:#A5D6FF}.ct-f9fd34{color:#C9D1D9}.ct-69c0b2{color:#C9D1D9}.ct-d02a4e{color:#FF7B72}.ct-cfd4ea{color:#8B949E}.light .ct-cfd4ea{color:#93A1A1}.light .ct-d02a4e{color:#859900}.light .ct-69c0b2{color:#657B83}.light .ct-f9fd34{color:#268BD2}.light .ct-9f76f6{color:#2AA198}.light .ct-7904bc{color:#073642}.light .ct-b4ae5a{color:#268BD2}.light .ct-3f5f3d{color:#657B83}.light .ct-fea5b6{color:#268BD2}.light .ct-170947{color:#859900}.light .ct-de2a30{color:#657B83}.light .ct-2d5bd5{color:#859900}.light .ct-82a210{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Adding global properties to component.md","_source":"content","_file":"Frontend/Vue/Adding global properties to component.md","_extension":"md"},{"_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Make Nuxt Handle Obsidian Highlights","description":"By default Nuxt Content Plugin not handling <span class=\"highlight\">highlight</span> links. To fix that we will create Nitro plugin:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e7616"},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8942f2"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8942f2"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d318f7"},"children":[{"type":"text","value":"defineNitroPlugin"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":"((nitroApp) "}]},{"type":"element","tag":"span","props":{"class":"ct-1d2692"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8b69f"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"nitroApp"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"hooks"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef647"},"children":[{"type":"text","value":"hook"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4c47aa"},"children":[{"type":"text","value":"\"content:file:beforeParse\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"_id"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef647"},"children":[{"type":"text","value":"endsWith"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4c47aa"},"children":[{"type":"text","value":"\".md\""}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef647"},"children":[{"type":"text","value":"replace"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-817c63"},"children":[{"type":"text","value":"/==("}]},{"type":"element","tag":"span","props":{"class":"ct-64c297"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"^"}]},{"type":"element","tag":"span","props":{"class":"ct-64c297"},"children":[{"type":"text","value":"=]"}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-817c63"},"children":[{"type":"text","value":")==/"}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"gs"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4c47aa"},"children":[{"type":"text","value":"`<span class=\"highlight\">$1</span>`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"      );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8b69f"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-c8b69f"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-64c297{color:#79C0FF}.ct-817c63{color:#A5D6FF}.ct-1a88aa{color:#FF7B72}.ct-4c47aa{color:#A5D6FF}.ct-6ef647{color:#D2A8FF}.ct-710984{color:#C9D1D9}.ct-bb40ca{color:#C9D1D9}.ct-c8b69f{color:#C9D1D9}.ct-1d2692{color:#FF7B72}.ct-d318f7{color:#D2A8FF}.ct-f01136{color:#FFA657}.ct-8942f2{color:#FF7B72}.ct-2e7616{color:#8B949E}.light .ct-2e7616{color:#93A1A1}.light .ct-8942f2{color:#859900}.light .ct-f01136{color:#657B83}.light .ct-d318f7{color:#268BD2}.light .ct-1d2692{color:#073642}.light .ct-c8b69f{color:#657B83}.light .ct-bb40ca{color:#657B83}.light .ct-710984{color:#268BD2}.light .ct-6ef647{color:#268BD2}.light .ct-4c47aa{color:#2AA198}.light .ct-1a88aa{color:#859900}.light .ct-817c63{color:#D30102}.light .ct-64c297{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md","_source":"content","_file":"Frontend/Vue/Make Nuxt handle Obsidian highlights.md","_extension":"md"},{"_path":"/git/force-git-to-use-https","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Force Git To Use HTTPS","description":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":"[url "}]},{"type":"element","tag":"span","props":{"class":"ct-0aff86"},"children":[{"type":"text","value":"\"https://github.com\""}]},{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":"    insteadOf "}]},{"type":"element","tag":"span","props":{"class":"ct-f985dd"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":" git:"}]},{"type":"element","tag":"span","props":{"class":"ct-09eae1"},"children":[{"type":"text","value":"//github.com"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-09eae1{color:#8B949E}.ct-f985dd{color:#FF7B72}.ct-0aff86{color:#A5D6FF}.ct-5bc9e0{color:#C9D1D9}.light .ct-5bc9e0{color:#657B83}.light .ct-0aff86{color:#2AA198}.light .ct-f985dd{color:#859900}.light .ct-09eae1{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Force git to use HTTPS.md","_source":"content","_file":"Git/Force git to use HTTPS.md","_extension":"md"},{"_path":"/git/git-aliases-and-useful-commands","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Git Aliases And Useful Commands","description":"Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n"}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"[alias]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    flush "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" git clean"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"branches branch "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"v master "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" xargs git branch "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"D"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    lol "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" log "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"oneline "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"graph"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    l "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" lol"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    c "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    cv "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"no"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"verify "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    p "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" push"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    pf "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"force"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"with"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"lease"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    ignore"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"now "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" update"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"index "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"skip"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"worktree"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ca83b5{color:#FF7B72}.ct-e8955a{color:#C9D1D9}.light .ct-e8955a{color:#657B83}.light .ct-ca83b5{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Git aliases and useful commands.md","_source":"content","_file":"Git/Git aliases and useful commands.md","_extension":"md"},{"_path":"/graphql/apollo-client-pagination","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Apollo Client Pagination","description":"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"listItems"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"filter"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"sort"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"limit"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"): "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"input"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-17feeb"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-17feeb"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Item"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Int"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'@apollo/client'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  cache: "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"({ "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-525383"},"children":[{"type":"text","value":"TypePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  Query: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    fields: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// query name"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      listItems: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// apollo will serialize and use keyArgs as unique"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// identifier in cache for every query"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// consider choosing the right fields, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// i.e. limit and offset won't work here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        keyArgs: ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'sort'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// primitive type"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'filter'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", ["}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'name'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'type'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// nested fields of `filter`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        ],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        merge: "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-062754"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c0b017"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-062754"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// no existing data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// If hook was called multiple times"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// merge cache and incoming data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// apply latest result for totalCount"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-c0b017{color:#D2A8FF}.ct-062754{color:#FF7B72}.ct-525383{color:#FFA657}.ct-4ed952{color:#8B949E}.ct-dbd2b0{color:#79C0FF}.ct-b63a22{color:#FF7B72}.ct-009c3c{color:#A5D6FF}.ct-905c16{color:#C9D1D9}.ct-d6b457{color:#FF7B72}.ct-17feeb{color:#79C0FF}.ct-1fd63d{color:#79C0FF}.ct-bd1313{color:#FFA657}.ct-5ee133{color:#C9D1D9}.ct-7fa1a6{color:#D2A8FF}.ct-912659{color:#C9D1D9}.ct-aeb03e{color:#FF7B72}.light .ct-aeb03e{color:#859900}.light .ct-912659{color:#657B83}.light .ct-7fa1a6{color:#268BD2}.light .ct-5ee133{color:#657B83}.light .ct-bd1313{color:#657B83}.light .ct-1fd63d{color:#859900}.light .ct-17feeb{color:#859900}.light .ct-d6b457{color:#859900}.light .ct-905c16{color:#268BD2}.light .ct-009c3c{color:#2AA198}.light .ct-b63a22{color:#073642}.light .ct-dbd2b0{color:#268BD2}.light .ct-4ed952{color:#93A1A1}.light .ct-525383{color:#268BD2}.light .ct-062754{color:#073642}.light .ct-c0b017{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Apollo Client pagination.md","_source":"content","_file":"GraphQL/Apollo Client pagination.md","_extension":"md"},{"_path":"/graphql/refresh-token-in-apollo-client","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Token In Apollo Client","description":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"createApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"authorization"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca0cf6"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"<"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"    { "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  >,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"ApolloClientBase"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    link: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"ApolloLink"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"setContext"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"HttpLink"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        fetch: "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    ]),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca0cf6"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** Checks if GraphQl errors has unauthenticated error */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<{ "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"ErrorCode"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" }>)"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"isArray"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"some"}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-794d9c"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// Distinguish unauthorized error here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** Detects if customFetch is sending refresh request */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"operationName"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"'RefreshToken'"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      { accessToken: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  ) "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Response"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// already refreshing token, wait for it and then use refreshed token"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// or use empty authorization if refreshing failed"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca0cf6"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":">)?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// check for unauthorized errors, if not present, just return result"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          ok: "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"unknown"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// If unauthorized, refresh token and try again"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// can't refresh token. logging out"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// success or any non-auth error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// wait for other request's refreshing query to finish, when retry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1732fc{color:#A5D6FF}.ct-7cfe6b{color:#79C0FF}.ct-794d9c{color:#79C0FF}.ct-ce142c{color:#FFA657}.ct-8e385c{color:#79C0FF}.ct-083158{color:#C9D1D9}.ct-d5484c{color:#8B949E}.ct-ca0cf6{color:#FFA657}.ct-00cc54{color:#FF7B72}.ct-b00082{color:#D2A8FF}.ct-aa3ed2{color:#79C0FF}.ct-569fe7{color:#79C0FF}.ct-c5dc1a{color:#FF7B72}.ct-2bba21{color:#FFA657}.ct-8833d9{color:#C9D1D9}.ct-328f45{color:#D2A8FF}.ct-0a39b4{color:#FF7B72}.ct-fb7a00{color:#C9D1D9}.ct-e0ce90{color:#FF7B72}.light .ct-e0ce90{color:#859900}.light .ct-fb7a00{color:#657B83}.light .ct-0a39b4{color:#073642}.light .ct-328f45{color:#268BD2}.light .ct-8833d9{color:#657B83}.light .ct-2bba21{color:#657B83}.light .ct-c5dc1a{color:#859900}.light .ct-569fe7{color:#859900}.light .ct-aa3ed2{color:#859900}.light .ct-b00082{color:#268BD2}.light .ct-00cc54{color:#073642}.light .ct-ca0cf6{color:#268BD2}.light .ct-d5484c{color:#93A1A1}.light .ct-083158{color:#268BD2}.light .ct-8e385c{color:#B58900}.light .ct-ce142c{color:#268BD2}.light .ct-794d9c{color:#D33682}.light .ct-7cfe6b{color:#268BD2}.light .ct-1732fc{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Refresh token in Apollo client.md","_source":"content","_file":"GraphQL/Refresh token in Apollo client.md","_extension":"md"},{"_path":"/linux/gitea-for-git-hosting","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Gitea For Git Hosting","description":"Self-hosted #git repositories with gitea and #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"gitea"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"external"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-44ee9b"},"children":[{"type":"text","value":"false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"gitea/gitea:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"USER_UID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"USER_GID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"./var/lib/gitea:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"./etc/gitea:/etc/gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"/etc/timezone:/etc/timezone:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"/etc/localtime:/etc/localtime:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"\"3000:3000\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"\"222:22\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-44ee9b{color:#79C0FF}.ct-bf8a5d{color:#A5D6FF}.ct-4ae203{color:#C9D1D9}.ct-6d4af6{color:#7EE787}.light .ct-6d4af6{color:#268BD2}.light .ct-4ae203{color:#657B83}.light .ct-bf8a5d{color:#2AA198}.light .ct-44ee9b{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-with-docker-compose","depth":2,"text":"Setting up with docker-compose"}]}},"_type":"markdown","_id":"content:Linux:Gitea for git hosting.md","_source":"content","_file":"Linux/Gitea for git hosting.md","_extension":"md"},{"_path":"/linux/google-photos-alternative-with-photoprism","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Google Photos Alternative With Photoprism","description":"Photo Prism is a free alternative to Google photos, can be set up with #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"'3.5'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"photoprism"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism__app"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism/photoprism:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"depends_on"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"mariadb"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"2342:2342"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-771931"},"children":[{"type":"text","value":"# HTTP port (host:container)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_ADMIN_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"password\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"https://service.url/\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_ORIGINALS_LIMIT"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-28b1e5"},"children":[{"type":"text","value":"5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_HTTP_COMPRESSION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"gzip\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DEBUG"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"          "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_PUBLIC"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_READONLY"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_EXPERIMENTAL"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CHOWN"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_WEBDAV"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_SETTINGS"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_FACES"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DARKTABLE_PRESETS"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DETECT_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"           "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_UPLOAD_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"true\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"            "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_DRIVER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"       "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_SERVER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"mariadb:3306\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_NAME"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"photoprism\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"root\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"         "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"insecure\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_TITLE"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"PhotoPrism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_CAPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"Browse Your Life\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_DESCRIPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_AUTHOR"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"HOME"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"working_dir"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./data/originals:/photoprism/originals\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./data/imports:/photoprism/import\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./data/storage:/photoprism/storage\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"mariadb"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism__db"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"mariadb:10.6"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./database:/var/lib/mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-771931"},"children":[{"type":"text","value":"# Important, don't remove"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_ROOT_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"insecure"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_DATABASE"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"insecure"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-28b1e5{color:#79C0FF}.ct-771931{color:#8B949E}.ct-94e896{color:#A5D6FF}.ct-0a7899{color:#C9D1D9}.ct-d3d9ac{color:#7EE787}.light .ct-d3d9ac{color:#268BD2}.light .ct-0a7899{color:#657B83}.light .ct-94e896{color:#2AA198}.light .ct-771931{color:#93A1A1}.light .ct-28b1e5{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"docker-compose-file-to-run-it","depth":2,"text":"Docker compose file to run it"}]}},"_type":"markdown","_id":"content:Linux:Google photos alternative with Photoprism.md","_source":"content","_file":"Linux/Google photos alternative with Photoprism.md","_extension":"md"},{"_path":"/linux/resume-or-start-screen-session","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Resume Or Start Screen Session","description":"Running this script will enter currently running screen session or will start new one.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":"( screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-6e070d"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":" ( screen -d bash "}]},{"type":"element","tag":"span","props":{"class":"ct-6e070d"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":" screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-6e070d"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":" screen -SAm bash bash ) )"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6e070d{color:#FF7B72}.ct-ec5763{color:#C9D1D9}.light .ct-ec5763{color:#657B83}.light .ct-6e070d{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Resume or start screen session.md","_source":"content","_file":"Linux/Resume or start screen session.md","_extension":"md"},{"_path":"/linux/rsync-file-with-ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Rsync File With SSH","description":"Downloads file from #SSH with rsync and puts it in current folder.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6afeff"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"PORT=22"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"USER=user"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"HOST=example.com"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"REMOTE_PATH=/tmp"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"REMOTE_FILE=sample.text"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"DEST_PATH=./"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"rsync -a -e "}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\"ssh -p "}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"PORT"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":" -P -v \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"@"}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"HOST"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"REMOTE_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"REMOTE_FILE"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"DEST_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6fbdab{color:#C9D1D9}.ct-f36261{color:#C9D1D9}.ct-092e9e{color:#A5D6FF}.ct-4da16e{color:#C9D1D9}.ct-6afeff{color:#8B949E}.light .ct-6afeff{color:#93A1A1}.light .ct-4da16e{color:#657B83}.light .ct-092e9e{color:#2AA198}.light .ct-f36261{color:#859900}.light .ct-6fbdab{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Rsync file with SSH.md","_source":"content","_file":"Linux/Rsync file with SSH.md","_extension":"md"},{"_path":"/linux/setting-up-nginx","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Setting Up NGINX","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b2aa81"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aaa72d"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# First attempt to serve request as file, then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# as directory, then fall back to displaying a 404."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-23016c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" client_max_body_size "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"200M;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"80;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-33f2c5"},"children":[{"type":"text","value":"301"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" https://next.vault48.org"}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"request_uri"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"[::]:443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# managed by Certbot"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" ssl_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/fullchain.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" ssl_certificate_key "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/privkey.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" ssl_trusted_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/chain.pem;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b2aa81"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aaa72d"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_redirect "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"off;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"Host "}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"host"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"X-Real-IP "}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"remote_addr"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"X-Forwarded-For "}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"proxy_add_x_forwarded_for"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_pass "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"http://127.0.0.1:8080;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-fcbbc9{color:#C9D1D9}.ct-68f237{color:#C9D1D9}.ct-33f2c5{color:#79C0FF}.ct-a62e3a{color:#FF7B72}.ct-23016c{color:#FF7B72}.ct-aaa72d{color:#FFA657}.ct-b2aa81{color:#FF7B72}.ct-de728c{color:#C9D1D9}.ct-812103{color:#8B949E}.ct-0eeca1{color:#C9D1D9}.ct-1605b4{color:#FF7B72}.light .ct-1605b4{color:#073642}.light .ct-0eeca1{color:#657B83}.light .ct-812103{color:#93A1A1}.light .ct-de728c{color:#657B83}.light .ct-b2aa81{color:#073642}.light .ct-aaa72d{color:#657B83}.light .ct-23016c{color:#657B83}.light .ct-a62e3a{color:#859900}.light .ct-33f2c5{color:#D33682}.light .ct-68f237{color:#859900}.light .ct-fcbbc9{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"fallback-url-for-spa-s","depth":2,"text":"Fallback url for SPA-s"},{"id":"set-up-for-uploads","depth":2,"text":"Set up for uploads"},{"id":"reverse-proxy-for-https","depth":2,"text":"Reverse proxy for https"}]}},"_type":"markdown","_id":"content:Linux:Setting up NGINX.md","_source":"content","_file":"Linux/Setting up NGINX.md","_extension":"md"},{"_path":"/linux/ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"SSH","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Host router\n    HostName 192.168.0.1\n    IdentityFile ~/.ssh/id_rsa\n    User root\n    Port 22522"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"config-aliases-for-ssh-hosts","depth":2,"text":"Config aliases for #SSH hosts"}]}},"_type":"markdown","_id":"content:Linux:SSH.md","_source":"content","_file":"Linux/SSH.md","_extension":"md"},{"_path":"/sql/mysql-and-mariadb-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"MySQL And MariaDB Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"...\nbind-address = 0.0.0.0\n...\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FLUSH PRIVILEGES;\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"sudo apt install mariadb-server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"sudo mysql_secure_installation"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"bind-"}]},{"type":"element","tag":"span","props":{"class":"ct-9b603b"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":" = 0.0.0.0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FLUSH PRIVILEGES;"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9b603b{color:#FF7B72}.ct-b86932{color:#C9D1D9}.light .ct-b86932{color:#657B83}.light .ct-9b603b{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-mariadb-on-ubuntu-2004-lts","depth":2,"text":"Install MariaDB on Ubuntu 20.04 LTS"},{"id":"access-database-from-outside","depth":2,"text":"Access Database from outside"},{"id":"create-administrative-user","depth":2,"text":"Create Administrative User"}]}},"_type":"markdown","_id":"content:SQL:MySQL and MariaDB setup.md","_source":"content","_file":"SQL/MySQL and MariaDB setup.md","_extension":"md"},{"_path":"/sql/postgress-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Postgress Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"local   all             postgres                                md5\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo systemctl restart postgresql\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo systemctl status postgresql.service"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo -u postgres psql"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"Type "}]},{"type":"element","tag":"span","props":{"class":"ct-ba5945"},"children":[{"type":"text","value":"\"help\""}]},{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d29114"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":" help."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"postgres="}]},{"type":"element","tag":"span","props":{"class":"ct-fd9161"},"children":[{"type":"text","value":"#"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-635706"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"   all             postgres                                peer"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"local   all             postgres                                md5"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo systemctl restart postgresql"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-635706{color:#FF7B72}.ct-fd9161{color:#8B949E}.ct-d29114{color:#FF7B72}.ct-ba5945{color:#A5D6FF}.ct-5ed0d1{color:#C9D1D9}.light .ct-5ed0d1{color:#657B83}.light .ct-ba5945{color:#2AA198}.light .ct-d29114{color:#859900}.light .ct-fd9161{color:#93A1A1}.light .ct-635706{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-postgresql-12-on-ubuntu-2004-lts","depth":2,"text":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"},{"id":"initial-database-connection","depth":2,"text":"Initial database connection"},{"id":"set-password-for-postgres-database-user","depth":2,"text":"Set password for postgres database user","children":[{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password","depth":3,"text":"Update pg_hba.conf to allow postgres user connections with password"}]},{"id":"creation-of-additional-database-users","depth":2,"text":"Creation of additional database users"},{"id":"creation-of-additional-databases","depth":2,"text":"Creation of additional databases"}]}},"_type":"markdown","_id":"content:SQL:Postgress setup.md","_source":"content","_file":"SQL/Postgress setup.md","_extension":"md"},{"_path":"/typescript/add-global-variable-to-window","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Add Global Variable To Window","description":"Sometimes you want to add global variable to your window. That thing's called global module augmentation.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"global"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1756ee"},"children":[{"type":"text","value":"Window"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bc8811"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// Sample.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1756ee"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// nothing :-)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// fancyThings.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1756ee"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bc8811"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./fancyThings\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99c33c"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"(); "}]},{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// ok"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-99c33c{color:#79C0FF}.ct-f268fe{color:#A5D6FF}.ct-4c7812{color:#8B949E}.ct-bc8811{color:#79C0FF}.ct-cac0bc{color:#FF7B72}.ct-b81177{color:#D2A8FF}.ct-1756ee{color:#FFA657}.ct-27e067{color:#C9D1D9}.ct-022adf{color:#C9D1D9}.ct-ea175a{color:#FF7B72}.light .ct-ea175a{color:#073642}.light .ct-022adf{color:#657B83}.light .ct-27e067{color:#268BD2}.light .ct-1756ee{color:#268BD2}.light .ct-b81177{color:#268BD2}.light .ct-cac0bc{color:#859900}.light .ct-bc8811{color:#859900}.light .ct-4c7812{color:#93A1A1}.light .ct-f268fe{color:#2AA198}.light .ct-99c33c{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"augmenting-existing-interface","depth":2,"text":"Augmenting existing interface"}]}},"_type":"markdown","_id":"content:Typescript:Add global variable to window.md","_source":"content","_file":"Typescript/Add global variable to window.md","_extension":"md"},{"_path":"/typescript/flatten-object-with-periods","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Flatten Object With Periods","description":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'./en.json'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"typeof"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-21324f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9c4ba"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3b8dd8"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b48404"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-3b8dd8"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ab0f84"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b48404"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-3b8dd8"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ab0f84"},"children":[{"type":"text","value":"TranslateOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-21324f"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"I18nLib"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c84cf5"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// plural object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"''"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" { ["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"-?:"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]>> }["}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// Fix it for you plural form"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'one'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'few'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'many'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"}${''"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'.'}${"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"4"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":">];"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-a4e364{color:#A5D6FF}.ct-45e961{color:#79C0FF}.ct-caf09a{color:#79C0FF}.ct-4a1326{color:#8B949E}.ct-c84cf5{color:#D2A8FF}.ct-ab0f84{color:#FFA657}.ct-b48404{color:#FFA657}.ct-3b8dd8{color:#FF7B72}.ct-d9c4ba{color:#D2A8FF}.ct-d973b6{color:#C9D1D9}.ct-21324f{color:#FF7B72}.ct-9afba2{color:#FFA657}.ct-01c2c6{color:#FF7B72}.ct-dc52a6{color:#A5D6FF}.ct-f5c6d3{color:#C9D1D9}.ct-7ec1ee{color:#C9D1D9}.ct-7c02fe{color:#FF7B72}.light .ct-7c02fe{color:#859900}.light .ct-7ec1ee{color:#657B83}.light .ct-f5c6d3{color:#268BD2}.light .ct-dc52a6{color:#2AA198}.light .ct-01c2c6{color:#073642}.light .ct-9afba2{color:#268BD2}.light .ct-21324f{color:#073642}.light .ct-d973b6{color:#657B83}.light .ct-d9c4ba{color:#268BD2}.light .ct-3b8dd8{color:#859900}.light .ct-b48404{color:#657B83}.light .ct-ab0f84{color:#268BD2}.light .ct-c84cf5{color:#268BD2}.light .ct-4a1326{color:#93A1A1}.light .ct-caf09a{color:#859900}.light .ct-45e961{color:#D33682}.light .ct-a4e364{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Flatten object with periods.md","_source":"content","_file":"Typescript/Flatten object with periods.md","_extension":"md"},{"_path":"/typescript/type-guards","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Type Guards","description":"Useful for type checking at compile and run time:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1886ea"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bf5b6c"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d477bd"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6f4e28"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6f4e28"},"children":[{"type":"text","value":"Bird"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d477bd"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":"is"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6f4e28"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ad78b"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"!=="}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-67f2fa"},"children":[{"type":"text","value":"undefined"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7f249"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1bc9cf"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"getSmallPet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"fly"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-7c13bd{color:#D2A8FF}.ct-1bc9cf{color:#79C0FF}.ct-b7f249{color:#FF7B72}.ct-67f2fa{color:#79C0FF}.ct-6ad78b{color:#FFA657}.ct-59b9b7{color:#C9D1D9}.ct-dac57f{color:#FF7B72}.ct-2e1e17{color:#C9D1D9}.ct-6f4e28{color:#FFA657}.ct-ac4659{color:#FF7B72}.ct-d477bd{color:#FFA657}.ct-bf5b6c{color:#D2A8FF}.ct-f6cb92{color:#C9D1D9}.ct-1886ea{color:#FF7B72}.light .ct-1886ea{color:#073642}.light .ct-f6cb92{color:#657B83}.light .ct-bf5b6c{color:#268BD2}.light .ct-d477bd{color:#657B83}.light .ct-ac4659{color:#859900}.light .ct-6f4e28{color:#268BD2}.light .ct-2e1e17{color:#657B83}.light .ct-dac57f{color:#859900}.light .ct-59b9b7{color:#268BD2}.light .ct-6ad78b{color:#268BD2}.light .ct-67f2fa{color:#B58900}.light .ct-b7f249{color:#073642}.light .ct-1bc9cf{color:#268BD2}.light .ct-7c13bd{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Type guards.md","_source":"content","_file":"Typescript/Type guards.md","_extension":"md"}],"navigation":[{"title":"Blockchain","_path":"/blockchain","children":[{"title":"Common Typescript Examples","_path":"/blockchain/common-typescript-examples"},{"title":"Smart Contracts","_path":"/blockchain/smart-contracts"}]},{"title":"Css","_path":"/css","children":[{"title":"Automatic Grid Like Masonry With Pure CSS","_path":"/css/automatic-grid-like-masonry-with-pure-css"},{"title":"Sass Nth Child Iterate Mixin","_path":"/css/sass-nth-child-iterate-mixin"},{"title":"Test If Browser Supports CSS Rules","_path":"/css/test-if-browser-supports-css-rules"}]},{"title":"Docker","_path":"/docker","children":[{"title":"Building Static Pages With Docker","_path":"/docker/building-static-pages-with-docker"},{"title":"Drone Ci","_path":"/docker/drone-ci"},{"title":"Github Pages With Drone Ci","_path":"/docker/github-pages-with-drone-ci"},{"title":"Private Docker Registry","_path":"/docker/private-docker-registry"},{"title":"Refresh Containers On Pull","_path":"/docker/refresh-containers-on-pull"},{"title":"Seed Dump Inside Docker","_path":"/docker/seed-dump-inside-docker"},{"title":"Wait For Mysql","_path":"/docker/wait-for-mysql"},{"title":"Wait For Redis","_path":"/docker/wait-for-redis"}]},{"title":"Frontend","_path":"/frontend","children":[{"title":"React Native","_path":"/frontend/react-native","children":[{"title":"OAuth2 Login","_path":"/frontend/react-native/oauth2-login"},{"title":"Preserve FlatList Scroll Position In React Native","_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native"},{"title":"Useful Comands","_path":"/frontend/react-native/useful-comands"}]},{"title":"React","_path":"/frontend/react","children":[{"title":"Axios Refresh Token On React","_path":"/frontend/react/axios-refresh-token-on-react"},{"title":"Axios With AbortController","_path":"/frontend/react/axios-with-abortcontroller"}]},{"title":"Vue","_path":"/frontend/vue","children":[{"title":"Adding Global Properties To Component","_path":"/frontend/vue/adding-global-properties-to-component"},{"title":"Make Nuxt Handle Obsidian Highlights","_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights"}]}]},{"title":"Git","_path":"/git","children":[{"title":"Force Git To Use HTTPS","_path":"/git/force-git-to-use-https"},{"title":"Git Aliases And Useful Commands","_path":"/git/git-aliases-and-useful-commands"}]},{"title":"Graphql","_path":"/graphql","children":[{"title":"Apollo Client Pagination","_path":"/graphql/apollo-client-pagination"},{"title":"Refresh Token In Apollo Client","_path":"/graphql/refresh-token-in-apollo-client"}]},{"title":"Linux","_path":"/linux","children":[{"title":"Gitea For Git Hosting","_path":"/linux/gitea-for-git-hosting"},{"title":"Google Photos Alternative With Photoprism","_path":"/linux/google-photos-alternative-with-photoprism"},{"title":"Resume Or Start Screen Session","_path":"/linux/resume-or-start-screen-session"},{"title":"Rsync File With SSH","_path":"/linux/rsync-file-with-ssh"},{"title":"Setting Up NGINX","_path":"/linux/setting-up-nginx"},{"title":"SSH","_path":"/linux/ssh"}]},{"title":"Sql","_path":"/sql","children":[{"title":"MySQL And MariaDB Setup","_path":"/sql/mysql-and-mariadb-setup"},{"title":"Postgress Setup","_path":"/sql/postgress-setup"}]},{"title":"Typescript","_path":"/typescript","children":[{"title":"Add Global Variable To Window","_path":"/typescript/add-global-variable-to-window"},{"title":"Flatten Object With Periods","_path":"/typescript/flatten-object-with-periods"},{"title":"Type Guards","_path":"/typescript/type-guards"}]}]}
\ No newline at end of file
diff --git a/api/_content/query/068glZS8Mz.json b/api/_content/query/068glZS8Mz.json
index 1b33f81..5ba9622 100644
--- a/api/_content/query/068glZS8Mz.json
+++ b/api/_content/query/068glZS8Mz.json
@@ -1 +1 @@
-{"_path":"/css/automatic-grid-like-masonry-with-pure-css","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Automatic Grid Like Masonry With Pure CSS","description":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a01e96"},"children":[{"type":"text","value":"$cell: "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"250"}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a01e96"},"children":[{"type":"text","value":"$gap: "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"20"}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".grid"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"display"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-93ab44"},"children":[{"type":"text","value":"grid"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-template-columns"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-62ad3a"},"children":[{"type":"text","value":"repeat"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"auto-fit"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62ad3a"},"children":[{"type":"text","value":"minmax"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"$cell"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f42e6b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-4288f1"},"children":[{"type":"text","value":"fr"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-auto-rows"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"256"}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-auto-flow"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-93ab44"},"children":[{"type":"text","value":"row"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93ab44"},"children":[{"type":"text","value":"dense"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-column-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a54cfd"},"children":[{"type":"text","value":"grid-row-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4fac47"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-573002"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".h-2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// takes 2 columns"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-column-end"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".v-2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// takes 2 rows"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-row-end"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".full-width"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// height: 1 row"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74caba"},"children":[{"type":"text","value":".top-right"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-28dcfd"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// height here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-43821f"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"-2"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-48e8e4"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-145210"},"children":[{"type":"text","value":"// width here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-299fdc"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-145210{color:#8B949E}.ct-43821f{color:#79C0FF}.ct-4288f1{color:#FF7B72}.ct-f42e6b{color:#79C0FF}.ct-4fac47{color:#FFA657}.ct-62ad3a{color:#79C0FF}.ct-93ab44{color:#79C0FF}.ct-a54cfd{color:#79C0FF}.ct-573002{color:#C9D1D9}.ct-74caba{color:#79C0FF}.ct-299fdc{color:#C9D1D9}.ct-28dcfd{color:#FF7B72}.ct-48e8e4{color:#79C0FF}.ct-a01e96{color:#FFA657}.light .ct-a01e96{color:#657B83}.light .ct-48e8e4{color:#D33682}.light .ct-28dcfd{color:#859900}.light .ct-299fdc{color:#657B83}.light .ct-74caba{color:#93A1A1}.light .ct-573002{color:#657B83}.light .ct-a54cfd{color:#859900}.light .ct-93ab44{color:#657B83}.light .ct-62ad3a{color:#268BD2}.light .ct-4fac47{color:#657B83}.light .ct-f42e6b{color:#D33682}.light .ct-4288f1{color:#859900}.light .ct-43821f{color:#859900}.light .ct-145210{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"basic-elements-with-double-height-or-width","depth":3,"text":"Basic elements with double height or width"},{"id":"header-that-fills-all-columns","depth":3,"text":"Header, that fills all columns"},{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner","depth":3,"text":"Stamp element, that takes 3 rows in the top right corner"}]}},"_type":"markdown","_id":"content:CSS:Automatic Grid like Masonry with pure CSS.md","_source":"content","_file":"CSS/Automatic Grid like Masonry with pure CSS.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/css/automatic-grid-like-masonry-with-pure-css","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Automatic Grid Like Masonry With Pure CSS","description":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-60df50"},"children":[{"type":"text","value":"$cell: "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"250"}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-60df50"},"children":[{"type":"text","value":"$gap: "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"20"}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".grid"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"display"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-55848a"},"children":[{"type":"text","value":"grid"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-template-columns"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-468a72"},"children":[{"type":"text","value":"repeat"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"auto-fit"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-468a72"},"children":[{"type":"text","value":"minmax"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"$cell"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6d144f"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-f3f734"},"children":[{"type":"text","value":"fr"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-auto-rows"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"256"}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-auto-flow"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-55848a"},"children":[{"type":"text","value":"row"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-55848a"},"children":[{"type":"text","value":"dense"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-column-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-19a0e1"},"children":[{"type":"text","value":"grid-row-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-9985a3"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-501742"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n    grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".h-2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// takes 2 columns"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-column-end"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".v-2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// takes 2 rows"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-row-end"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n  grid-row: 1 / 2; // height: 1 row\n  grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".full-width"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// height: 1 row"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n  grid-row: 1 / 3; // height here\n  grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6dec3"},"children":[{"type":"text","value":".top-right"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d0d996"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// height here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cabec8"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"-2"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-cf588b"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-ff566b"},"children":[{"type":"text","value":"// width here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db3ba3"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ff566b{color:#8B949E}.ct-cabec8{color:#79C0FF}.ct-f3f734{color:#FF7B72}.ct-6d144f{color:#79C0FF}.ct-9985a3{color:#FFA657}.ct-468a72{color:#79C0FF}.ct-55848a{color:#79C0FF}.ct-19a0e1{color:#79C0FF}.ct-501742{color:#C9D1D9}.ct-e6dec3{color:#79C0FF}.ct-db3ba3{color:#C9D1D9}.ct-d0d996{color:#FF7B72}.ct-cf588b{color:#79C0FF}.ct-60df50{color:#FFA657}.light .ct-60df50{color:#657B83}.light .ct-cf588b{color:#D33682}.light .ct-d0d996{color:#859900}.light .ct-db3ba3{color:#657B83}.light .ct-e6dec3{color:#93A1A1}.light .ct-501742{color:#657B83}.light .ct-19a0e1{color:#859900}.light .ct-55848a{color:#657B83}.light .ct-468a72{color:#268BD2}.light .ct-9985a3{color:#657B83}.light .ct-6d144f{color:#D33682}.light .ct-f3f734{color:#859900}.light .ct-cabec8{color:#859900}.light .ct-ff566b{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"basic-elements-with-double-height-or-width","depth":3,"text":"Basic elements with double height or width"},{"id":"header-that-fills-all-columns","depth":3,"text":"Header, that fills all columns"},{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner","depth":3,"text":"Stamp element, that takes 3 rows in the top right corner"}]}},"_type":"markdown","_id":"content:CSS:Automatic Grid like Masonry with pure CSS.md","_source":"content","_file":"CSS/Automatic Grid like Masonry with pure CSS.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/2vMf3x3doM.json b/api/_content/query/2vMf3x3doM.json
index c112b1f..04311e4 100644
--- a/api/_content/query/2vMf3x3doM.json
+++ b/api/_content/query/2vMf3x3doM.json
@@ -1 +1 @@
-{"_path":"/graphql/apollo-client-pagination","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Apollo Client Pagination","description":"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"listItems"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"filter"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"sort"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"limit"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"): "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"input"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dfd676"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dfd676"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Item"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-877fdf"},"children":[{"type":"text","value":"Int"}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'@apollo/client'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  cache: "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-321bed"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"({ "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d80610"},"children":[{"type":"text","value":"TypePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  Query: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    fields: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// query name"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      listItems: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// apollo will serialize and use keyArgs as unique"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// identifier in cache for every query"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// consider choosing the right fields, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// i.e. limit and offset won't work here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        keyArgs: ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'sort'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// primitive type"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'filter'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", ["}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'name'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4b4e55"},"children":[{"type":"text","value":"'type'"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// nested fields of `filter`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        ],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"        merge: "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-640d5b"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e20842"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-15d01a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-5ccade"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-640d5b"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-2f7e13"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// no existing data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// If hook was called multiple times"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// merge cache and incoming data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2d8226"},"children":[{"type":"text","value":"// apply latest result for totalCount"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d1eb42"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-926fbe"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cc9f"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e1caea"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a237a4"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-e20842{color:#D2A8FF}.ct-640d5b{color:#FF7B72}.ct-d80610{color:#FFA657}.ct-2d8226{color:#8B949E}.ct-926fbe{color:#79C0FF}.ct-d1eb42{color:#FF7B72}.ct-4b4e55{color:#A5D6FF}.ct-e1caea{color:#C9D1D9}.ct-15d01a{color:#FF7B72}.ct-dfd676{color:#79C0FF}.ct-877fdf{color:#79C0FF}.ct-5ccade{color:#FFA657}.ct-2f7e13{color:#C9D1D9}.ct-321bed{color:#D2A8FF}.ct-a237a4{color:#C9D1D9}.ct-58cc9f{color:#FF7B72}.light .ct-58cc9f{color:#859900}.light .ct-a237a4{color:#657B83}.light .ct-321bed{color:#268BD2}.light .ct-2f7e13{color:#657B83}.light .ct-5ccade{color:#657B83}.light .ct-877fdf{color:#859900}.light .ct-dfd676{color:#859900}.light .ct-15d01a{color:#859900}.light .ct-e1caea{color:#268BD2}.light .ct-4b4e55{color:#2AA198}.light .ct-d1eb42{color:#073642}.light .ct-926fbe{color:#268BD2}.light .ct-2d8226{color:#93A1A1}.light .ct-d80610{color:#268BD2}.light .ct-640d5b{color:#073642}.light .ct-e20842{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Apollo Client pagination.md","_source":"content","_file":"GraphQL/Apollo Client pagination.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/graphql/apollo-client-pagination","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Apollo Client Pagination","description":"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"listItems"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"filter"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"sort"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"limit"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"): "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"input"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-17feeb"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-17feeb"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Item"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1fd63d"},"children":[{"type":"text","value":"Int"}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n  // ...\n  cache: new InMemoryCache({ typePolicies }),\n  // ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      // query name\n      listItems: {\n        // apollo will serialize and use keyArgs as unique\n        // identifier in cache for every query\n        // consider choosing the right fields, \n        // i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', // primitive type\n          'filter', ['name', 'type'] // nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'@apollo/client'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  cache: "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7fa1a6"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"({ "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-525383"},"children":[{"type":"text","value":"TypePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  Query: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    fields: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// query name"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      listItems: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// apollo will serialize and use keyArgs as unique"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// identifier in cache for every query"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// consider choosing the right fields, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// i.e. limit and offset won't work here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        keyArgs: ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'sort'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// primitive type"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'filter'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", ["}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'name'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-009c3c"},"children":[{"type":"text","value":"'type'"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// nested fields of `filter`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        ],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"        merge: "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n    // no existing data\n    if (!existing || !args?.offset || args.offset < existing.length) {\n      return incoming || [];\n    }\n\n    // If hook was called multiple times\n    if (existing?.items?.length && args?.offset < existing.items.length) {\n      return existing || [];\n    }\n\n    // merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    // apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-062754"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c0b017"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d6b457"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1313"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-062754"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-5ee133"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// no existing data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// If hook was called multiple times"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// merge cache and incoming data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4ed952"},"children":[{"type":"text","value":"// apply latest result for totalCount"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b63a22"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbd2b0"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aeb03e"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-905c16"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-912659"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-c0b017{color:#D2A8FF}.ct-062754{color:#FF7B72}.ct-525383{color:#FFA657}.ct-4ed952{color:#8B949E}.ct-dbd2b0{color:#79C0FF}.ct-b63a22{color:#FF7B72}.ct-009c3c{color:#A5D6FF}.ct-905c16{color:#C9D1D9}.ct-d6b457{color:#FF7B72}.ct-17feeb{color:#79C0FF}.ct-1fd63d{color:#79C0FF}.ct-bd1313{color:#FFA657}.ct-5ee133{color:#C9D1D9}.ct-7fa1a6{color:#D2A8FF}.ct-912659{color:#C9D1D9}.ct-aeb03e{color:#FF7B72}.light .ct-aeb03e{color:#859900}.light .ct-912659{color:#657B83}.light .ct-7fa1a6{color:#268BD2}.light .ct-5ee133{color:#657B83}.light .ct-bd1313{color:#657B83}.light .ct-1fd63d{color:#859900}.light .ct-17feeb{color:#859900}.light .ct-d6b457{color:#859900}.light .ct-905c16{color:#268BD2}.light .ct-009c3c{color:#2AA198}.light .ct-b63a22{color:#073642}.light .ct-dbd2b0{color:#268BD2}.light .ct-4ed952{color:#93A1A1}.light .ct-525383{color:#268BD2}.light .ct-062754{color:#073642}.light .ct-c0b017{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Apollo Client pagination.md","_source":"content","_file":"GraphQL/Apollo Client pagination.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/4AUGrl0JGY.json b/api/_content/query/4AUGrl0JGY.json
index 686be25..95fc642 100644
--- a/api/_content/query/4AUGrl0JGY.json
+++ b/api/_content/query/4AUGrl0JGY.json
@@ -1 +1 @@
-{"_path":"/docker/wait-for-redis","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Redis","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4f0f5f"},"children":[{"type":"text","value":"# Waits for redis to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-88f37d"},"children":[{"type":"text","value":"wait_for_redis"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-4f0f5f"},"children":[{"type":"text","value":"# 3 minutes"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-d454d3"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" redis-cli -h localhost -p 6379 -a "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" ping "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\"PONG\""}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"/dev/null "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"2>&1;"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-f879cc"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d454d3"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":"\"[Error] can't properly ping Redis container after "}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-2d0cd3"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-f87068"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-75e354"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d454d3"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d81cf7"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fde2e0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4f0f5f"},"children":[{"type":"text","value":"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-f879cc{color:#79C0FF}.ct-2d0cd3{color:#C9D1D9}.ct-f87068{color:#C9D1D9}.ct-75e354{color:#A5D6FF}.ct-d454d3{color:#79C0FF}.ct-d81cf7{color:#FF7B72}.ct-fde2e0{color:#C9D1D9}.ct-88f37d{color:#D2A8FF}.ct-4f0f5f{color:#8B949E}.light .ct-4f0f5f{color:#93A1A1}.light .ct-88f37d{color:#268BD2}.light .ct-fde2e0{color:#657B83}.light .ct-d81cf7{color:#859900}.light .ct-d454d3{color:#268BD2}.light .ct-75e354{color:#2AA198}.light .ct-f87068{color:#859900}.light .ct-2d0cd3{color:#268BD2}.light .ct-f879cc{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for redis.md","_source":"content","_file":"Docker/Wait for redis.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/wait-for-redis","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Redis","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bf03e9"},"children":[{"type":"text","value":"# Waits for redis to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a7219d"},"children":[{"type":"text","value":"wait_for_redis"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-bf03e9"},"children":[{"type":"text","value":"# 3 minutes"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-54f348"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" redis-cli -h localhost -p 6379 -a "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" ping "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\"PONG\""}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"/dev/null "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"2>&1;"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-9e4889"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-54f348"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":"\"[Error] can't properly ping Redis container after "}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-33c468"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-59ad82"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-47dd3f"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-54f348"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8482ac"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ed020c"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bf03e9"},"children":[{"type":"text","value":"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9e4889{color:#79C0FF}.ct-33c468{color:#C9D1D9}.ct-59ad82{color:#C9D1D9}.ct-47dd3f{color:#A5D6FF}.ct-54f348{color:#79C0FF}.ct-8482ac{color:#FF7B72}.ct-ed020c{color:#C9D1D9}.ct-a7219d{color:#D2A8FF}.ct-bf03e9{color:#8B949E}.light .ct-bf03e9{color:#93A1A1}.light .ct-a7219d{color:#268BD2}.light .ct-ed020c{color:#657B83}.light .ct-8482ac{color:#859900}.light .ct-54f348{color:#268BD2}.light .ct-47dd3f{color:#2AA198}.light .ct-59ad82{color:#859900}.light .ct-33c468{color:#268BD2}.light .ct-9e4889{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for redis.md","_source":"content","_file":"Docker/Wait for redis.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/8cFyiEqgoq.json b/api/_content/query/8cFyiEqgoq.json
index 2a73d90..f96ec79 100644
--- a/api/_content/query/8cFyiEqgoq.json
+++ b/api/_content/query/8cFyiEqgoq.json
@@ -1 +1 @@
-{"_path":"/blockchain/common-typescript-examples","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Common Typescript Examples","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// URL of your node"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://...'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-832f93"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-930ba7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-0c3276"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-930ba7"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4196a1"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// first we need to authorize"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// then we can get wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getCurrentAddressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getTransactionCount"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      gasLimit: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      nonce: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"EthUtil"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"Transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"sign"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"serialize"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"this"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"`0x${"}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-ac6681"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-ac6681"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'hex'"}]},{"type":"element","tag":"span","props":{"class":"ct-ac6681"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"estimateFee"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4f105d"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"asciiToHex"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    })."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"fromWei"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-99e7a2"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"())"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"multiply"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-99e7a2"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"()))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'accountsChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'chainChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"handler"}]},{"type":"element","tag":"span","props":{"class":"ct-34f27a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'wallet_watchAsset'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    params: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      type: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ERC20'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      options: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        address: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'FOO'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-58cded"},"children":[{"type":"text","value":"18"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        image: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://foo.io/token-image.svg'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-832f93"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-0c3276"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e18cdc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-dcdfaf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'FOO successfully added to wallet!'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99e7a2"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'Something went wrong.'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":")"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"getChainID"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-86f4ab"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'eth_chainId'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'wallet_switchEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    params: [{ chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" }], "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"switchError"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// This error code indicates that the chain has not been added to MetaMask."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-58cded"},"children":[{"type":"text","value":"4902"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b7644c"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        method: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'wallet_addEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        params: [{ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          chainName: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'Ropsten Test Network'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          nativeCurrency: { "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"              name: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"              symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"              decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-58cded"},"children":[{"type":"text","value":"18"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          }, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          rpcUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"], "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"          blockExplorerUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-6bd6d4"},"children":[{"type":"text","value":"'https://ropsten.etherscan.io'"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"        }] ,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-b084f5"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-862b9b"},"children":[{"type":"text","value":"addError"}]},{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// handle \"add\" error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5e418d"},"children":[{"type":"text","value":"// handle other \"switch\" errors"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d1af39"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-58cded{color:#79C0FF}.ct-34f27a{color:#C9D1D9}.ct-99e7a2{color:#79C0FF}.ct-ac6681{color:#A5D6FF}.ct-4196a1{color:#79C0FF}.ct-0c3276{color:#FFA657}.ct-930ba7{color:#FF7B72}.ct-832f93{color:#D2A8FF}.ct-dcdfaf{color:#C9D1D9}.ct-e18cdc{color:#FF7B72}.ct-b7644c{color:#D2A8FF}.ct-4f105d{color:#79C0FF}.ct-86f4ab{color:#FF7B72}.ct-5e418d{color:#8B949E}.ct-6bd6d4{color:#A5D6FF}.ct-862b9b{color:#C9D1D9}.ct-d1af39{color:#C9D1D9}.ct-b084f5{color:#FF7B72}.light .ct-b084f5{color:#859900}.light .ct-d1af39{color:#657B83}.light .ct-862b9b{color:#268BD2}.light .ct-6bd6d4{color:#2AA198}.light .ct-5e418d{color:#93A1A1}.light .ct-86f4ab{color:#073642}.light .ct-4f105d{color:#268BD2}.light .ct-b7644c{color:#268BD2}.light .ct-e18cdc{color:#073642}.light .ct-dcdfaf{color:#657B83}.light .ct-832f93{color:#268BD2}.light .ct-930ba7{color:#859900}.light .ct-0c3276{color:#657B83}.light .ct-4196a1{color:#859900}.light .ct-ac6681{color:#657B83}.light .ct-99e7a2{color:#859900}.light .ct-34f27a{color:#859900}.light .ct-58cded{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"connecting-to-node","depth":2,"text":"Connecting to node"},{"id":"getting-wallet-balance","depth":2,"text":"Getting wallet balance"},{"id":"getting-wallet-address","depth":2,"text":"Getting wallet address"},{"id":"sending-transaction","depth":2,"text":"Sending transaction"},{"id":"estimating-transaction-fee","depth":2,"text":"Estimating transaction FEE"},{"id":"subscribing-to-wallet-address-change","depth":2,"text":"Subscribing to wallet address change"},{"id":"watching-network-change","depth":2,"text":"Watching network change"},{"id":"adding-custom-token-to-wallet","depth":2,"text":"Adding custom token to wallet"},{"id":"changing-network-to-custom","depth":2,"text":"Changing network to custom"}]}},"_type":"markdown","_id":"content:Blockchain:Common typescript examples.md","_source":"content","_file":"Blockchain/Common typescript examples.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/blockchain/common-typescript-examples","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Common Typescript Examples","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// URL of your node"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://...'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n    return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-619167"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c88325"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-388d87"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-c88325"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e5bd8a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n    return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// first we need to authorize"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// then we can get wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getCurrentAddressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) => {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getTransactionCount"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      gasLimit: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      nonce: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"EthUtil"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"Transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"sign"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"serialize"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"this"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"`0x${"}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-255b39"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-255b39"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'hex'"}]},{"type":"element","tag":"span","props":{"class":"ct-255b39"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) => {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"estimateFee"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3bc7b"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      value: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"asciiToHex"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    })."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"fromWei"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-bba616"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"())"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"multiply"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-bba616"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"()))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'accountsChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'chainChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"handler"}]},{"type":"element","tag":"span","props":{"class":"ct-9c2fa8"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https://foo.io/token-image.svg',\n      },\n    },\n  })\n  .then((success) => {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'wallet_watchAsset'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    params: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      type: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ERC20'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      options: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        address: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'FOO'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-b2d291"},"children":[{"type":"text","value":"18"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        image: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://foo.io/token-image.svg'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-619167"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-388d87"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-83b2aa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-001a1d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'FOO successfully added to wallet!'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bba616"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'Something went wrong.'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":")"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"getChainID"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51348d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'eth_chainId'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  // This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', // ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https://ropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      // handle \"add\" error\n    }\n  }\n  // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'wallet_switchEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    params: [{ chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" }], "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"switchError"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// This error code indicates that the chain has not been added to MetaMask."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b2d291"},"children":[{"type":"text","value":"4902"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-76c663"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        method: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'wallet_addEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        params: [{ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          chainName: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'Ropsten Test Network'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          nativeCurrency: { "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"              name: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"              symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"              decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-b2d291"},"children":[{"type":"text","value":"18"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          }, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          rpcUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"], "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"          blockExplorerUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-df7cba"},"children":[{"type":"text","value":"'https://ropsten.etherscan.io'"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"        }] ,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e8040"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4a3086"},"children":[{"type":"text","value":"addError"}]},{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// handle \"add\" error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-09d035"},"children":[{"type":"text","value":"// handle other \"switch\" errors"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a39e24"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b2d291{color:#79C0FF}.ct-9c2fa8{color:#C9D1D9}.ct-bba616{color:#79C0FF}.ct-255b39{color:#A5D6FF}.ct-e5bd8a{color:#79C0FF}.ct-388d87{color:#FFA657}.ct-c88325{color:#FF7B72}.ct-619167{color:#D2A8FF}.ct-001a1d{color:#C9D1D9}.ct-83b2aa{color:#FF7B72}.ct-76c663{color:#D2A8FF}.ct-a3bc7b{color:#79C0FF}.ct-51348d{color:#FF7B72}.ct-09d035{color:#8B949E}.ct-df7cba{color:#A5D6FF}.ct-4a3086{color:#C9D1D9}.ct-a39e24{color:#C9D1D9}.ct-8e8040{color:#FF7B72}.light .ct-8e8040{color:#859900}.light .ct-a39e24{color:#657B83}.light .ct-4a3086{color:#268BD2}.light .ct-df7cba{color:#2AA198}.light .ct-09d035{color:#93A1A1}.light .ct-51348d{color:#073642}.light .ct-a3bc7b{color:#268BD2}.light .ct-76c663{color:#268BD2}.light .ct-83b2aa{color:#073642}.light .ct-001a1d{color:#657B83}.light .ct-619167{color:#268BD2}.light .ct-c88325{color:#859900}.light .ct-388d87{color:#657B83}.light .ct-e5bd8a{color:#859900}.light .ct-255b39{color:#657B83}.light .ct-bba616{color:#859900}.light .ct-9c2fa8{color:#859900}.light .ct-b2d291{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"connecting-to-node","depth":2,"text":"Connecting to node"},{"id":"getting-wallet-balance","depth":2,"text":"Getting wallet balance"},{"id":"getting-wallet-address","depth":2,"text":"Getting wallet address"},{"id":"sending-transaction","depth":2,"text":"Sending transaction"},{"id":"estimating-transaction-fee","depth":2,"text":"Estimating transaction FEE"},{"id":"subscribing-to-wallet-address-change","depth":2,"text":"Subscribing to wallet address change"},{"id":"watching-network-change","depth":2,"text":"Watching network change"},{"id":"adding-custom-token-to-wallet","depth":2,"text":"Adding custom token to wallet"},{"id":"changing-network-to-custom","depth":2,"text":"Changing network to custom"}]}},"_type":"markdown","_id":"content:Blockchain:Common typescript examples.md","_source":"content","_file":"Blockchain/Common typescript examples.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/CMMQ5oxSPg.json b/api/_content/query/CMMQ5oxSPg.json
index 4d2dd0f..46bd559 100644
--- a/api/_content/query/CMMQ5oxSPg.json
+++ b/api/_content/query/CMMQ5oxSPg.json
@@ -1 +1 @@
-{"_path":"/frontend/react/axios-with-abortcontroller","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios With AbortController","description":"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9aea1b"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9aea1b"},"children":[{"type":"text","value":"'axios'"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useGetUsers"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"());"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9aea1b"},"children":[{"type":"text","value":"\"/\""}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-03ead4"},"children":[{"type":"text","value":"// params and props here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"        signal: "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"signal"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"data"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-07b026"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-e966be"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"abort"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-03ead4"},"children":[{"type":"text","value":"// controller should be rewritten or all requests will fail"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4cc01b"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8e94e6"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-0da03b"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6c6595"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-03ead4{color:#8B949E}.ct-4cc01b{color:#D2A8FF}.ct-07b026{color:#79C0FF}.ct-e966be{color:#FF7B72}.ct-9aea1b{color:#A5D6FF}.ct-0da03b{color:#C9D1D9}.ct-6c6595{color:#C9D1D9}.ct-8e94e6{color:#FF7B72}.light .ct-8e94e6{color:#859900}.light .ct-6c6595{color:#657B83}.light .ct-0da03b{color:#268BD2}.light .ct-9aea1b{color:#2AA198}.light .ct-e966be{color:#073642}.light .ct-07b026{color:#268BD2}.light .ct-4cc01b{color:#268BD2}.light .ct-03ead4{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios with AbortController.md","_source":"content","_file":"Frontend/React/Axios with AbortController.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/react/axios-with-abortcontroller","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios With AbortController","description":"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () => {\n    const result = await client.get(\"/\", {\n        // params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() => {\n    controller.current.abort();\n    \n    // controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e58c4f"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e58c4f"},"children":[{"type":"text","value":"'axios'"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useGetUsers"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"());"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e58c4f"},"children":[{"type":"text","value":"\"/\""}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-916275"},"children":[{"type":"text","value":"// params and props here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"        signal: "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"signal"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"data"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-54619d"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-607c3e"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"abort"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-916275"},"children":[{"type":"text","value":"// controller should be rewritten or all requests will fail"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-786d0a"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8b8e9a"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-d898c1"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fa942d"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-916275{color:#8B949E}.ct-786d0a{color:#D2A8FF}.ct-54619d{color:#79C0FF}.ct-607c3e{color:#FF7B72}.ct-e58c4f{color:#A5D6FF}.ct-d898c1{color:#C9D1D9}.ct-fa942d{color:#C9D1D9}.ct-8b8e9a{color:#FF7B72}.light .ct-8b8e9a{color:#859900}.light .ct-fa942d{color:#657B83}.light .ct-d898c1{color:#268BD2}.light .ct-e58c4f{color:#2AA198}.light .ct-607c3e{color:#073642}.light .ct-54619d{color:#268BD2}.light .ct-786d0a{color:#268BD2}.light .ct-916275{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios with AbortController.md","_source":"content","_file":"Frontend/React/Axios with AbortController.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/DliR2N9mzp.json b/api/_content/query/DliR2N9mzp.json
index d67b059..82198ed 100644
--- a/api/_content/query/DliR2N9mzp.json
+++ b/api/_content/query/DliR2N9mzp.json
@@ -1 +1 @@
-{"_path":"/linux/setting-up-nginx","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Setting Up NGINX","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-07132d"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-129576"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# First attempt to serve request as file, then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# as directory, then fall back to displaying a 404."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-dd96a9"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" client_max_body_size "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"200M;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"80;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-53c2fa"},"children":[{"type":"text","value":"301"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" https://next.vault48.org"}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"request_uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8e1f14"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"[::]:443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-af5f1b"},"children":[{"type":"text","value":"# managed by Certbot"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" ssl_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/fullchain.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" ssl_certificate_key "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/privkey.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" ssl_trusted_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/chain.pem;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-07132d"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-129576"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-27e5ba"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_redirect "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"off;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"Host "}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"host"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"X-Real-IP "}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"remote_addr"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"X-Forwarded-For "}]},{"type":"element","tag":"span","props":{"class":"ct-207f57"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5af68c"},"children":[{"type":"text","value":"proxy_add_x_forwarded_for"}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-d5b9b4"},"children":[{"type":"text","value":" proxy_pass "}]},{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"http://127.0.0.1:8080;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f74bf7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-5af68c{color:#C9D1D9}.ct-207f57{color:#C9D1D9}.ct-53c2fa{color:#79C0FF}.ct-d5b9b4{color:#FF7B72}.ct-dd96a9{color:#FF7B72}.ct-129576{color:#FFA657}.ct-07132d{color:#FF7B72}.ct-27e5ba{color:#C9D1D9}.ct-af5f1b{color:#8B949E}.ct-f74bf7{color:#C9D1D9}.ct-8e1f14{color:#FF7B72}.light .ct-8e1f14{color:#073642}.light .ct-f74bf7{color:#657B83}.light .ct-af5f1b{color:#93A1A1}.light .ct-27e5ba{color:#657B83}.light .ct-07132d{color:#073642}.light .ct-129576{color:#657B83}.light .ct-dd96a9{color:#657B83}.light .ct-d5b9b4{color:#859900}.light .ct-53c2fa{color:#D33682}.light .ct-207f57{color:#859900}.light .ct-5af68c{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"fallback-url-for-spa-s","depth":2,"text":"Fallback url for SPA-s"},{"id":"set-up-for-uploads","depth":2,"text":"Set up for uploads"},{"id":"reverse-proxy-for-https","depth":2,"text":"Reverse proxy for https"}]}},"_type":"markdown","_id":"content:Linux:Setting up NGINX.md","_source":"content","_file":"Linux/Setting up NGINX.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/linux/setting-up-nginx","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Setting Up NGINX","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  location / {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri/ =404;\n  }\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b2aa81"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aaa72d"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# First attempt to serve request as file, then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# as directory, then fall back to displaying a 404."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-23016c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" client_max_body_size "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"200M;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n  ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n  ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n  \n  server_name next.vault48.org;\n  \n  location / {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http://127.0.0.1:8080;\n  }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"80;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-33f2c5"},"children":[{"type":"text","value":"301"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" https://next.vault48.org"}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"request_uri"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1605b4"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"[::]:443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-812103"},"children":[{"type":"text","value":"# managed by Certbot"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" ssl_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/fullchain.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" ssl_certificate_key "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/privkey.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" ssl_trusted_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/chain.pem;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b2aa81"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aaa72d"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-de728c"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_redirect "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"off;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"Host "}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"host"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"X-Real-IP "}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"remote_addr"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"X-Forwarded-For "}]},{"type":"element","tag":"span","props":{"class":"ct-68f237"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-fcbbc9"},"children":[{"type":"text","value":"proxy_add_x_forwarded_for"}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-a62e3a"},"children":[{"type":"text","value":" proxy_pass "}]},{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"http://127.0.0.1:8080;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eeca1"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-fcbbc9{color:#C9D1D9}.ct-68f237{color:#C9D1D9}.ct-33f2c5{color:#79C0FF}.ct-a62e3a{color:#FF7B72}.ct-23016c{color:#FF7B72}.ct-aaa72d{color:#FFA657}.ct-b2aa81{color:#FF7B72}.ct-de728c{color:#C9D1D9}.ct-812103{color:#8B949E}.ct-0eeca1{color:#C9D1D9}.ct-1605b4{color:#FF7B72}.light .ct-1605b4{color:#073642}.light .ct-0eeca1{color:#657B83}.light .ct-812103{color:#93A1A1}.light .ct-de728c{color:#657B83}.light .ct-b2aa81{color:#073642}.light .ct-aaa72d{color:#657B83}.light .ct-23016c{color:#657B83}.light .ct-a62e3a{color:#859900}.light .ct-33f2c5{color:#D33682}.light .ct-68f237{color:#859900}.light .ct-fcbbc9{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"fallback-url-for-spa-s","depth":2,"text":"Fallback url for SPA-s"},{"id":"set-up-for-uploads","depth":2,"text":"Set up for uploads"},{"id":"reverse-proxy-for-https","depth":2,"text":"Reverse proxy for https"}]}},"_type":"markdown","_id":"content:Linux:Setting up NGINX.md","_source":"content","_file":"Linux/Setting up NGINX.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/EH6LeCIDqM.json b/api/_content/query/EH6LeCIDqM.json
index 5555635..fe624d3 100644
--- a/api/_content/query/EH6LeCIDqM.json
+++ b/api/_content/query/EH6LeCIDqM.json
@@ -1 +1 @@
-{"_path":"/docker/private-docker-registry","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Private Docker Registry","description":"Suitable to work with Drone-ci for hosting private #docker images.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --entrypoint htpasswd registry:2 \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  -Bbn user mypassword "}]},{"type":"element","tag":"span","props":{"class":"ct-5f875a"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":" auth/registry.password"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"docker__registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"registry:2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"5000:5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_AUTH=htpasswd"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_HTTP_SECRET=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"./registry/auth:/auth"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"./registry/data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"ui"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"docker__ui"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"parabuzzle/craneoperator:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"80:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-95058f"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_HOST=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_PORT=5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_PROTOCOL=http"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"ALLOW_REGISTRY_LOGIN=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"REGISTRY_ALLOW_DELETE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"USERNAME=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"PASSWORD=password"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db26b7"},"children":[{"type":"text","value":"# Try this first"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --rm anoxis/registry-cli \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  -r https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  -l user:password \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --delete \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"  --num 2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db26b7"},"children":[{"type":"text","value":"# Then this "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"docker run -it \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -v /path/to/registry/data:/registry \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -e REGISTRY_URL=https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -e DRY_RUN="}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    -e REGISTRY_AUTH="}]},{"type":"element","tag":"span","props":{"class":"ct-f3cf32"},"children":[{"type":"text","value":"\"user:password\""}]},{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47d708"},"children":[{"type":"text","value":"    mortensrasmussen/docker-registry-manifest-cleanup"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-db26b7{color:#8B949E}.ct-f3cf32{color:#A5D6FF}.ct-95058f{color:#7EE787}.ct-5f875a{color:#FF7B72}.ct-47d708{color:#C9D1D9}.light .ct-47d708{color:#657B83}.light .ct-5f875a{color:#859900}.light .ct-95058f{color:#268BD2}.light .ct-f3cf32{color:#2AA198}.light .ct-db26b7{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"sample-docker-compose-for-custom-docker-registry","depth":2,"text":"Sample docker-compose for custom docker registry"},{"id":"squash-layers-on-registry","depth":2,"text":"Squash layers on registry"}]}},"_type":"markdown","_id":"content:Docker:Private docker registry.md","_source":"content","_file":"Docker/Private docker registry.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/private-docker-registry","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Private Docker Registry","description":"Suitable to work with Drone-ci for hosting private #docker images.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --entrypoint htpasswd registry:2 \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  -Bbn user mypassword "}]},{"type":"element","tag":"span","props":{"class":"ct-fdaae7"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":" auth/registry.password"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - ./registry/auth:/auth\n      - ./registry/data:/data\n  ui:\n    container_name: docker__ui\n    image: parabuzzle/craneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"docker__registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"registry:2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"5000:5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_AUTH=htpasswd"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_HTTP_SECRET=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"./registry/auth:/auth"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"./registry/data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"ui"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"docker__ui"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"parabuzzle/craneoperator:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"80:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-21d1c7"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_HOST=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_PORT=5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_PROTOCOL=http"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"ALLOW_REGISTRY_LOGIN=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"REGISTRY_ALLOW_DELETE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"USERNAME=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"PASSWORD=password"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n  --rm anoxis/registry-cli \\\n  -r https://registry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v /path/to/registry/data:/registry \\\n    -e REGISTRY_URL=https://registry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-03b34e"},"children":[{"type":"text","value":"# Try this first"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --rm anoxis/registry-cli \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  -r https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  -l user:password \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --delete \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"  --num 2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-03b34e"},"children":[{"type":"text","value":"# Then this "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"docker run -it \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -v /path/to/registry/data:/registry \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -e REGISTRY_URL=https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -e DRY_RUN="}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    -e REGISTRY_AUTH="}]},{"type":"element","tag":"span","props":{"class":"ct-1825ed"},"children":[{"type":"text","value":"\"user:password\""}]},{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-47328b"},"children":[{"type":"text","value":"    mortensrasmussen/docker-registry-manifest-cleanup"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-03b34e{color:#8B949E}.ct-1825ed{color:#A5D6FF}.ct-21d1c7{color:#7EE787}.ct-fdaae7{color:#FF7B72}.ct-47328b{color:#C9D1D9}.light .ct-47328b{color:#657B83}.light .ct-fdaae7{color:#859900}.light .ct-21d1c7{color:#268BD2}.light .ct-1825ed{color:#2AA198}.light .ct-03b34e{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"sample-docker-compose-for-custom-docker-registry","depth":2,"text":"Sample docker-compose for custom docker registry"},{"id":"squash-layers-on-registry","depth":2,"text":"Squash layers on registry"}]}},"_type":"markdown","_id":"content:Docker:Private docker registry.md","_source":"content","_file":"Docker/Private docker registry.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/FLiVxDo2qK.json b/api/_content/query/FLiVxDo2qK.json
index c0a0c8d..88c604b 100644
--- a/api/_content/query/FLiVxDo2qK.json
+++ b/api/_content/query/FLiVxDo2qK.json
@@ -1 +1 @@
-{"_path":"/typescript/add-global-variable-to-window","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Add Global Variable To Window","description":"Sometimes you want to add global variable to your window. That thing's called global module augmentation.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"global"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93f845"},"children":[{"type":"text","value":"Window"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b93f44"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// Sample.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93f845"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// nothing :-)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// fancyThings.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93f845"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b93f44"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-42f354"},"children":[{"type":"text","value":"\"./fancyThings\""}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1ecf29"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a422a6"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-681d7e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aa5074"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c998a9"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-a49f6e"},"children":[{"type":"text","value":"(); "}]},{"type":"element","tag":"span","props":{"class":"ct-d2a63c"},"children":[{"type":"text","value":"// ok"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-a422a6{color:#79C0FF}.ct-42f354{color:#A5D6FF}.ct-d2a63c{color:#8B949E}.ct-b93f44{color:#79C0FF}.ct-681d7e{color:#FF7B72}.ct-c998a9{color:#D2A8FF}.ct-93f845{color:#FFA657}.ct-aa5074{color:#C9D1D9}.ct-a49f6e{color:#C9D1D9}.ct-1ecf29{color:#FF7B72}.light .ct-1ecf29{color:#073642}.light .ct-a49f6e{color:#657B83}.light .ct-aa5074{color:#268BD2}.light .ct-93f845{color:#268BD2}.light .ct-c998a9{color:#268BD2}.light .ct-681d7e{color:#859900}.light .ct-b93f44{color:#859900}.light .ct-d2a63c{color:#93A1A1}.light .ct-42f354{color:#2AA198}.light .ct-a422a6{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"augmenting-existing-interface","depth":2,"text":"Augmenting existing interface"}]}},"_type":"markdown","_id":"content:Typescript:Add global variable to window.md","_source":"content","_file":"Typescript/Add global variable to window.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/typescript/add-global-variable-to-window","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Add Global Variable To Window","description":"Sometimes you want to add global variable to your window. That thing's called global module augmentation.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n  interface Window {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"global"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1756ee"},"children":[{"type":"text","value":"Window"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bc8811"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n  // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// Sample.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1756ee"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// nothing :-)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n  interface Sample {\n    doFancyThings: () => void;\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// fancyThings.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1756ee"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bc8811"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f268fe"},"children":[{"type":"text","value":"\"./fancyThings\""}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ea175a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99c33c"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cac0bc"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-27e067"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b81177"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-022adf"},"children":[{"type":"text","value":"(); "}]},{"type":"element","tag":"span","props":{"class":"ct-4c7812"},"children":[{"type":"text","value":"// ok"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-99c33c{color:#79C0FF}.ct-f268fe{color:#A5D6FF}.ct-4c7812{color:#8B949E}.ct-bc8811{color:#79C0FF}.ct-cac0bc{color:#FF7B72}.ct-b81177{color:#D2A8FF}.ct-1756ee{color:#FFA657}.ct-27e067{color:#C9D1D9}.ct-022adf{color:#C9D1D9}.ct-ea175a{color:#FF7B72}.light .ct-ea175a{color:#073642}.light .ct-022adf{color:#657B83}.light .ct-27e067{color:#268BD2}.light .ct-1756ee{color:#268BD2}.light .ct-b81177{color:#268BD2}.light .ct-cac0bc{color:#859900}.light .ct-bc8811{color:#859900}.light .ct-4c7812{color:#93A1A1}.light .ct-f268fe{color:#2AA198}.light .ct-99c33c{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"augmenting-existing-interface","depth":2,"text":"Augmenting existing interface"}]}},"_type":"markdown","_id":"content:Typescript:Add global variable to window.md","_source":"content","_file":"Typescript/Add global variable to window.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/KIXVn92YTN.json b/api/_content/query/KIXVn92YTN.json
index 9c2166c..8b5b063 100644
--- a/api/_content/query/KIXVn92YTN.json
+++ b/api/_content/query/KIXVn92YTN.json
@@ -1 +1 @@
-{"_path":"/frontend/react/axios-refresh-token-on-react","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios Refresh Token On React","description":"<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"axios\""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"React"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-706917"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7232c4"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-a6fb7c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-a6fb7c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be5dc3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-a6fb7c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be5dc3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  client: "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03cd7c"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-03cd7c"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  )."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"<() "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":">(() "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-11fa4d"},"children":[{"type":"text","value":"// TODO: implement me"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"not implemented\""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-11fa4d"},"children":[{"type":"text","value":"// append `access` token to all requests"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"`Bearer ${"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-4c3a40"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-11fa4d"},"children":[{"type":"text","value":"// refreshing interceptor"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3a7a8"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c10737"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f16f1"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-acc80e"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"              Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-d81eef"},"children":[{"type":"text","value":"\"Bearer \""}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c81972"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"{{ "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" }}"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"        {"}]},{"type":"element","tag":"span","props":{"class":"ct-e6282b"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-799eb0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"</"}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useAPI"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-2503cc"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e8515f"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9878b7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-592be9"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-11a550"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0f16f1{color:#79C0FF}.ct-c10737{color:#79C0FF}.ct-4c3a40{color:#A5D6FF}.ct-11fa4d{color:#8B949E}.ct-03cd7c{color:#FFA657}.ct-acc80e{color:#79C0FF}.ct-c81972{color:#79C0FF}.ct-2503cc{color:#FF7B72}.ct-e8515f{color:#D2A8FF}.ct-be5dc3{color:#79C0FF}.ct-a6fb7c{color:#FF7B72}.ct-e6282b{color:#FFA657}.ct-7232c4{color:#79C0FF}.ct-706917{color:#FFA657}.ct-799eb0{color:#C9D1D9}.ct-d3a7a8{color:#FF7B72}.ct-d81eef{color:#A5D6FF}.ct-592be9{color:#C9D1D9}.ct-11a550{color:#C9D1D9}.ct-9878b7{color:#FF7B72}.light .ct-9878b7{color:#859900}.light .ct-11a550{color:#657B83}.light .ct-592be9{color:#268BD2}.light .ct-d81eef{color:#2AA198}.light .ct-d3a7a8{color:#073642}.light .ct-799eb0{color:#657B83}.light .ct-706917{color:#268BD2}.light .ct-7232c4{color:#657B83}.light .ct-e6282b{color:#657B83}.light .ct-a6fb7c{color:#859900}.light .ct-be5dc3{color:#859900}.light .ct-e8515f{color:#268BD2}.light .ct-2503cc{color:#073642}.light .ct-c81972{color:#859900}.light .ct-acc80e{color:#268BD2}.light .ct-03cd7c{color:#268BD2}.light .ct-11fa4d{color:#93A1A1}.light .ct-4c3a40{color:#657B83}.light .ct-c10737{color:#D33682}.light .ct-0f16f1{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios refresh token on React.md","_source":"content","_file":"Frontend/React/Axios refresh token on React.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/react/axios-refresh-token-on-react","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios Refresh Token On React","description":"<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<ApiProvider />"}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () => void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC<APIProviderProps> = ({ \n    tokens, \n    logout, \n    children,\n}) => {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback<() => string>(() => {\n    // TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() => {\n    if (!tokens.access) {\n      return;\n    }\n\n    // append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) => {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) => {\n        Promise.reject(error);\n      }\n    );\n\n    // refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) => {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () => {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    <APIContext.Provider value={{ client }}>\n        {children}\n    </APIContext.Provider>\n  );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"axios\""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"React"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-658312"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fcc667"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-25aec3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-25aec3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c2e231"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-25aec3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c2e231"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  client: "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e6a4e"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8e6a4e"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  )."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"<() "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":">(() "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-3967a7"},"children":[{"type":"text","value":"// TODO: implement me"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"not implemented\""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-3967a7"},"children":[{"type":"text","value":"// append `access` token to all requests"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"`Bearer ${"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-2b09b3"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-3967a7"},"children":[{"type":"text","value":"// refreshing interceptor"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-563bf4"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8c07f5"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9a486a"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-401d6b"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"              Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-eebfe7"},"children":[{"type":"text","value":"\"Bearer \""}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae446b"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"{{ "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" }}"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"        {"}]},{"type":"element","tag":"span","props":{"class":"ct-7609cd"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-32b8c3"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"</"}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useAPI"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-1eb103"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3cc3c7"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c3ad92"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-83746d"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb1cf"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9a486a{color:#79C0FF}.ct-8c07f5{color:#79C0FF}.ct-2b09b3{color:#A5D6FF}.ct-3967a7{color:#8B949E}.ct-8e6a4e{color:#FFA657}.ct-401d6b{color:#79C0FF}.ct-ae446b{color:#79C0FF}.ct-1eb103{color:#FF7B72}.ct-3cc3c7{color:#D2A8FF}.ct-c2e231{color:#79C0FF}.ct-25aec3{color:#FF7B72}.ct-7609cd{color:#FFA657}.ct-fcc667{color:#79C0FF}.ct-658312{color:#FFA657}.ct-32b8c3{color:#C9D1D9}.ct-563bf4{color:#FF7B72}.ct-eebfe7{color:#A5D6FF}.ct-83746d{color:#C9D1D9}.ct-ffb1cf{color:#C9D1D9}.ct-c3ad92{color:#FF7B72}.light .ct-c3ad92{color:#859900}.light .ct-ffb1cf{color:#657B83}.light .ct-83746d{color:#268BD2}.light .ct-eebfe7{color:#2AA198}.light .ct-563bf4{color:#073642}.light .ct-32b8c3{color:#657B83}.light .ct-658312{color:#268BD2}.light .ct-fcc667{color:#657B83}.light .ct-7609cd{color:#657B83}.light .ct-25aec3{color:#859900}.light .ct-c2e231{color:#859900}.light .ct-3cc3c7{color:#268BD2}.light .ct-1eb103{color:#073642}.light .ct-ae446b{color:#859900}.light .ct-401d6b{color:#268BD2}.light .ct-8e6a4e{color:#268BD2}.light .ct-3967a7{color:#93A1A1}.light .ct-2b09b3{color:#657B83}.light .ct-8c07f5{color:#D33682}.light .ct-9a486a{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios refresh token on React.md","_source":"content","_file":"Frontend/React/Axios refresh token on React.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/LKdFxpydAG.json b/api/_content/query/LKdFxpydAG.json
index e153168..41751eb 100644
--- a/api/_content/query/LKdFxpydAG.json
+++ b/api/_content/query/LKdFxpydAG.json
@@ -1 +1 @@
-{"_path":"/sql/postgress-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Postgress Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"local   all             postgres                                md5\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo systemctl restart postgresql\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo systemctl status postgresql.service"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo -u postgres psql"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"Type "}]},{"type":"element","tag":"span","props":{"class":"ct-ac5306"},"children":[{"type":"text","value":"\"help\""}]},{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b2131c"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":" help."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"postgres="}]},{"type":"element","tag":"span","props":{"class":"ct-762d70"},"children":[{"type":"text","value":"#"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5c976"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"   all             postgres                                peer"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"local   all             postgres                                md5"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"sudo systemctl restart postgresql"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75e384"},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d5c976{color:#FF7B72}.ct-762d70{color:#8B949E}.ct-b2131c{color:#FF7B72}.ct-ac5306{color:#A5D6FF}.ct-75e384{color:#C9D1D9}.light .ct-75e384{color:#657B83}.light .ct-ac5306{color:#2AA198}.light .ct-b2131c{color:#859900}.light .ct-762d70{color:#93A1A1}.light .ct-d5c976{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-postgresql-12-on-ubuntu-2004-lts","depth":2,"text":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"},{"id":"initial-database-connection","depth":2,"text":"Initial database connection"},{"id":"set-password-for-postgres-database-user","depth":2,"text":"Set password for postgres database user","children":[{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password","depth":3,"text":"Update pg_hba.conf to allow postgres user connections with password"}]},{"id":"creation-of-additional-database-users","depth":2,"text":"Creation of additional database users"},{"id":"creation-of-additional-databases","depth":2,"text":"Creation of additional databases"}]}},"_type":"markdown","_id":"content:SQL:Postgress setup.md","_source":"content","_file":"SQL/Postgress setup.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/sql/postgress-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Postgress Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"local   all             postgres                                md5\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo systemctl restart postgresql\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo systemctl status postgresql.service"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo -u postgres psql"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"Type "}]},{"type":"element","tag":"span","props":{"class":"ct-ba5945"},"children":[{"type":"text","value":"\"help\""}]},{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d29114"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":" help."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"postgres="}]},{"type":"element","tag":"span","props":{"class":"ct-fd9161"},"children":[{"type":"text","value":"#"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-635706"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"   all             postgres                                peer"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local   all             postgres                                md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"local   all             postgres                                md5"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"sudo systemctl restart postgresql"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5ed0d1"},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\n           |          |          |             |             | postgres=CTc/postgres"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-635706{color:#FF7B72}.ct-fd9161{color:#8B949E}.ct-d29114{color:#FF7B72}.ct-ba5945{color:#A5D6FF}.ct-5ed0d1{color:#C9D1D9}.light .ct-5ed0d1{color:#657B83}.light .ct-ba5945{color:#2AA198}.light .ct-d29114{color:#859900}.light .ct-fd9161{color:#93A1A1}.light .ct-635706{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-postgresql-12-on-ubuntu-2004-lts","depth":2,"text":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"},{"id":"initial-database-connection","depth":2,"text":"Initial database connection"},{"id":"set-password-for-postgres-database-user","depth":2,"text":"Set password for postgres database user","children":[{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password","depth":3,"text":"Update pg_hba.conf to allow postgres user connections with password"}]},{"id":"creation-of-additional-database-users","depth":2,"text":"Creation of additional database users"},{"id":"creation-of-additional-databases","depth":2,"text":"Creation of additional databases"}]}},"_type":"markdown","_id":"content:SQL:Postgress setup.md","_source":"content","_file":"SQL/Postgress setup.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/Llpj9LBd4i.json b/api/_content/query/Llpj9LBd4i.json
index 3e05cf0..9c0e29d 100644
--- a/api/_content/query/Llpj9LBd4i.json
+++ b/api/_content/query/Llpj9LBd4i.json
@@ -1 +1 @@
-{"_path":"/frontend/vue/adding-global-properties-to-component","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Adding Global Properties To Component","description":"The topic's fully covered in the official documentation and in Add global variable to window.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-964d2b"},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a5de92"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a3ca8a"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a5de92"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-49add5"},"children":[{"type":"text","value":"'axios'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f0d2a"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f0d2a"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-49add5"},"children":[{"type":"text","value":"'vue'"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8f0d2a"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cee846"},"children":[{"type":"text","value":"ComponentCustomProperties"}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-9299ea"},"children":[{"type":"text","value":"$translate"}]},{"type":"element","tag":"span","props":{"class":"ct-00bcc1"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-ad6170"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-00bcc1"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cb7d06"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c23435"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-38a198"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cb7d06"},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59b12a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-c23435{color:#FF7B72}.ct-cb7d06{color:#79C0FF}.ct-ad6170{color:#FFA657}.ct-00bcc1{color:#FF7B72}.ct-9299ea{color:#D2A8FF}.ct-38a198{color:#C9D1D9}.ct-cee846{color:#FFA657}.ct-8f0d2a{color:#FF7B72}.ct-49add5{color:#A5D6FF}.ct-a3ca8a{color:#C9D1D9}.ct-59b12a{color:#C9D1D9}.ct-a5de92{color:#FF7B72}.ct-964d2b{color:#8B949E}.light .ct-964d2b{color:#93A1A1}.light .ct-a5de92{color:#859900}.light .ct-59b12a{color:#657B83}.light .ct-a3ca8a{color:#268BD2}.light .ct-49add5{color:#2AA198}.light .ct-8f0d2a{color:#073642}.light .ct-cee846{color:#268BD2}.light .ct-38a198{color:#657B83}.light .ct-9299ea{color:#268BD2}.light .ct-00bcc1{color:#859900}.light .ct-ad6170{color:#657B83}.light .ct-cb7d06{color:#859900}.light .ct-c23435{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Adding global properties to component.md","_source":"content","_file":"Frontend/Vue/Adding global properties to component.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/vue/adding-global-properties-to-component","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Adding Global Properties To Component","description":"The topic's fully covered in the official documentation and in Add global variable to window.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) => string\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cfd4ea"},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d02a4e"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f9fd34"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d02a4e"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9f76f6"},"children":[{"type":"text","value":"'axios'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7904bc"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7904bc"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9f76f6"},"children":[{"type":"text","value":"'vue'"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7904bc"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b4ae5a"},"children":[{"type":"text","value":"ComponentCustomProperties"}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-fea5b6"},"children":[{"type":"text","value":"$translate"}]},{"type":"element","tag":"span","props":{"class":"ct-170947"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-de2a30"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-170947"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2d5bd5"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-82a210"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-3f5f3d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2d5bd5"},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-69c0b2"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-82a210{color:#FF7B72}.ct-2d5bd5{color:#79C0FF}.ct-de2a30{color:#FFA657}.ct-170947{color:#FF7B72}.ct-fea5b6{color:#D2A8FF}.ct-3f5f3d{color:#C9D1D9}.ct-b4ae5a{color:#FFA657}.ct-7904bc{color:#FF7B72}.ct-9f76f6{color:#A5D6FF}.ct-f9fd34{color:#C9D1D9}.ct-69c0b2{color:#C9D1D9}.ct-d02a4e{color:#FF7B72}.ct-cfd4ea{color:#8B949E}.light .ct-cfd4ea{color:#93A1A1}.light .ct-d02a4e{color:#859900}.light .ct-69c0b2{color:#657B83}.light .ct-f9fd34{color:#268BD2}.light .ct-9f76f6{color:#2AA198}.light .ct-7904bc{color:#073642}.light .ct-b4ae5a{color:#268BD2}.light .ct-3f5f3d{color:#657B83}.light .ct-fea5b6{color:#268BD2}.light .ct-170947{color:#859900}.light .ct-de2a30{color:#657B83}.light .ct-2d5bd5{color:#859900}.light .ct-82a210{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Adding global properties to component.md","_source":"content","_file":"Frontend/Vue/Adding global properties to component.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/O9PBAkuWXG.json b/api/_content/query/O9PBAkuWXG.json
index a39014c..b2d765e 100644
--- a/api/_content/query/O9PBAkuWXG.json
+++ b/api/_content/query/O9PBAkuWXG.json
@@ -1 +1 @@
-{"_path":"/graphql/refresh-token-in-apollo-client","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Token In Apollo Client","description":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"createApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"authorization"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f47e40"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"<"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"    { "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  >,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"ApolloClientBase"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    link: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"ApolloLink"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"setContext"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"HttpLink"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        fetch: "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    ]),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f47e40"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** Checks if GraphQl errors has unauthenticated error */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<{ "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"ErrorCode"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" }>)"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"isArray"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"some"}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b69e3c"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// Distinguish unauthorized error here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** Detects if customFetch is sending refresh request */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"operationName"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"'RefreshToken'"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      { accessToken: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  ) "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Response"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// already refreshing token, wait for it and then use refreshed token"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// or use empty authorization if refreshing failed"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f47e40"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":">)?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-50e6c4"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// check for unauthorized errors, if not present, just return result"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          ok: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"unknown"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// If unauthorized, refresh token and try again"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-29d287"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ec17"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// can't refresh token. logging out"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-77f781"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// success or any non-auth error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-0e97d6"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-37732a"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-ea52b2"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4d36d3"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-9d9165"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb4541"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// wait for other request's refreshing query to finish, when retry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-c40f93"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-0f6e5e"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c33345"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-356b7f"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908211"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-1b4494"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f5cf46"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1b4494{color:#A5D6FF}.ct-50e6c4{color:#79C0FF}.ct-b69e3c{color:#79C0FF}.ct-29d287{color:#FFA657}.ct-a0ec17{color:#79C0FF}.ct-356b7f{color:#C9D1D9}.ct-0f6e5e{color:#8B949E}.ct-f47e40{color:#FFA657}.ct-9d9165{color:#FF7B72}.ct-0e97d6{color:#D2A8FF}.ct-77f781{color:#79C0FF}.ct-4d36d3{color:#79C0FF}.ct-ea52b2{color:#FF7B72}.ct-37732a{color:#FFA657}.ct-fb4541{color:#C9D1D9}.ct-c33345{color:#D2A8FF}.ct-c40f93{color:#FF7B72}.ct-f5cf46{color:#C9D1D9}.ct-908211{color:#FF7B72}.light .ct-908211{color:#859900}.light .ct-f5cf46{color:#657B83}.light .ct-c40f93{color:#073642}.light .ct-c33345{color:#268BD2}.light .ct-fb4541{color:#657B83}.light .ct-37732a{color:#657B83}.light .ct-ea52b2{color:#859900}.light .ct-4d36d3{color:#859900}.light .ct-77f781{color:#859900}.light .ct-0e97d6{color:#268BD2}.light .ct-9d9165{color:#073642}.light .ct-f47e40{color:#268BD2}.light .ct-0f6e5e{color:#93A1A1}.light .ct-356b7f{color:#268BD2}.light .ct-a0ec17{color:#B58900}.light .ct-29d287{color:#268BD2}.light .ct-b69e3c{color:#D33682}.light .ct-50e6c4{color:#268BD2}.light .ct-1b4494{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Refresh token in Apollo client.md","_source":"content","_file":"GraphQL/Refresh token in Apollo client.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/graphql/refresh-token-in-apollo-client","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Token In Apollo Client","description":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n  url: string,\n  logout: () => void,\n  getAuthorizationData: () => { authorization: string },\n  refreshToken: () => Promise<\n    { accessToken: string; refreshToken: string } | undefined\n  >,\n) =>\n  new ApolloClientBase({\n    // ...other options\n    link: ApolloLink.from([\n      // ...other options\n      setContext(async (_, { headers }) => {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"createApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"authorization"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca0cf6"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"<"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"    { "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  >,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"ApolloClientBase"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    link: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"ApolloLink"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"setContext"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"HttpLink"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        fetch: "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    ]),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise<string> | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n  Array.isArray(errors) &&\n  errors.some(error => {\n    return error.status === 401; // Distinguish unauthorized error here\n  });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n  (\n    logout: () => void,\n    refreshToken: () => Promise<\n      { accessToken: string; refreshToken: string } | undefined\n    >,\n  ) =>\n  async (uri: string, options: RequestInit): Promise<Response> => {\n    // already refreshing token, wait for it and then use refreshed token\n    // or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record<string, string>)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() => {\n          // refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response => {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      // check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =>\n            new Promise<unknown>(resolve => {\n              resolve(json);\n            }),\n          text: async () =>\n            new Promise<string>(resolve => {\n              resolve(text);\n            }),\n        };\n      }\n\n      // If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise<string> => {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() => {\n            refreshingPromise = null;\n\n            // can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      // success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) => {\n          // wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () => {\n          // refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca0cf6"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** Checks if GraphQl errors has unauthenticated error */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<{ "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"ErrorCode"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" }>)"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"isArray"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"some"}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-794d9c"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// Distinguish unauthorized error here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** Detects if customFetch is sending refresh request */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"operationName"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"'RefreshToken'"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      { accessToken: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  ) "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Response"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// already refreshing token, wait for it and then use refreshed token"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// or use empty authorization if refreshing failed"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      ("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca0cf6"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":">)?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cfe6b"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// check for unauthorized errors, if not present, just return result"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          ok: "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"unknown"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// If unauthorized, refresh token and try again"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce142c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          ."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8e385c"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// can't refresh token. logging out"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa3ed2"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// success or any non-auth error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-b00082"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2bba21"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-c5dc1a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-569fe7"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-00cc54"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8833d9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// wait for other request's refreshing query to finish, when retry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        ."}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0a39b4"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-d5484c"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-328f45"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-083158"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e0ce90"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"              authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-1732fc"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"            },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"          });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"        });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fb7a00"},"children":[{"type":"text","value":"  };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1732fc{color:#A5D6FF}.ct-7cfe6b{color:#79C0FF}.ct-794d9c{color:#79C0FF}.ct-ce142c{color:#FFA657}.ct-8e385c{color:#79C0FF}.ct-083158{color:#C9D1D9}.ct-d5484c{color:#8B949E}.ct-ca0cf6{color:#FFA657}.ct-00cc54{color:#FF7B72}.ct-b00082{color:#D2A8FF}.ct-aa3ed2{color:#79C0FF}.ct-569fe7{color:#79C0FF}.ct-c5dc1a{color:#FF7B72}.ct-2bba21{color:#FFA657}.ct-8833d9{color:#C9D1D9}.ct-328f45{color:#D2A8FF}.ct-0a39b4{color:#FF7B72}.ct-fb7a00{color:#C9D1D9}.ct-e0ce90{color:#FF7B72}.light .ct-e0ce90{color:#859900}.light .ct-fb7a00{color:#657B83}.light .ct-0a39b4{color:#073642}.light .ct-328f45{color:#268BD2}.light .ct-8833d9{color:#657B83}.light .ct-2bba21{color:#657B83}.light .ct-c5dc1a{color:#859900}.light .ct-569fe7{color:#859900}.light .ct-aa3ed2{color:#859900}.light .ct-b00082{color:#268BD2}.light .ct-00cc54{color:#073642}.light .ct-ca0cf6{color:#268BD2}.light .ct-d5484c{color:#93A1A1}.light .ct-083158{color:#268BD2}.light .ct-8e385c{color:#B58900}.light .ct-ce142c{color:#268BD2}.light .ct-794d9c{color:#D33682}.light .ct-7cfe6b{color:#268BD2}.light .ct-1732fc{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Refresh token in Apollo client.md","_source":"content","_file":"GraphQL/Refresh token in Apollo client.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/PwERR4vHv2.json b/api/_content/query/PwERR4vHv2.json
index 58f3a9d..56017b1 100644
--- a/api/_content/query/PwERR4vHv2.json
+++ b/api/_content/query/PwERR4vHv2.json
@@ -1 +1 @@
-{"_path":"/frontend/react-native/oauth2-login","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"OAuth2 Login","description":"Use #oauth2 login with React-Native","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-53e16d"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'react-native-app-auth'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e2cf44"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eb0424"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  issuer: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'https://accounts.google.com'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}.apps.googleusercontent.com`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`com.yourapp:/oauth2redirect/google`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'openid'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'profile'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-7a29da"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"});"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-e2cf44"},"children":[{"type":"text","value":"// better hide it somehow"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'com.yourapp'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7182d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62cb9a"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-eb0424"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  serviceConfiguration: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"    authorizationEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/authorize?response_type=code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}&redirect_uri=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-e2cf44"},"children":[{"type":"text","value":"// TODO: replace it with your own backend to secure client_secret:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"    tokenEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}&client_secret=${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-647b71"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'login:info'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-08d1e5"},"children":[{"type":"text","value":"'login:avatar'"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-7a29da"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb0424"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-53e16d"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-53e16d"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-fc33e3"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-7a29da{color:#79C0FF}.ct-eb0424{color:#D2A8FF}.ct-e2cf44{color:#8B949E}.ct-647b71{color:#79C0FF}.ct-b7182d{color:#FF7B72}.ct-08d1e5{color:#A5D6FF}.ct-53e16d{color:#C9D1D9}.ct-fc33e3{color:#C9D1D9}.ct-62cb9a{color:#FF7B72}.light .ct-62cb9a{color:#859900}.light .ct-fc33e3{color:#657B83}.light .ct-53e16d{color:#268BD2}.light .ct-08d1e5{color:#2AA198}.light .ct-b7182d{color:#073642}.light .ct-647b71{color:#268BD2}.light .ct-e2cf44{color:#93A1A1}.light .ct-eb0424{color:#268BD2}.light .ct-7a29da{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"common-oauth2-providers","depth":2,"text":"Common OAuth2 providers","children":[{"id":"example-for-google","depth":3,"text":"Example for #Google"},{"id":"example-for-yandex","depth":3,"text":"Example for #Yandex"}]},{"id":"apple-id-login","depth":2,"text":"Apple ID login"}]}},"_type":"markdown","_id":"content:Frontend:React Native:OAuth2 login.md","_source":"content","_file":"Frontend/React Native/OAuth2 login.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/react-native/oauth2-login","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"OAuth2 Login","description":"Use #oauth2 login with React-Native","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n  issuer: 'https://accounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:/oauth2redirect/google`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-0a1449"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'react-native-app-auth'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-00a861"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-396058"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  issuer: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'https://accounts.google.com'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}.apps.googleusercontent.com`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`com.yourapp:/oauth2redirect/google`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'openid'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'profile'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e8c56"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"});"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n    // TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:/oauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-00a861"},"children":[{"type":"text","value":"// better hide it somehow"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'com.yourapp'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d7da86"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4335f"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-396058"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  serviceConfiguration: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"    authorizationEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/authorize?response_type=code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}&redirect_uri=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-00a861"},"children":[{"type":"text","value":"// TODO: replace it with your own backend to secure client_secret:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"    tokenEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}&client_secret=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7335a4"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'login:info'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-979b43"},"children":[{"type":"text","value":"'login:avatar'"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"  dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e8c56"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-396058"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-0a1449"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0a1449"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-3e85b2"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1e8c56{color:#79C0FF}.ct-396058{color:#D2A8FF}.ct-00a861{color:#8B949E}.ct-7335a4{color:#79C0FF}.ct-d7da86{color:#FF7B72}.ct-979b43{color:#A5D6FF}.ct-0a1449{color:#C9D1D9}.ct-3e85b2{color:#C9D1D9}.ct-f4335f{color:#FF7B72}.light .ct-f4335f{color:#859900}.light .ct-3e85b2{color:#657B83}.light .ct-0a1449{color:#268BD2}.light .ct-979b43{color:#2AA198}.light .ct-d7da86{color:#073642}.light .ct-7335a4{color:#268BD2}.light .ct-00a861{color:#93A1A1}.light .ct-396058{color:#268BD2}.light .ct-1e8c56{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"common-oauth2-providers","depth":2,"text":"Common OAuth2 providers","children":[{"id":"example-for-google","depth":3,"text":"Example for #Google"},{"id":"example-for-yandex","depth":3,"text":"Example for #Yandex"}]},{"id":"apple-id-login","depth":2,"text":"Apple ID login"}]}},"_type":"markdown","_id":"content:Frontend:React Native:OAuth2 login.md","_source":"content","_file":"Frontend/React Native/OAuth2 login.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/QqziXmSF9l.json b/api/_content/query/QqziXmSF9l.json
index 39b9b71..13a6cad 100644
--- a/api/_content/query/QqziXmSF9l.json
+++ b/api/_content/query/QqziXmSF9l.json
@@ -1 +1 @@
-{"_path":"/frontend/react-native/useful-comands","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Useful Comands","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"adb logcat com.application:I \"*:S\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"keytool -printcert -jarfile \"$1\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"adb logcat com.application:I "}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\"*:S\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"keytool -printcert -jarfile "}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"npx react-native bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --platform android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --dev "}]},{"type":"element","tag":"span","props":{"class":"ct-c76252"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --entry-file index.js \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --bundle-output android/app/src/main/assets/index.android.bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  --assets-dest android/app/src/main/res/"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c76252"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" android "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" ./gradlew assembleDebug"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7680f5"},"children":[{"type":"text","value":"# do your stuff"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"./gradlew clean"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c76252"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" ./android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" ./gradlew assembleRelease \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" adb install ./app/build/outputs/apk/release/app-release.apk"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7680f5"},"children":[{"type":"text","value":"# ios "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"xcrun simctl openurl booted "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7680f5"},"children":[{"type":"text","value":"# android"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"adb shell am start -W -a android.intent.action.VIEW -d "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"com.application"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"PACKAGE="}]},{"type":"element","tag":"span","props":{"class":"ct-3cfff2"},"children":[{"type":"text","value":"\"com.application\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"adb shell pm set-app-links --package "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"PACKAGE"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" 0 all "}]},{"type":"element","tag":"span","props":{"class":"ct-3aa5ab"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04e482"},"children":[{"type":"text","value":"  adb shell pm verify-app-links --re-verify "}]},{"type":"element","tag":"span","props":{"class":"ct-b8df69"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-79725d"},"children":[{"type":"text","value":"PACKAGE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-7680f5{color:#8B949E}.ct-3aa5ab{color:#FF7B72}.ct-c76252{color:#79C0FF}.ct-79725d{color:#C9D1D9}.ct-b8df69{color:#C9D1D9}.ct-3cfff2{color:#A5D6FF}.ct-04e482{color:#C9D1D9}.light .ct-04e482{color:#657B83}.light .ct-3cfff2{color:#2AA198}.light .ct-b8df69{color:#859900}.light .ct-79725d{color:#268BD2}.light .ct-c76252{color:#268BD2}.light .ct-3aa5ab{color:#859900}.light .ct-7680f5{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"show-android-logcat","depth":2,"text":"Show android logcat"},{"id":"get-apks-sha-256","depth":2,"text":"Get .apk's SHA-256"},{"id":"assemble-debug-release-on-android","depth":2,"text":"Assemble debug release on Android"},{"id":"send-release-to-android-device","depth":2,"text":"Send release to Android device"},{"id":"deep-links","depth":2,"text":"Deep links","children":[{"id":"open-deep-links","depth":3,"text":"Open deep links"},{"id":"reverify-links-on-android","depth":3,"text":"Reverify links on Android"}]}]}},"_type":"markdown","_id":"content:Frontend:React Native:Useful comands.md","_source":"content","_file":"Frontend/React Native/Useful comands.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/react-native/useful-comands","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Useful Comands","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"adb logcat com.application:I \"*:S\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"keytool -printcert -jarfile \"$1\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"adb logcat com.application:I "}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\"*:S\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"keytool -printcert -jarfile "}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android/app/src/main/assets/index.android.bundle \\\n  --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"npx react-native bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --platform android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --dev "}]},{"type":"element","tag":"span","props":{"class":"ct-445c29"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --entry-file index.js \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --bundle-output android/app/src/main/assets/index.android.bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  --assets-dest android/app/src/main/res/"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-445c29"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" android "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" ./gradlew assembleDebug"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b49f06"},"children":[{"type":"text","value":"# do your stuff"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"./gradlew clean"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n  && ./gradlew assembleRelease \\\n  && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-445c29"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" ./android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" ./gradlew assembleRelease \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" adb install ./app/build/outputs/apk/release/app-release.apk"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b49f06"},"children":[{"type":"text","value":"# ios "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"xcrun simctl openurl booted "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b49f06"},"children":[{"type":"text","value":"# android"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"adb shell am start -W -a android.intent.action.VIEW -d "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"com.application"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"PACKAGE="}]},{"type":"element","tag":"span","props":{"class":"ct-bdbf7d"},"children":[{"type":"text","value":"\"com.application\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"adb shell pm set-app-links --package "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"PACKAGE"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" 0 all "}]},{"type":"element","tag":"span","props":{"class":"ct-962490"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0bd10a"},"children":[{"type":"text","value":"  adb shell pm verify-app-links --re-verify "}]},{"type":"element","tag":"span","props":{"class":"ct-1f82bb"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ebfa"},"children":[{"type":"text","value":"PACKAGE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b49f06{color:#8B949E}.ct-962490{color:#FF7B72}.ct-445c29{color:#79C0FF}.ct-a8ebfa{color:#C9D1D9}.ct-1f82bb{color:#C9D1D9}.ct-bdbf7d{color:#A5D6FF}.ct-0bd10a{color:#C9D1D9}.light .ct-0bd10a{color:#657B83}.light .ct-bdbf7d{color:#2AA198}.light .ct-1f82bb{color:#859900}.light .ct-a8ebfa{color:#268BD2}.light .ct-445c29{color:#268BD2}.light .ct-962490{color:#859900}.light .ct-b49f06{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"show-android-logcat","depth":2,"text":"Show android logcat"},{"id":"get-apks-sha-256","depth":2,"text":"Get .apk's SHA-256"},{"id":"assemble-debug-release-on-android","depth":2,"text":"Assemble debug release on Android"},{"id":"send-release-to-android-device","depth":2,"text":"Send release to Android device"},{"id":"deep-links","depth":2,"text":"Deep links","children":[{"id":"open-deep-links","depth":3,"text":"Open deep links"},{"id":"reverify-links-on-android","depth":3,"text":"Reverify links on Android"}]}]}},"_type":"markdown","_id":"content:Frontend:React Native:Useful comands.md","_source":"content","_file":"Frontend/React Native/Useful comands.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/S7L9CBleOj.json b/api/_content/query/S7L9CBleOj.json
index 401c27a..5273c25 100644
--- a/api/_content/query/S7L9CBleOj.json
+++ b/api/_content/query/S7L9CBleOj.json
@@ -1 +1 @@
-{"_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Make Nuxt Handle Obsidian Highlights","description":"By default Nuxt Content Plugin not handling <span class=\"highlight\">highlight</span> links. To fix that we will create Nitro plugin:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-07bca4"},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac2020"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ac2020"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-61e645"},"children":[{"type":"text","value":"defineNitroPlugin"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":"((nitroApp) "}]},{"type":"element","tag":"span","props":{"class":"ct-1a60f0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0ba54a"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"nitroApp"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"hooks"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d24565"},"children":[{"type":"text","value":"hook"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-89c7d8"},"children":[{"type":"text","value":"\"content:file:beforeParse\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"_id"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d24565"},"children":[{"type":"text","value":"endsWith"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-89c7d8"},"children":[{"type":"text","value":"\".md\""}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-64dc60"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d24565"},"children":[{"type":"text","value":"replace"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-061337"},"children":[{"type":"text","value":"/==("}]},{"type":"element","tag":"span","props":{"class":"ct-6a52e4"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"^"}]},{"type":"element","tag":"span","props":{"class":"ct-6a52e4"},"children":[{"type":"text","value":"=]"}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-061337"},"children":[{"type":"text","value":")==/"}]},{"type":"element","tag":"span","props":{"class":"ct-1be858"},"children":[{"type":"text","value":"gs"}]},{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-89c7d8"},"children":[{"type":"text","value":"`<span class=\"highlight\">$1</span>`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"      );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-67d53e"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0ba54a"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf5f"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-0ba54a"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6a52e4{color:#79C0FF}.ct-061337{color:#A5D6FF}.ct-1be858{color:#FF7B72}.ct-89c7d8{color:#A5D6FF}.ct-d24565{color:#D2A8FF}.ct-64dc60{color:#C9D1D9}.ct-67d53e{color:#C9D1D9}.ct-0ba54a{color:#C9D1D9}.ct-1a60f0{color:#FF7B72}.ct-61e645{color:#D2A8FF}.ct-6fcf5f{color:#FFA657}.ct-ac2020{color:#FF7B72}.ct-07bca4{color:#8B949E}.light .ct-07bca4{color:#93A1A1}.light .ct-ac2020{color:#859900}.light .ct-6fcf5f{color:#657B83}.light .ct-61e645{color:#268BD2}.light .ct-1a60f0{color:#073642}.light .ct-0ba54a{color:#657B83}.light .ct-67d53e{color:#657B83}.light .ct-64dc60{color:#268BD2}.light .ct-d24565{color:#268BD2}.light .ct-89c7d8{color:#2AA198}.light .ct-1be858{color:#859900}.light .ct-061337{color:#D30102}.light .ct-6a52e4{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md","_source":"content","_file":"Frontend/Vue/Make Nuxt handle Obsidian highlights.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Make Nuxt Handle Obsidian Highlights","description":"By default Nuxt Content Plugin not handling <span class=\"highlight\">highlight</span> links. To fix that we will create Nitro plugin:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"<span class=\"highlight\">highlight</span>"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        /==([^=]+)==/gs,\n        `<span class=\"highlight\">$1</span>`\n      );\n    }\n  });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e7616"},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8942f2"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8942f2"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d318f7"},"children":[{"type":"text","value":"defineNitroPlugin"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":"((nitroApp) "}]},{"type":"element","tag":"span","props":{"class":"ct-1d2692"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8b69f"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"nitroApp"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"hooks"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef647"},"children":[{"type":"text","value":"hook"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4c47aa"},"children":[{"type":"text","value":"\"content:file:beforeParse\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"_id"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef647"},"children":[{"type":"text","value":"endsWith"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-4c47aa"},"children":[{"type":"text","value":"\".md\""}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-710984"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef647"},"children":[{"type":"text","value":"replace"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-817c63"},"children":[{"type":"text","value":"/==("}]},{"type":"element","tag":"span","props":{"class":"ct-64c297"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"^"}]},{"type":"element","tag":"span","props":{"class":"ct-64c297"},"children":[{"type":"text","value":"=]"}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-817c63"},"children":[{"type":"text","value":")==/"}]},{"type":"element","tag":"span","props":{"class":"ct-1a88aa"},"children":[{"type":"text","value":"gs"}]},{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4c47aa"},"children":[{"type":"text","value":"`<span class=\"highlight\">$1</span>`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"      );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bb40ca"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8b69f"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-f01136"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-c8b69f"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-64c297{color:#79C0FF}.ct-817c63{color:#A5D6FF}.ct-1a88aa{color:#FF7B72}.ct-4c47aa{color:#A5D6FF}.ct-6ef647{color:#D2A8FF}.ct-710984{color:#C9D1D9}.ct-bb40ca{color:#C9D1D9}.ct-c8b69f{color:#C9D1D9}.ct-1d2692{color:#FF7B72}.ct-d318f7{color:#D2A8FF}.ct-f01136{color:#FFA657}.ct-8942f2{color:#FF7B72}.ct-2e7616{color:#8B949E}.light .ct-2e7616{color:#93A1A1}.light .ct-8942f2{color:#859900}.light .ct-f01136{color:#657B83}.light .ct-d318f7{color:#268BD2}.light .ct-1d2692{color:#073642}.light .ct-c8b69f{color:#657B83}.light .ct-bb40ca{color:#657B83}.light .ct-710984{color:#268BD2}.light .ct-6ef647{color:#268BD2}.light .ct-4c47aa{color:#2AA198}.light .ct-1a88aa{color:#859900}.light .ct-817c63{color:#D30102}.light .ct-64c297{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md","_source":"content","_file":"Frontend/Vue/Make Nuxt handle Obsidian highlights.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/TvYXYGXdZ0.json b/api/_content/query/TvYXYGXdZ0.json
index f2a86df..a1301fd 100644
--- a/api/_content/query/TvYXYGXdZ0.json
+++ b/api/_content/query/TvYXYGXdZ0.json
@@ -1 +1 @@
-{"_path":"/sql/mysql-and-mariadb-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"MySQL And MariaDB Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"...\nbind-address = 0.0.0.0\n...\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FLUSH PRIVILEGES;\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"sudo apt install mariadb-server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"sudo mysql_secure_installation"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"bind-"}]},{"type":"element","tag":"span","props":{"class":"ct-96f3dd"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":" = 0.0.0.0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fe866"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FLUSH PRIVILEGES;"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-96f3dd{color:#FF7B72}.ct-4fe866{color:#C9D1D9}.light .ct-4fe866{color:#657B83}.light .ct-96f3dd{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-mariadb-on-ubuntu-2004-lts","depth":2,"text":"Install MariaDB on Ubuntu 20.04 LTS"},{"id":"access-database-from-outside","depth":2,"text":"Access Database from outside"},{"id":"create-administrative-user","depth":2,"text":"Create Administrative User"}]}},"_type":"markdown","_id":"content:SQL:MySQL and MariaDB setup.md","_source":"content","_file":"SQL/MySQL and MariaDB setup.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/sql/mysql-and-mariadb-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"MySQL And MariaDB Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"...\nbind-address = 0.0.0.0\n...\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FLUSH PRIVILEGES;\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"sudo apt install mariadb-server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"sudo mysql_secure_installation"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"bind-"}]},{"type":"element","tag":"span","props":{"class":"ct-9b603b"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":" = 0.0.0.0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b86932"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FLUSH PRIVILEGES;"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9b603b{color:#FF7B72}.ct-b86932{color:#C9D1D9}.light .ct-b86932{color:#657B83}.light .ct-9b603b{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-mariadb-on-ubuntu-2004-lts","depth":2,"text":"Install MariaDB on Ubuntu 20.04 LTS"},{"id":"access-database-from-outside","depth":2,"text":"Access Database from outside"},{"id":"create-administrative-user","depth":2,"text":"Create Administrative User"}]}},"_type":"markdown","_id":"content:SQL:MySQL and MariaDB setup.md","_source":"content","_file":"SQL/MySQL and MariaDB setup.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/UBl6xR2vxQ.json b/api/_content/query/UBl6xR2vxQ.json
index c03bc49..d71ac9c 100644
--- a/api/_content/query/UBl6xR2vxQ.json
+++ b/api/_content/query/UBl6xR2vxQ.json
@@ -1 +1 @@
-{"_path":"/docker/refresh-containers-on-pull","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Containers On Pull","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"watchtower"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"docker__watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"v2tec/watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"/home/user/.docker/config.json:/config.json"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-675a2e"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-9a7ff4"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-427dcf"},"children":[{"type":"text","value":"--interval 60 image_1 image_2"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-427dcf{color:#A5D6FF}.ct-9a7ff4{color:#C9D1D9}.ct-675a2e{color:#7EE787}.light .ct-675a2e{color:#268BD2}.light .ct-9a7ff4{color:#657B83}.light .ct-427dcf{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-watchtower","depth":2,"text":"Setting up watchtower"}]}},"_type":"markdown","_id":"content:Docker:Refresh containers on pull.md","_source":"content","_file":"Docker/Refresh containers on pull.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/refresh-containers-on-pull","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Containers On Pull","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec/watchtower\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - /home/user/.docker/config.json:/config.json\n    command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"watchtower"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"docker__watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"v2tec/watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"/home/user/.docker/config.json:/config.json"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f168d1"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-66e287"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffe1b"},"children":[{"type":"text","value":"--interval 60 image_1 image_2"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-4ffe1b{color:#A5D6FF}.ct-66e287{color:#C9D1D9}.ct-f168d1{color:#7EE787}.light .ct-f168d1{color:#268BD2}.light .ct-66e287{color:#657B83}.light .ct-4ffe1b{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-watchtower","depth":2,"text":"Setting up watchtower"}]}},"_type":"markdown","_id":"content:Docker:Refresh containers on pull.md","_source":"content","_file":"Docker/Refresh containers on pull.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/WJQDeZ21lK.json b/api/_content/query/WJQDeZ21lK.json
index 76e6092..fd04c54 100644
--- a/api/_content/query/WJQDeZ21lK.json
+++ b/api/_content/query/WJQDeZ21lK.json
@@ -1 +1 @@
-{"_path":"/git/git-aliases-and-useful-commands","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Git Aliases And Useful Commands","description":"Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n"}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"[alias]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    flush "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" git clean"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"branches branch "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"v master "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" xargs git branch "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"D"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    lol "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" log "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"oneline "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"graph"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    l "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" lol"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    c "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    cv "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"no"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"verify "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    p "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" push"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    pf "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"force"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"with"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"lease"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"    ignore"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"now "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":" update"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"index "}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"skip"}]},{"type":"element","tag":"span","props":{"class":"ct-24779b"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-1c723b"},"children":[{"type":"text","value":"worktree"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-24779b{color:#FF7B72}.ct-1c723b{color:#C9D1D9}.light .ct-1c723b{color:#657B83}.light .ct-24779b{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Git aliases and useful commands.md","_source":"content","_file":"Git/Git aliases and useful commands.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/git/git-aliases-and-useful-commands","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Git Aliases And Useful Commands","description":"Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n"}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"[alias]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    flush "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" git clean"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"branches branch "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"v master "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" xargs git branch "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"D"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    lol "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" log "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"oneline "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"graph"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    l "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" lol"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    c "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    cv "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"no"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"verify "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    p "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" push"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    pf "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"force"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"with"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"lease"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"    ignore"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"now "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":" update"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"index "}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"skip"}]},{"type":"element","tag":"span","props":{"class":"ct-ca83b5"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-e8955a"},"children":[{"type":"text","value":"worktree"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ca83b5{color:#FF7B72}.ct-e8955a{color:#C9D1D9}.light .ct-e8955a{color:#657B83}.light .ct-ca83b5{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Git aliases and useful commands.md","_source":"content","_file":"Git/Git aliases and useful commands.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/WO7KYRkFiw.json b/api/_content/query/WO7KYRkFiw.json
index bf440c6..4646214 100644
--- a/api/_content/query/WO7KYRkFiw.json
+++ b/api/_content/query/WO7KYRkFiw.json
@@ -1 +1 @@
-{"_path":"/blockchain/smart-contracts","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Smart Contracts","description":"For common functions see Common typescript examples.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'web3-eth-contract'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"abi"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6a4bf1"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b92caf"},"children":[{"type":"text","value":"JSON"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6a4bf1"},"children":[{"type":"text","value":"parse"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// ABI of contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// address for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ({}) "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// Calling write method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// authorizing with Metamask"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// getting wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// calling \"store\" store method for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// payload should include `from` address, that matches"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// current user's wallet"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'Parameter'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"send"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      from: "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c97e13"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// calling read method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// this method can return data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"retrieve"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c97e13"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// ABI контракта"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// contract address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// account's private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// write-methods requires private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"privateKeyToAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      to: "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"encodeABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      gas: "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"({ from: "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"signTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"rawTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"requests"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"balanceOf"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getStaked"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"call"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  ]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"any"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"[]) "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getWeb3NoAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"BatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"map"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"add"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"            } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"execute"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c97e13"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"all"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-379fe1"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-854fa3"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'YOUR_RPC_ENDPOINT_HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'YOUR ABI HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'YOUR CONTRACT ADDRESS HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"referralProgramContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"events"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"RegisterUser"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-52b2ad"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"`| UserRegistered | events | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-11520d"},"children":[{"type":"text","value":"boolean"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f9ea63"},"children":[{"type":"text","value":"RegisterUserResponseInterface"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    }) "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56c89d"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      } "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"`| ONCE | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-56bd12"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-52b2ad"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-9561a5"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-0b1079"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f9ea63"},"children":[{"type":"text","value":"ErrnoException"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-dade4d"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-defe47"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        value: [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"events"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"Transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    address: ["}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'address-1'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'address-2'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"],    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"//Only get events from specific addresses"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    topics: []                              "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"//What topics to subscribe to"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'logs'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"nr"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"//example options(optional)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd60fa"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-70f244"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// only get events where transfer value was 1000 or 1337"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"        value: ["}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'1000'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'1337'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"]    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4323f8"},"children":[{"type":"text","value":"// number | \"earliest\" | \"pending\" | \"latest\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e5af7"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":",                  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    toBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'latest'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"getPastEvents"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-fa7691"},"children":[{"type":"text","value":"'Transfer'"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b6261e"},"children":[{"type":"text","value":"results"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-afd0a6"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-95ba07"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-f9ea63{color:#FFA657}.ct-52b2ad{color:#A5D6FF}.ct-379fe1{color:#79C0FF}.ct-c97e13{color:#79C0FF}.ct-5e5af7{color:#79C0FF}.ct-56c89d{color:#79C0FF}.ct-cd60fa{color:#FF7B72}.ct-4323f8{color:#8B949E}.ct-854fa3{color:#FFA657}.ct-afd0a6{color:#D2A8FF}.ct-b92caf{color:#79C0FF}.ct-6a4bf1{color:#79C0FF}.ct-11520d{color:#79C0FF}.ct-9561a5{color:#FFA657}.ct-0b1079{color:#FF7B72}.ct-56bd12{color:#D2A8FF}.ct-defe47{color:#C9D1D9}.ct-dade4d{color:#FF7B72}.ct-fa7691{color:#A5D6FF}.ct-b6261e{color:#C9D1D9}.ct-95ba07{color:#C9D1D9}.ct-70f244{color:#FF7B72}.light .ct-70f244{color:#859900}.light .ct-95ba07{color:#657B83}.light .ct-b6261e{color:#268BD2}.light .ct-fa7691{color:#2AA198}.light .ct-dade4d{color:#073642}.light .ct-defe47{color:#657B83}.light .ct-56bd12{color:#268BD2}.light .ct-0b1079{color:#859900}.light .ct-9561a5{color:#657B83}.light .ct-11520d{color:#859900}.light .ct-6a4bf1{color:#268BD2}.light .ct-b92caf{color:#657B83}.light .ct-afd0a6{color:#268BD2}.light .ct-854fa3{color:#657B83}.light .ct-4323f8{color:#93A1A1}.light .ct-cd60fa{color:#073642}.light .ct-56c89d{color:#268BD2}.light .ct-5e5af7{color:#D33682}.light .ct-c97e13{color:#859900}.light .ct-379fe1{color:#B58900}.light .ct-52b2ad{color:#2AA198}.light .ct-f9ea63{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"getting-smart-contract-instance","depth":2,"text":"Getting smart contract instance"},{"id":"executing-contract-method","depth":2,"text":"Executing contract method","children":[{"id":"example-for-metamask-without-private-key","depth":3,"text":"Example for #Metamask without private key"},{"id":"nodejs-and-react-native-example","depth":3,"text":"Node.js and React Native example"},{"id":"calling-a-batch-of-contracts-methods","depth":3,"text":"Calling a batch of contract's methods"}]},{"id":"subscribing-to-smart-contract-events","depth":2,"text":"Subscribing to smart contract events","children":[{"id":"by-accessing-contractevents","depth":3,"text":"By accessing contract.events"},{"id":"with-filtering","depth":3,"text":"With filtering"},{"id":"common-subscribe-method","depth":3,"text":"Common Subscribe method"},{"id":"getting-event-history","depth":3,"text":"Getting event history"}]}]}},"_type":"markdown","_id":"content:Blockchain:Smart contracts.md","_source":"content","_file":"Blockchain/Smart contracts.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/blockchain/smart-contracts","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Smart Contracts","description":"For common functions see Common typescript examples.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'web3-eth-contract'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"abi"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a88101"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9a0108"},"children":[{"type":"text","value":"JSON"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a88101"},"children":[{"type":"text","value":"parse"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on  "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n  // getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  // Calling write method\n  try {\n    // authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    // getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    // calling \"store\" store method for contract\n    // payload should include `from` address, that matches\n    // current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  // calling read method\n  try {\n    // this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// ABI of contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// address for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ({}) "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// Calling write method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// authorizing with Metamask"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// getting wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// calling \"store\" store method for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// payload should include `from` address, that matches"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// current user's wallet"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'Parameter'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"send"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      from: "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6be8ce"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// calling read method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// this method can return data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"retrieve"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6be8ce"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// ABI контракта"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// contract address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// account's private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// write-methods requires private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"privateKeyToAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      to: "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      data: "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"encodeABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      gas: "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"({ from: "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"signTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"rawTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":"  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"requests"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"balanceOf"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"   "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getStaked"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"call"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  ]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) => {\n      return new Promise((resolve, reject) => {\n        batch.add(\n          call.request({}, (err, result) => {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"any"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"[]) "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getWeb3NoAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"BatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"map"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"add"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"            "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"            } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"              "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"            }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"          })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"execute"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6be8ce"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"all"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f4eb4f"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-792f31"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":"  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'YOUR_RPC_ENDPOINT_HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'YOUR ABI HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'YOUR CONTRACT ADDRESS HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) => {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) => {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) => {\n    console.log(error);\n  });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"referralProgramContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"events"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"RegisterUser"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-88fe7c"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"`| UserRegistered | events | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-19af27"},"children":[{"type":"text","value":"boolean"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b7056"},"children":[{"type":"text","value":"RegisterUserResponseInterface"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    }) "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"          "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-3a4cb4"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      } "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"`| ONCE | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"  ."}]},{"type":"element","tag":"span","props":{"class":"ct-12b01c"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-88fe7c"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-4104ed"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-db30a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0b7056"},"children":[{"type":"text","value":"ErrnoException"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-bbc798"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c2cf18"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  });"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event => console.log(event))\n    .on('changed', changed => console.log(changed))\n    .on('error', err => throw err)\n    .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        value: [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"events"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"Transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":"  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    //Only get events from specific addresses\n    topics: []                              //What topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) => {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event => console.log(event))\n  subscription.on('changed', changed => console.log(changed))\n  subscription.on('error', err => { throw err })\n  subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    address: ["}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'address-1'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'address-2'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"],    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"//Only get events from specific addresses"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    topics: []                              "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"//What topics to subscribe to"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'logs'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"nr"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":"  //example options(optional)\n  let options = {\n    filter: {\n        // only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    // number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results => console.log(results))\n    .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"//example options(optional)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-050e10"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-903217"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// only get events where transfer value was 1000 or 1337"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"        value: ["}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'1000'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'1337'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"]    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-5fbbf4"},"children":[{"type":"text","value":"// number | \"earliest\" | \"pending\" | \"latest\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-5d0b1c"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":",                  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    toBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'latest'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"getPastEvents"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-79e8f5"},"children":[{"type":"text","value":"'Transfer'"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f50cca"},"children":[{"type":"text","value":"results"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":"    ."}]},{"type":"element","tag":"span","props":{"class":"ct-1b2dd4"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-241f90"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0b7056{color:#FFA657}.ct-88fe7c{color:#A5D6FF}.ct-f4eb4f{color:#79C0FF}.ct-6be8ce{color:#79C0FF}.ct-5d0b1c{color:#79C0FF}.ct-3a4cb4{color:#79C0FF}.ct-050e10{color:#FF7B72}.ct-5fbbf4{color:#8B949E}.ct-792f31{color:#FFA657}.ct-1b2dd4{color:#D2A8FF}.ct-9a0108{color:#79C0FF}.ct-a88101{color:#79C0FF}.ct-19af27{color:#79C0FF}.ct-4104ed{color:#FFA657}.ct-db30a0{color:#FF7B72}.ct-12b01c{color:#D2A8FF}.ct-c2cf18{color:#C9D1D9}.ct-bbc798{color:#FF7B72}.ct-79e8f5{color:#A5D6FF}.ct-f50cca{color:#C9D1D9}.ct-241f90{color:#C9D1D9}.ct-903217{color:#FF7B72}.light .ct-903217{color:#859900}.light .ct-241f90{color:#657B83}.light .ct-f50cca{color:#268BD2}.light .ct-79e8f5{color:#2AA198}.light .ct-bbc798{color:#073642}.light .ct-c2cf18{color:#657B83}.light .ct-12b01c{color:#268BD2}.light .ct-db30a0{color:#859900}.light .ct-4104ed{color:#657B83}.light .ct-19af27{color:#859900}.light .ct-a88101{color:#268BD2}.light .ct-9a0108{color:#657B83}.light .ct-1b2dd4{color:#268BD2}.light .ct-792f31{color:#657B83}.light .ct-5fbbf4{color:#93A1A1}.light .ct-050e10{color:#073642}.light .ct-3a4cb4{color:#268BD2}.light .ct-5d0b1c{color:#D33682}.light .ct-6be8ce{color:#859900}.light .ct-f4eb4f{color:#B58900}.light .ct-88fe7c{color:#2AA198}.light .ct-0b7056{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"getting-smart-contract-instance","depth":2,"text":"Getting smart contract instance"},{"id":"executing-contract-method","depth":2,"text":"Executing contract method","children":[{"id":"example-for-metamask-without-private-key","depth":3,"text":"Example for #Metamask without private key"},{"id":"nodejs-and-react-native-example","depth":3,"text":"Node.js and React Native example"},{"id":"calling-a-batch-of-contracts-methods","depth":3,"text":"Calling a batch of contract's methods"}]},{"id":"subscribing-to-smart-contract-events","depth":2,"text":"Subscribing to smart contract events","children":[{"id":"by-accessing-contractevents","depth":3,"text":"By accessing contract.events"},{"id":"with-filtering","depth":3,"text":"With filtering"},{"id":"common-subscribe-method","depth":3,"text":"Common Subscribe method"},{"id":"getting-event-history","depth":3,"text":"Getting event history"}]}]}},"_type":"markdown","_id":"content:Blockchain:Smart contracts.md","_source":"content","_file":"Blockchain/Smart contracts.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/WUiUHbO5Pg.json b/api/_content/query/WUiUHbO5Pg.json
index e47c371..1817d03 100644
--- a/api/_content/query/WUiUHbO5Pg.json
+++ b/api/_content/query/WUiUHbO5Pg.json
@@ -1 +1 @@
-{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2be314"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-57b956"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-643614"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-cfa359"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-673c15"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-934fd2"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-a4496f"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-185100"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-620a55"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-f80d95"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-bfa258"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-2be314"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-57b956"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-643614"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"  ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-4c9724"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1f3dfa"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-f80d95{color:#79C0FF}.ct-620a55{color:#FF7B72}.ct-185100{color:#79C0FF}.ct-a4496f{color:#79C0FF}.ct-934fd2{color:#79C0FF}.ct-bfa258{color:#C9D1D9}.ct-673c15{color:#D2A8FF}.ct-cfa359{color:#7EE787}.ct-643614{color:#79C0FF}.ct-57b956{color:#79C0FF}.ct-2be314{color:#79C0FF}.ct-1f3dfa{color:#C9D1D9}.ct-4c9724{color:#FF7B72}.light .ct-4c9724{color:#859900}.light .ct-1f3dfa{color:#657B83}.light .ct-2be314{color:#859900}.light .ct-57b956{color:#268BD2}.light .ct-643614{color:#D33682}.light .ct-cfa359{color:#268BD2}.light .ct-673c15{color:#268BD2}.light .ct-bfa258{color:#657B83}.light .ct-934fd2{color:#859900}.light .ct-a4496f{color:#268BD2}.light .ct-185100{color:#D33682}.light .ct-620a55{color:#859900}.light .ct-f80d95{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-9b82ea"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-779814"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-846a54"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-a2e8fa"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d92fbb"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-389c2d"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-852845"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c3ae60"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-fde8f9"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-ecf355"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-4a352c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-9b82ea"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-779814"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-846a54"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"  ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0285b8"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-924852"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ecf355{color:#79C0FF}.ct-fde8f9{color:#FF7B72}.ct-c3ae60{color:#79C0FF}.ct-852845{color:#79C0FF}.ct-389c2d{color:#79C0FF}.ct-4a352c{color:#C9D1D9}.ct-d92fbb{color:#D2A8FF}.ct-a2e8fa{color:#7EE787}.ct-846a54{color:#79C0FF}.ct-779814{color:#79C0FF}.ct-9b82ea{color:#79C0FF}.ct-924852{color:#C9D1D9}.ct-0285b8{color:#FF7B72}.light .ct-0285b8{color:#859900}.light .ct-924852{color:#657B83}.light .ct-9b82ea{color:#859900}.light .ct-779814{color:#268BD2}.light .ct-846a54{color:#D33682}.light .ct-a2e8fa{color:#268BD2}.light .ct-d92fbb{color:#268BD2}.light .ct-4a352c{color:#657B83}.light .ct-389c2d{color:#859900}.light .ct-852845{color:#268BD2}.light .ct-c3ae60{color:#D33682}.light .ct-fde8f9{color:#859900}.light .ct-ecf355{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/a1s3E9iAyd.json b/api/_content/query/a1s3E9iAyd.json
index 204353b..e456b02 100644
--- a/api/_content/query/a1s3E9iAyd.json
+++ b/api/_content/query/a1s3E9iAyd.json
@@ -1 +1 @@
-{"_path":"/docker/wait-for-mysql","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Mysql","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2180e3"},"children":[{"type":"text","value":"# Waits for mysql to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-10f0a2"},"children":[{"type":"text","value":"wait_for_mysql"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  query="}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\"SELECT count(*) FROM users\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-2180e3"},"children":[{"type":"text","value":"# 3 minutes limit"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-6d1c8e"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" mysql --user="}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" -e "}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-13d7bb"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d1c8e"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":"\"[Error] can't properly query MySQL after "}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-d7d1a7"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-484fb2"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-243af1"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d1c8e"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-69e703"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b616f9"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2180e3"},"children":[{"type":"text","value":"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-13d7bb{color:#79C0FF}.ct-d7d1a7{color:#C9D1D9}.ct-484fb2{color:#C9D1D9}.ct-6d1c8e{color:#79C0FF}.ct-69e703{color:#FF7B72}.ct-243af1{color:#A5D6FF}.ct-b616f9{color:#C9D1D9}.ct-10f0a2{color:#D2A8FF}.ct-2180e3{color:#8B949E}.light .ct-2180e3{color:#93A1A1}.light .ct-10f0a2{color:#268BD2}.light .ct-b616f9{color:#657B83}.light .ct-243af1{color:#2AA198}.light .ct-69e703{color:#859900}.light .ct-6d1c8e{color:#268BD2}.light .ct-484fb2{color:#859900}.light .ct-d7d1a7{color:#268BD2}.light .ct-13d7bb{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for mysql.md","_source":"content","_file":"Docker/Wait for mysql.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/wait-for-mysql","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Mysql","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-593766"},"children":[{"type":"text","value":"# Waits for mysql to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-234572"},"children":[{"type":"text","value":"wait_for_mysql"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  query="}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\"SELECT count(*) FROM users\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-593766"},"children":[{"type":"text","value":"# 3 minutes limit"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-87dfaf"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" mysql --user="}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" -e "}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    i="}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-d4f923"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-87dfaf"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":"\"[Error] can't properly query MySQL after "}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-90daab"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-961af7"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-9844eb"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-87dfaf"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d8cd50"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-789078"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-593766"},"children":[{"type":"text","value":"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d4f923{color:#79C0FF}.ct-90daab{color:#C9D1D9}.ct-961af7{color:#C9D1D9}.ct-87dfaf{color:#79C0FF}.ct-d8cd50{color:#FF7B72}.ct-9844eb{color:#A5D6FF}.ct-789078{color:#C9D1D9}.ct-234572{color:#D2A8FF}.ct-593766{color:#8B949E}.light .ct-593766{color:#93A1A1}.light .ct-234572{color:#268BD2}.light .ct-789078{color:#657B83}.light .ct-9844eb{color:#2AA198}.light .ct-d8cd50{color:#859900}.light .ct-87dfaf{color:#268BD2}.light .ct-961af7{color:#859900}.light .ct-90daab{color:#268BD2}.light .ct-d4f923{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for mysql.md","_source":"content","_file":"Docker/Wait for mysql.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/aP6pCxBj14.json b/api/_content/query/aP6pCxBj14.json
index b957447..9b2fa17 100644
--- a/api/_content/query/aP6pCxBj14.json
+++ b/api/_content/query/aP6pCxBj14.json
@@ -1 +1 @@
-{"_path":"/linux/resume-or-start-screen-session","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Resume Or Start Screen Session","description":"Running this script will enter currently running screen session or will start new one.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":"( screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-0b3b6a"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":" ( screen -d bash "}]},{"type":"element","tag":"span","props":{"class":"ct-0b3b6a"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":" screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-0b3b6a"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-7ba6e5"},"children":[{"type":"text","value":" screen -SAm bash bash ) )"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0b3b6a{color:#FF7B72}.ct-7ba6e5{color:#C9D1D9}.light .ct-7ba6e5{color:#657B83}.light .ct-0b3b6a{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Resume or start screen session.md","_source":"content","_file":"Linux/Resume or start screen session.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/linux/resume-or-start-screen-session","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Resume Or Start Screen Session","description":"Running this script will enter currently running screen session or will start new one.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":"( screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-6e070d"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":" ( screen -d bash "}]},{"type":"element","tag":"span","props":{"class":"ct-6e070d"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":" screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-6e070d"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ec5763"},"children":[{"type":"text","value":" screen -SAm bash bash ) )"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6e070d{color:#FF7B72}.ct-ec5763{color:#C9D1D9}.light .ct-ec5763{color:#657B83}.light .ct-6e070d{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Resume or start screen session.md","_source":"content","_file":"Linux/Resume or start screen session.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/arOc40mIpI.json b/api/_content/query/arOc40mIpI.json
index 8a235f3..4d53565 100644
--- a/api/_content/query/arOc40mIpI.json
+++ b/api/_content/query/arOc40mIpI.json
@@ -1 +1 @@
-{"_path":"/docker/drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Drone Ci","description":"Can be used with Private docker registry to deploy things using #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"drone repo update $1 --trusted=true && drone repo info $1\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"build-master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"plugins/docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"when"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"branch"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"dockerfile"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"Dockerfile"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"tag"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"${DRONE_BRANCH}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"global_docker_login"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"global_docker_password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"global_docker_registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"repo"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"docker_repo"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"drone"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone/drone:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_SERVER_HOST=drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_SERVER_PROTO=https"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_TLS_AUTOCERT=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_LOGS_DEBUG=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_LOGS_TRACE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"./data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"8090:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"drone-agent"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone__agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"drone/agent:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-341687"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_RPC_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-ec4a4f"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a33e40"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" DRONE_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a33e40"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" DRONE_TOKEN=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"drone info"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":"drone repo update "}]},{"type":"element","tag":"span","props":{"class":"ct-74bbe4"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-edde8e"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" --trusted=true "}]},{"type":"element","tag":"span","props":{"class":"ct-b08bd8"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-16f205"},"children":[{"type":"text","value":" drone repo info "}]},{"type":"element","tag":"span","props":{"class":"ct-74bbe4"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-edde8e"},"children":[{"type":"text","value":"1"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b08bd8{color:#FF7B72}.ct-edde8e{color:#C9D1D9}.ct-74bbe4{color:#C9D1D9}.ct-a33e40{color:#FF7B72}.ct-ec4a4f{color:#A5D6FF}.ct-16f205{color:#C9D1D9}.ct-341687{color:#7EE787}.light .ct-341687{color:#268BD2}.light .ct-16f205{color:#657B83}.light .ct-ec4a4f{color:#2AA198}.light .ct-a33e40{color:#073642}.light .ct-74bbe4{color:#859900}.light .ct-edde8e{color:#268BD2}.light .ct-b08bd8{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"pushing-to-private-docker_registry","depth":2,"text":"Pushing to private docker_registry"},{"id":"docker-compose-file-for-drone-ci","depth":2,"text":"Docker-compose file for drone-ci"},{"id":"caching-builds","depth":2,"text":"Caching builds"},{"id":"get-user-info","depth":2,"text":"Get user info"},{"id":"mark-user-as-trusted","depth":2,"text":"Mark user as trusted"}]}},"_type":"markdown","_id":"content:Docker:Drone-ci.md","_source":"content","_file":"Docker/Drone-ci.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Drone Ci","description":"Can be used with Private docker registry to deploy things using #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"drone repo update $1 --trusted=true && drone repo info $1\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins/docker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"build-master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"plugins/docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"when"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"branch"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"dockerfile"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"Dockerfile"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"tag"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"${DRONE_BRANCH}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"global_docker_login"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"global_docker_password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"global_docker_registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"repo"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"docker_repo"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone/drone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - ./data:/data\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone/agent:latest\n    command: agent\n    restart: always\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n    environment:\n      - DRONE_RPC_SERVER=https://drone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"drone"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone/drone:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_SERVER_HOST=drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_SERVER_PROTO=https"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_TLS_AUTOCERT=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_LOGS_DEBUG=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_LOGS_TRACE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"./data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"8090:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"drone-agent"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone__agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"drone/agent:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c02afb"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_RPC_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-b66a67"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-229b76"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" DRONE_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-229b76"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" DRONE_TOKEN=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"drone info"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":"drone repo update "}]},{"type":"element","tag":"span","props":{"class":"ct-e8532e"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-53bf39"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" --trusted=true "}]},{"type":"element","tag":"span","props":{"class":"ct-d2e356"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-baa1fd"},"children":[{"type":"text","value":" drone repo info "}]},{"type":"element","tag":"span","props":{"class":"ct-e8532e"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-53bf39"},"children":[{"type":"text","value":"1"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d2e356{color:#FF7B72}.ct-53bf39{color:#C9D1D9}.ct-e8532e{color:#C9D1D9}.ct-229b76{color:#FF7B72}.ct-b66a67{color:#A5D6FF}.ct-baa1fd{color:#C9D1D9}.ct-c02afb{color:#7EE787}.light .ct-c02afb{color:#268BD2}.light .ct-baa1fd{color:#657B83}.light .ct-b66a67{color:#2AA198}.light .ct-229b76{color:#073642}.light .ct-e8532e{color:#859900}.light .ct-53bf39{color:#268BD2}.light .ct-d2e356{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"pushing-to-private-docker_registry","depth":2,"text":"Pushing to private docker_registry"},{"id":"docker-compose-file-for-drone-ci","depth":2,"text":"Docker-compose file for drone-ci"},{"id":"caching-builds","depth":2,"text":"Caching builds"},{"id":"get-user-info","depth":2,"text":"Get user info"},{"id":"mark-user-as-trusted","depth":2,"text":"Mark user as trusted"}]}},"_type":"markdown","_id":"content:Docker:Drone-ci.md","_source":"content","_file":"Docker/Drone-ci.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/eIcZslqPOz.json b/api/_content/query/eIcZslqPOz.json
index 93426ee..b4c86fc 100644
--- a/api/_content/query/eIcZslqPOz.json
+++ b/api/_content/query/eIcZslqPOz.json
@@ -1 +1 @@
-{"_path":"/git/force-git-to-use-https","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Force Git To Use HTTPS","description":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":"[url "}]},{"type":"element","tag":"span","props":{"class":"ct-ea0e55"},"children":[{"type":"text","value":"\"https://github.com\""}]},{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":"    insteadOf "}]},{"type":"element","tag":"span","props":{"class":"ct-93e5d8"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-696cb4"},"children":[{"type":"text","value":" git:"}]},{"type":"element","tag":"span","props":{"class":"ct-0da74e"},"children":[{"type":"text","value":"//github.com"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0da74e{color:#8B949E}.ct-93e5d8{color:#FF7B72}.ct-ea0e55{color:#A5D6FF}.ct-696cb4{color:#C9D1D9}.light .ct-696cb4{color:#657B83}.light .ct-ea0e55{color:#2AA198}.light .ct-93e5d8{color:#859900}.light .ct-0da74e{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Force git to use HTTPS.md","_source":"content","_file":"Git/Force git to use HTTPS.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/git/force-git-to-use-https","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Force Git To Use HTTPS","description":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n    insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":"[url "}]},{"type":"element","tag":"span","props":{"class":"ct-0aff86"},"children":[{"type":"text","value":"\"https://github.com\""}]},{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":"    insteadOf "}]},{"type":"element","tag":"span","props":{"class":"ct-f985dd"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-5bc9e0"},"children":[{"type":"text","value":" git:"}]},{"type":"element","tag":"span","props":{"class":"ct-09eae1"},"children":[{"type":"text","value":"//github.com"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-09eae1{color:#8B949E}.ct-f985dd{color:#FF7B72}.ct-0aff86{color:#A5D6FF}.ct-5bc9e0{color:#C9D1D9}.light .ct-5bc9e0{color:#657B83}.light .ct-0aff86{color:#2AA198}.light .ct-f985dd{color:#859900}.light .ct-09eae1{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Force git to use HTTPS.md","_source":"content","_file":"Git/Force git to use HTTPS.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/epeSDkttbj.json b/api/_content/query/epeSDkttbj.json
index e2ffb6e..ca36e44 100644
--- a/api/_content/query/epeSDkttbj.json
+++ b/api/_content/query/epeSDkttbj.json
@@ -1 +1 @@
-{"_path":"/css/sass-nth-child-iterate-mixin","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Sass Nth Child Iterate Mixin","description":"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-db034d"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bea120"},"children":[{"type":"text","value":"color-per-child"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-db034d"},"children":[{"type":"text","value":"@each"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db034d"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2afc97"},"children":[{"type":"text","value":"&"}]},{"type":"element","tag":"span","props":{"class":"ct-ecf10f"},"children":[{"type":"text","value":":nth-child"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"#{"}]},{"type":"element","tag":"span","props":{"class":"ct-628599"},"children":[{"type":"text","value":"index"}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"(($colors), ($color))}"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0755e5"},"children":[{"type":"text","value":"color"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-25f491"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-28aa2f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-54686e"},"children":[{"type":"text","value":".item"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cec943"},"children":[{"type":"text","value":"@include"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0e527b"},"children":[{"type":"text","value":"color_per_child"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#ded187"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#dbde87"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#bade87"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#9cde87"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-58e517"},"children":[{"type":"text","value":"#87deaa"}]},{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0eb9c8"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-58e517{color:#79C0FF}.ct-0e527b{color:#D2A8FF}.ct-cec943{color:#FF7B72}.ct-54686e{color:#79C0FF}.ct-0eb9c8{color:#C9D1D9}.ct-0755e5{color:#79C0FF}.ct-628599{color:#79C0FF}.ct-ecf10f{color:#79C0FF}.ct-2afc97{color:#7EE787}.ct-25f491{color:#FFA657}.ct-bea120{color:#D2A8FF}.ct-28aa2f{color:#C9D1D9}.ct-db034d{color:#FF7B72}.light .ct-db034d{color:#859900}.light .ct-28aa2f{color:#657B83}.light .ct-bea120{color:#268BD2}.light .ct-25f491{color:#657B83}.light .ct-2afc97{color:#268BD2}.light .ct-ecf10f{color:#93A1A1}.light .ct-628599{color:#268BD2}.light .ct-0755e5{color:#859900}.light .ct-0eb9c8{color:#657B83}.light .ct-54686e{color:#93A1A1}.light .ct-cec943{color:#859900}.light .ct-0e527b{color:#268BD2}.light .ct-58e517{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Sass nth-child iterate mixin.md","_source":"content","_file":"CSS/Sass nth-child iterate mixin.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/css/sass-nth-child-iterate-mixin","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Sass Nth Child Iterate Mixin","description":"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-45fe09"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-08c8db"},"children":[{"type":"text","value":"color-per-child"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-45fe09"},"children":[{"type":"text","value":"@each"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45fe09"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-008a23"},"children":[{"type":"text","value":"&"}]},{"type":"element","tag":"span","props":{"class":"ct-48488b"},"children":[{"type":"text","value":":nth-child"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"#{"}]},{"type":"element","tag":"span","props":{"class":"ct-bf6575"},"children":[{"type":"text","value":"index"}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"(($colors), ($color))}"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-67dee1"},"children":[{"type":"text","value":"color"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-cbc8ea"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-b3994d"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"  }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-15b6b2"},"children":[{"type":"text","value":".item"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f24731"},"children":[{"type":"text","value":"@include"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e5b384"},"children":[{"type":"text","value":"color_per_child"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#ded187"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#dbde87"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#bade87"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#9cde87"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-47d767"},"children":[{"type":"text","value":"#87deaa"}]},{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6df2db"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-47d767{color:#79C0FF}.ct-e5b384{color:#D2A8FF}.ct-f24731{color:#FF7B72}.ct-15b6b2{color:#79C0FF}.ct-6df2db{color:#C9D1D9}.ct-67dee1{color:#79C0FF}.ct-bf6575{color:#79C0FF}.ct-48488b{color:#79C0FF}.ct-008a23{color:#7EE787}.ct-cbc8ea{color:#FFA657}.ct-08c8db{color:#D2A8FF}.ct-b3994d{color:#C9D1D9}.ct-45fe09{color:#FF7B72}.light .ct-45fe09{color:#859900}.light .ct-b3994d{color:#657B83}.light .ct-08c8db{color:#268BD2}.light .ct-cbc8ea{color:#657B83}.light .ct-008a23{color:#268BD2}.light .ct-48488b{color:#93A1A1}.light .ct-bf6575{color:#268BD2}.light .ct-67dee1{color:#859900}.light .ct-6df2db{color:#657B83}.light .ct-15b6b2{color:#93A1A1}.light .ct-f24731{color:#859900}.light .ct-e5b384{color:#268BD2}.light .ct-47d767{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Sass nth-child iterate mixin.md","_source":"content","_file":"CSS/Sass nth-child iterate mixin.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/gviYR2nAXj.json b/api/_content/query/gviYR2nAXj.json
index d56e463..9b1533a 100644
--- a/api/_content/query/gviYR2nAXj.json
+++ b/api/_content/query/gviYR2nAXj.json
@@ -1 +1 @@
-{"_path":"/linux/gitea-for-git-hosting","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Gitea For Git Hosting","description":"Self-hosted #git repositories with gitea and #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"gitea"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"external"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-231705"},"children":[{"type":"text","value":"false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"gitea/gitea:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"USER_UID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"USER_GID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"./var/lib/gitea:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"./etc/gitea:/etc/gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"/etc/timezone:/etc/timezone:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"/etc/localtime:/etc/localtime:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-eb8891"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"\"3000:3000\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e171ba"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-7a640c"},"children":[{"type":"text","value":"\"222:22\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-231705{color:#79C0FF}.ct-7a640c{color:#A5D6FF}.ct-e171ba{color:#C9D1D9}.ct-eb8891{color:#7EE787}.light .ct-eb8891{color:#268BD2}.light .ct-e171ba{color:#657B83}.light .ct-7a640c{color:#2AA198}.light .ct-231705{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-with-docker-compose","depth":2,"text":"Setting up with docker-compose"}]}},"_type":"markdown","_id":"content:Linux:Gitea for git hosting.md","_source":"content","_file":"Linux/Gitea for git hosting.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/linux/gitea-for-git-hosting","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Gitea For Git Hosting","description":"Self-hosted #git repositories with gitea and #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - ./var/lib/gitea:/data\n      - ./etc/gitea:/etc/gitea\n      - /etc/timezone:/etc/timezone:ro\n      - /etc/localtime:/etc/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"gitea"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"external"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-44ee9b"},"children":[{"type":"text","value":"false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"gitea/gitea:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"USER_UID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"USER_GID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"./var/lib/gitea:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"./etc/gitea:/etc/gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"/etc/timezone:/etc/timezone:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"/etc/localtime:/etc/localtime:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d4af6"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"\"3000:3000\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae203"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-bf8a5d"},"children":[{"type":"text","value":"\"222:22\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-44ee9b{color:#79C0FF}.ct-bf8a5d{color:#A5D6FF}.ct-4ae203{color:#C9D1D9}.ct-6d4af6{color:#7EE787}.light .ct-6d4af6{color:#268BD2}.light .ct-4ae203{color:#657B83}.light .ct-bf8a5d{color:#2AA198}.light .ct-44ee9b{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-with-docker-compose","depth":2,"text":"Setting up with docker-compose"}]}},"_type":"markdown","_id":"content:Linux:Gitea for git hosting.md","_source":"content","_file":"Linux/Gitea for git hosting.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/iZIUw8pCoM.json b/api/_content/query/iZIUw8pCoM.json
index b6491f0..aeec036 100644
--- a/api/_content/query/iZIUw8pCoM.json
+++ b/api/_content/query/iZIUw8pCoM.json
@@ -1 +1 @@
-{"_path":"/typescript/type-guards","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Type Guards","description":"Useful for type checking at compile and run time:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a52ad5"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936a43"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-9de1e3"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f0d0d"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f0d0d"},"children":[{"type":"text","value":"Bird"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9de1e3"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a0cdc"},"children":[{"type":"text","value":"is"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0f0d0d"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-efe60f"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-efe19e"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"!=="}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d876"},"children":[{"type":"text","value":"undefined"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3520d8"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8ce90e"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"getSmallPet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-f00ca3"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-49b21f"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e27096"},"children":[{"type":"text","value":"fly"}]},{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-023d5e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-e27096{color:#D2A8FF}.ct-8ce90e{color:#79C0FF}.ct-3520d8{color:#FF7B72}.ct-c8d876{color:#79C0FF}.ct-efe19e{color:#FFA657}.ct-49b21f{color:#C9D1D9}.ct-f00ca3{color:#FF7B72}.ct-023d5e{color:#C9D1D9}.ct-0f0d0d{color:#FFA657}.ct-7a0cdc{color:#FF7B72}.ct-9de1e3{color:#FFA657}.ct-936a43{color:#D2A8FF}.ct-efe60f{color:#C9D1D9}.ct-a52ad5{color:#FF7B72}.light .ct-a52ad5{color:#073642}.light .ct-efe60f{color:#657B83}.light .ct-936a43{color:#268BD2}.light .ct-9de1e3{color:#657B83}.light .ct-7a0cdc{color:#859900}.light .ct-0f0d0d{color:#268BD2}.light .ct-023d5e{color:#657B83}.light .ct-f00ca3{color:#859900}.light .ct-49b21f{color:#268BD2}.light .ct-efe19e{color:#268BD2}.light .ct-c8d876{color:#B58900}.light .ct-3520d8{color:#073642}.light .ct-8ce90e{color:#268BD2}.light .ct-e27096{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Type guards.md","_source":"content","_file":"Typescript/Type guards.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/typescript/type-guards","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Type Guards","description":"Useful for type checking at compile and run time:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1886ea"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bf5b6c"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d477bd"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6f4e28"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6f4e28"},"children":[{"type":"text","value":"Bird"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d477bd"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ac4659"},"children":[{"type":"text","value":"is"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6f4e28"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-f6cb92"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ad78b"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"!=="}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-67f2fa"},"children":[{"type":"text","value":"undefined"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7f249"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1bc9cf"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"getSmallPet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-dac57f"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-59b9b7"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-7c13bd"},"children":[{"type":"text","value":"fly"}]},{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2e1e17"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-7c13bd{color:#D2A8FF}.ct-1bc9cf{color:#79C0FF}.ct-b7f249{color:#FF7B72}.ct-67f2fa{color:#79C0FF}.ct-6ad78b{color:#FFA657}.ct-59b9b7{color:#C9D1D9}.ct-dac57f{color:#FF7B72}.ct-2e1e17{color:#C9D1D9}.ct-6f4e28{color:#FFA657}.ct-ac4659{color:#FF7B72}.ct-d477bd{color:#FFA657}.ct-bf5b6c{color:#D2A8FF}.ct-f6cb92{color:#C9D1D9}.ct-1886ea{color:#FF7B72}.light .ct-1886ea{color:#073642}.light .ct-f6cb92{color:#657B83}.light .ct-bf5b6c{color:#268BD2}.light .ct-d477bd{color:#657B83}.light .ct-ac4659{color:#859900}.light .ct-6f4e28{color:#268BD2}.light .ct-2e1e17{color:#657B83}.light .ct-dac57f{color:#859900}.light .ct-59b9b7{color:#268BD2}.light .ct-6ad78b{color:#268BD2}.light .ct-67f2fa{color:#B58900}.light .ct-b7f249{color:#073642}.light .ct-1bc9cf{color:#268BD2}.light .ct-7c13bd{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Type guards.md","_source":"content","_file":"Typescript/Type guards.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/ki2hTtdZ9z.json b/api/_content/query/ki2hTtdZ9z.json
index e8807de..bdf17b5 100644
--- a/api/_content/query/ki2hTtdZ9z.json
+++ b/api/_content/query/ki2hTtdZ9z.json
@@ -1 +1 @@
-{"_path":"/typescript/flatten-object-with-periods","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Flatten Object With Periods","description":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'./en.json'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"typeof"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3c112b"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ae19b1"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35880f"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-f0e7aa"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-35880f"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-894712"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f0e7aa"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-35880f"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-894712"},"children":[{"type":"text","value":"TranslateOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-204eca"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-3c112b"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"I18nLib"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c2ecc5"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c00405"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// plural object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"''"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" { ["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"-?:"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]>> }["}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5413fc"},"children":[{"type":"text","value":"// Fix it for you plural form"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'one'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'few'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'many'"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"}${''"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3d66f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"'.'}${"}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-222f42"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-86b04a"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-d16a4a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"4"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8087a0"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-30ff73"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-62e845"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-ff8763"},"children":[{"type":"text","value":">];"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-3d66f1{color:#A5D6FF}.ct-62e845{color:#79C0FF}.ct-d16a4a{color:#79C0FF}.ct-5413fc{color:#8B949E}.ct-c2ecc5{color:#D2A8FF}.ct-894712{color:#FFA657}.ct-f0e7aa{color:#FFA657}.ct-35880f{color:#FF7B72}.ct-ae19b1{color:#D2A8FF}.ct-204eca{color:#C9D1D9}.ct-3c112b{color:#FF7B72}.ct-30ff73{color:#FFA657}.ct-86b04a{color:#FF7B72}.ct-222f42{color:#A5D6FF}.ct-c00405{color:#C9D1D9}.ct-ff8763{color:#C9D1D9}.ct-8087a0{color:#FF7B72}.light .ct-8087a0{color:#859900}.light .ct-ff8763{color:#657B83}.light .ct-c00405{color:#268BD2}.light .ct-222f42{color:#2AA198}.light .ct-86b04a{color:#073642}.light .ct-30ff73{color:#268BD2}.light .ct-3c112b{color:#073642}.light .ct-204eca{color:#657B83}.light .ct-ae19b1{color:#268BD2}.light .ct-35880f{color:#859900}.light .ct-f0e7aa{color:#657B83}.light .ct-894712{color:#268BD2}.light .ct-c2ecc5{color:#268BD2}.light .ct-5413fc{color:#93A1A1}.light .ct-d16a4a{color:#859900}.light .ct-62e845{color:#D33682}.light .ct-3d66f1{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Flatten object with periods.md","_source":"content","_file":"Typescript/Flatten object with periods.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/typescript/flatten-object-with-periods","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Flatten Object With Periods","description":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten<typeof en>;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n    I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'./en.json'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"typeof"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-21324f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9c4ba"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3b8dd8"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b48404"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-3b8dd8"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ab0f84"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b48404"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-3b8dd8"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ab0f84"},"children":[{"type":"text","value":"TranslateOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-d973b6"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-21324f"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"I18nLib"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c84cf5"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-f5c6d3"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten<T, D extends number = 5> = [D] extends [never]\n  ? never\n  : T extends PluralForm // plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]\n  : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join<K, P> = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// plural object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"''"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" { ["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"-?:"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]>> }["}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4a1326"},"children":[{"type":"text","value":"// Fix it for you plural form"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'one'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'few'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'many'"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"}${''"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a4e364"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"'.'}${"}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-dc52a6"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-01c2c6"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-caf09a"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"4"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-7c02fe"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-9afba2"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-45e961"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-7ec1ee"},"children":[{"type":"text","value":">];"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-a4e364{color:#A5D6FF}.ct-45e961{color:#79C0FF}.ct-caf09a{color:#79C0FF}.ct-4a1326{color:#8B949E}.ct-c84cf5{color:#D2A8FF}.ct-ab0f84{color:#FFA657}.ct-b48404{color:#FFA657}.ct-3b8dd8{color:#FF7B72}.ct-d9c4ba{color:#D2A8FF}.ct-d973b6{color:#C9D1D9}.ct-21324f{color:#FF7B72}.ct-9afba2{color:#FFA657}.ct-01c2c6{color:#FF7B72}.ct-dc52a6{color:#A5D6FF}.ct-f5c6d3{color:#C9D1D9}.ct-7ec1ee{color:#C9D1D9}.ct-7c02fe{color:#FF7B72}.light .ct-7c02fe{color:#859900}.light .ct-7ec1ee{color:#657B83}.light .ct-f5c6d3{color:#268BD2}.light .ct-dc52a6{color:#2AA198}.light .ct-01c2c6{color:#073642}.light .ct-9afba2{color:#268BD2}.light .ct-21324f{color:#073642}.light .ct-d973b6{color:#657B83}.light .ct-d9c4ba{color:#268BD2}.light .ct-3b8dd8{color:#859900}.light .ct-b48404{color:#657B83}.light .ct-ab0f84{color:#268BD2}.light .ct-c84cf5{color:#268BD2}.light .ct-4a1326{color:#93A1A1}.light .ct-caf09a{color:#859900}.light .ct-45e961{color:#D33682}.light .ct-a4e364{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Flatten object with periods.md","_source":"content","_file":"Typescript/Flatten object with periods.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/kmbybMtElx.json b/api/_content/query/kmbybMtElx.json
index edade62..5e96959 100644
--- a/api/_content/query/kmbybMtElx.json
+++ b/api/_content/query/kmbybMtElx.json
@@ -1 +1 @@
-{"_path":"/linux/google-photos-alternative-with-photoprism","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Google Photos Alternative With Photoprism","description":"Photo Prism is a free alternative to Google photos, can be set up with #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"'3.5'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"photoprism"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism__app"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism/photoprism:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"depends_on"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"mariadb"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"2342:2342"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdd322"},"children":[{"type":"text","value":"# HTTP port (host:container)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_ADMIN_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"password\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"https://service.url/\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_ORIGINALS_LIMIT"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-07fb9d"},"children":[{"type":"text","value":"5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_HTTP_COMPRESSION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"gzip\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DEBUG"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"          "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_PUBLIC"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_READONLY"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_EXPERIMENTAL"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CHOWN"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_WEBDAV"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_SETTINGS"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_FACES"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DARKTABLE_PRESETS"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DETECT_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"           "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_UPLOAD_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"true\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"            "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_DRIVER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"       "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_SERVER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"mariadb:3306\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_NAME"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"photoprism\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"root\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"         "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"insecure\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_TITLE"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"PhotoPrism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_CAPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"Browse Your Life\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_DESCRIPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_AUTHOR"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"HOME"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"working_dir"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./data/originals:/photoprism/originals\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./data/imports:/photoprism/import\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./data/storage:/photoprism/storage\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"mariadb"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism__db"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"mariadb:10.6"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"\"./database:/var/lib/mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdd322"},"children":[{"type":"text","value":"# Important, don't remove"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_ROOT_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"insecure"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_DATABASE"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0cbc4d"},"children":[{"type":"text","value":"MYSQL_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-f8a7f1"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0f2d67"},"children":[{"type":"text","value":"insecure"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-07fb9d{color:#79C0FF}.ct-cdd322{color:#8B949E}.ct-0f2d67{color:#A5D6FF}.ct-f8a7f1{color:#C9D1D9}.ct-0cbc4d{color:#7EE787}.light .ct-0cbc4d{color:#268BD2}.light .ct-f8a7f1{color:#657B83}.light .ct-0f2d67{color:#2AA198}.light .ct-cdd322{color:#93A1A1}.light .ct-07fb9d{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"docker-compose-file-to-run-it","depth":2,"text":"Docker compose file to run it"}]}},"_type":"markdown","_id":"content:Linux:Google photos alternative with Photoprism.md","_source":"content","_file":"Linux/Google photos alternative with Photoprism.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/linux/google-photos-alternative-with-photoprism","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Google Photos Alternative With Photoprism","description":"Photo Prism is a free alternative to Google photos, can be set up with #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism/photoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https://service.url/\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"'3.5'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"photoprism"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism__app"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism/photoprism:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"depends_on"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"mariadb"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"2342:2342"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-771931"},"children":[{"type":"text","value":"# HTTP port (host:container)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_ADMIN_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"password\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"https://service.url/\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_ORIGINALS_LIMIT"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-28b1e5"},"children":[{"type":"text","value":"5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_HTTP_COMPRESSION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"gzip\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DEBUG"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"          "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_PUBLIC"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_READONLY"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_EXPERIMENTAL"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CHOWN"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_WEBDAV"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_SETTINGS"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_FACES"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DARKTABLE_PRESETS"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"     "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DETECT_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"           "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_UPLOAD_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"true\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"            "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_DRIVER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"       "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_SERVER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"mariadb:3306\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_NAME"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"photoprism\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"root\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"         "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"insecure\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_TITLE"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"PhotoPrism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_CAPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"Browse Your Life\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_DESCRIPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_AUTHOR"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"HOME"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"working_dir"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./data/originals:/photoprism/originals\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./data/imports:/photoprism/import\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./data/storage:/photoprism/storage\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"mariadb"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism__db"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"mariadb:10.6"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"\"./database:/var/lib/mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-771931"},"children":[{"type":"text","value":"# Important, don't remove"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_ROOT_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"insecure"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_DATABASE"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d3d9ac"},"children":[{"type":"text","value":"MYSQL_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-0a7899"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-94e896"},"children":[{"type":"text","value":"insecure"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-28b1e5{color:#79C0FF}.ct-771931{color:#8B949E}.ct-94e896{color:#A5D6FF}.ct-0a7899{color:#C9D1D9}.ct-d3d9ac{color:#7EE787}.light .ct-d3d9ac{color:#268BD2}.light .ct-0a7899{color:#657B83}.light .ct-94e896{color:#2AA198}.light .ct-771931{color:#93A1A1}.light .ct-28b1e5{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"docker-compose-file-to-run-it","depth":2,"text":"Docker compose file to run it"}]}},"_type":"markdown","_id":"content:Linux:Google photos alternative with Photoprism.md","_source":"content","_file":"Linux/Google photos alternative with Photoprism.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/pVAGVLBNPu.json b/api/_content/query/pVAGVLBNPu.json
index bff0829..21e4064 100644
--- a/api/_content/query/pVAGVLBNPu.json
+++ b/api/_content/query/pVAGVLBNPu.json
@@ -1 +1 @@
-{"_path":"/linux/rsync-file-with-ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Rsync File With SSH","description":"Downloads file from #SSH with rsync and puts it in current folder.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9e339"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"PORT=22"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"USER=user"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"HOST=example.com"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"REMOTE_PATH=/tmp"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"REMOTE_FILE=sample.text"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"DEST_PATH=./"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"rsync -a -e "}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\"ssh -p "}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"PORT"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":" -P -v \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"@"}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"HOST"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"REMOTE_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"REMOTE_FILE"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac1646"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d9fe04"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-87da56"},"children":[{"type":"text","value":"DEST_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-39eea0"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-87da56{color:#C9D1D9}.ct-d9fe04{color:#C9D1D9}.ct-39eea0{color:#A5D6FF}.ct-ac1646{color:#C9D1D9}.ct-d9e339{color:#8B949E}.light .ct-d9e339{color:#93A1A1}.light .ct-ac1646{color:#657B83}.light .ct-39eea0{color:#2AA198}.light .ct-d9fe04{color:#859900}.light .ct-87da56{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Rsync file with SSH.md","_source":"content","_file":"Linux/Rsync file with SSH.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/linux/rsync-file-with-ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Rsync File With SSH","description":"Downloads file from #SSH with rsync and puts it in current folder.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6afeff"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"PORT=22"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"USER=user"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"HOST=example.com"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"REMOTE_PATH=/tmp"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"REMOTE_FILE=sample.text"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"DEST_PATH=./"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"rsync -a -e "}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\"ssh -p "}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"PORT"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":" -P -v \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"@"}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"HOST"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"REMOTE_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"REMOTE_FILE"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4da16e"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f36261"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-6fbdab"},"children":[{"type":"text","value":"DEST_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-092e9e"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6fbdab{color:#C9D1D9}.ct-f36261{color:#C9D1D9}.ct-092e9e{color:#A5D6FF}.ct-4da16e{color:#C9D1D9}.ct-6afeff{color:#8B949E}.light .ct-6afeff{color:#93A1A1}.light .ct-4da16e{color:#657B83}.light .ct-092e9e{color:#2AA198}.light .ct-f36261{color:#859900}.light .ct-6fbdab{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Rsync file with SSH.md","_source":"content","_file":"Linux/Rsync file with SSH.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/pv8ckH0an3.json b/api/_content/query/pv8ckH0an3.json
index 30b205a..2ed0298 100644
--- a/api/_content/query/pv8ckH0an3.json
+++ b/api/_content/query/pv8ckH0an3.json
@@ -1 +1 @@
-{"_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Preserve FlatList Scroll Position In React Native","description":"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b4fb03"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d39a2a"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"; }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-26da6a"},"children":[{"type":"text","value":"SomeList"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" ({ "}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// set it to `true` before interaction and back to `false` right after"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"NativeSyntheticEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-02453f"},"children":[{"type":"text","value":"NativeScrollEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":">) "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"nativeEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"contentOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"y"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8dee8d"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-26da6a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d3d5"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5b3757"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-cee0e9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d3d5"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-0506c3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0ed0cd"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"scrollToOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      offset: "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      animated: "}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// onInteraction wraps interaction to preserve scroll position"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"onInteraction"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    () "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-498eca"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-03f514"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-0f7321"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-09cabd"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-87fdb6"},"children":[{"type":"text","value":"500"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    ["}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"setSelectedSubThemes"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-5ff58d"},"children":[{"type":"text","value":"FlatList"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-8d188c"},"children":[{"type":"text","value":"// ...required FlatList options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-2704a7"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-995aac"},"children":[{"type":"text","value":"/>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-36a801"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-5ff58d{color:#FFA657}.ct-03d3d5{color:#79C0FF}.ct-8dee8d{color:#79C0FF}.ct-2704a7{color:#C9D1D9}.ct-09cabd{color:#79C0FF}.ct-87fdb6{color:#79C0FF}.ct-03f514{color:#79C0FF}.ct-5b3757{color:#FFA657}.ct-02453f{color:#FFA657}.ct-cee0e9{color:#FF7B72}.ct-26da6a{color:#D2A8FF}.ct-0ed0cd{color:#C9D1D9}.ct-0506c3{color:#FF7B72}.ct-d39a2a{color:#79C0FF}.ct-498eca{color:#D2A8FF}.ct-995aac{color:#FF7B72}.ct-b4fb03{color:#FFA657}.ct-36a801{color:#C9D1D9}.ct-0f7321{color:#FF7B72}.ct-8d188c{color:#8B949E}.light .ct-8d188c{color:#93A1A1}.light .ct-0f7321{color:#073642}.light .ct-36a801{color:#657B83}.light .ct-b4fb03{color:#268BD2}.light .ct-995aac{color:#859900}.light .ct-498eca{color:#268BD2}.light .ct-d39a2a{color:#859900}.light .ct-0506c3{color:#073642}.light .ct-0ed0cd{color:#657B83}.light .ct-26da6a{color:#268BD2}.light .ct-cee0e9{color:#859900}.light .ct-02453f{color:#268BD2}.light .ct-5b3757{color:#657B83}.light .ct-03f514{color:#268BD2}.light .ct-87fdb6{color:#D33682}.light .ct-09cabd{color:#B58900}.light .ct-2704a7{color:#268BD2}.light .ct-8dee8d{color:#268BD2}.light .ct-03d3d5{color:#859900}.light .ct-5ff58d{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md","_source":"content","_file":"Frontend/React Native/Preserve FlatList scroll position in React Native.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Preserve FlatList Scroll Position In React Native","description":"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC<Props> = ({ interact }) => {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  // set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) => {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  // onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () => {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() => {\n        interact();\n      }, 0);\n\n      setTimeout(() => {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    <FlatList\n      // ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    />\n  )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-962ae9"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1df086"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"; }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-82b48d"},"children":[{"type":"text","value":"SomeList"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" ({ "}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// set it to `true` before interaction and back to `false` right after"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"    ("}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"NativeSyntheticEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-4e09fa"},"children":[{"type":"text","value":"NativeScrollEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":">) "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"nativeEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"contentOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"y"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c04049"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-82b48d"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7dc0b2"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c49042"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-88c97b"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7dc0b2"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-cba0df"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-a5419a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"scrollToOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      offset: "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      animated: "}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// onInteraction wraps interaction to preserve scroll position"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"onInteraction"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    () "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-4702b7"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-b9f460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-5fb3de"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bbd9de"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      }, "}]},{"type":"element","tag":"span","props":{"class":"ct-5e6b92"},"children":[{"type":"text","value":"500"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    ["}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"setSelectedSubThemes"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-87c7b6"},"children":[{"type":"text","value":"FlatList"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-cd0080"},"children":[{"type":"text","value":"// ...required FlatList options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-d9dfd6"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-35de31"},"children":[{"type":"text","value":"/>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"  )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-574849"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-87c7b6{color:#FFA657}.ct-7dc0b2{color:#79C0FF}.ct-c04049{color:#79C0FF}.ct-d9dfd6{color:#C9D1D9}.ct-bbd9de{color:#79C0FF}.ct-5e6b92{color:#79C0FF}.ct-b9f460{color:#79C0FF}.ct-c49042{color:#FFA657}.ct-4e09fa{color:#FFA657}.ct-88c97b{color:#FF7B72}.ct-82b48d{color:#D2A8FF}.ct-a5419a{color:#C9D1D9}.ct-cba0df{color:#FF7B72}.ct-1df086{color:#79C0FF}.ct-4702b7{color:#D2A8FF}.ct-35de31{color:#FF7B72}.ct-962ae9{color:#FFA657}.ct-574849{color:#C9D1D9}.ct-5fb3de{color:#FF7B72}.ct-cd0080{color:#8B949E}.light .ct-cd0080{color:#93A1A1}.light .ct-5fb3de{color:#073642}.light .ct-574849{color:#657B83}.light .ct-962ae9{color:#268BD2}.light .ct-35de31{color:#859900}.light .ct-4702b7{color:#268BD2}.light .ct-1df086{color:#859900}.light .ct-cba0df{color:#073642}.light .ct-a5419a{color:#657B83}.light .ct-82b48d{color:#268BD2}.light .ct-88c97b{color:#859900}.light .ct-4e09fa{color:#268BD2}.light .ct-c49042{color:#657B83}.light .ct-b9f460{color:#268BD2}.light .ct-5e6b92{color:#D33682}.light .ct-bbd9de{color:#B58900}.light .ct-d9dfd6{color:#268BD2}.light .ct-c04049{color:#268BD2}.light .ct-7dc0b2{color:#859900}.light .ct-87c7b6{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md","_source":"content","_file":"Frontend/React Native/Preserve FlatList scroll position in React Native.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/rNRhET0KmZ.json b/api/_content/query/rNRhET0KmZ.json
index 4e0b9d1..1c03483 100644
--- a/api/_content/query/rNRhET0KmZ.json
+++ b/api/_content/query/rNRhET0KmZ.json
@@ -1 +1 @@
-{"_path":"/docker/github-pages-with-drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Github Pages With Drone Ci","description":"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"node:16"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"commands"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"yarn"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"yarn generate"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"rm -rf ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"mv ./.output/public ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"touch ./docs/.nojekyll"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"publish"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"plugins/gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"target_branch"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"github_username"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-6d5714"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-2f72e3"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4e8a40"},"children":[{"type":"text","value":"github_token"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-4e8a40{color:#A5D6FF}.ct-2f72e3{color:#C9D1D9}.ct-6d5714{color:#7EE787}.light .ct-6d5714{color:#268BD2}.light .ct-2f72e3{color:#657B83}.light .ct-4e8a40{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"additional-reading","depth":2,"text":"Additional reading"}]}},"_type":"markdown","_id":"content:Docker:Github pages with drone-ci.md","_source":"content","_file":"Docker/Github pages with drone-ci.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/github-pages-with-drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Github Pages With Drone Ci","description":"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets  "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com/<yourusername>/<yourusername>.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf ./docs\n      - mv ./.output/public ./docs\n      - touch ./docs/.nojekyll\n  - name: publish\n    image: plugins/gh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"node:16"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"commands"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"yarn"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"yarn generate"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"rm -rf ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"mv ./.output/public ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"touch ./docs/.nojekyll"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"  - "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"publish"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"plugins/gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"target_branch"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"github_username"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":"        "}]},{"type":"element","tag":"span","props":{"class":"ct-0386c3"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-a732cc"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-0342ff"},"children":[{"type":"text","value":"github_token"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-0342ff{color:#A5D6FF}.ct-a732cc{color:#C9D1D9}.ct-0386c3{color:#7EE787}.light .ct-0386c3{color:#268BD2}.light .ct-a732cc{color:#657B83}.light .ct-0342ff{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"additional-reading","depth":2,"text":"Additional reading"}]}},"_type":"markdown","_id":"content:Docker:Github pages with drone-ci.md","_source":"content","_file":"Docker/Github pages with drone-ci.md","_extension":"md"}
\ No newline at end of file
diff --git a/api/_content/query/v8MG1Q8wMg.json b/api/_content/query/v8MG1Q8wMg.json
index 25bf8d5..e706fae 100644
--- a/api/_content/query/v8MG1Q8wMg.json
+++ b/api/_content/query/v8MG1Q8wMg.json
@@ -1 +1 @@
-{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fef622"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fef622"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fef622"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-7a6d34"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-7a6d34"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-7a6d34"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99e5e1"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-211c1b"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-5cfde0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14932b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-5f8edc"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-211c1b{color:#79C0FF}.ct-99e5e1{color:#FF7B72}.ct-7a6d34{color:#A5D6FF}.ct-5f8edc{color:#C9D1D9}.ct-14932b{color:#C9D1D9}.ct-5cfde0{color:#C9D1D9}.ct-fef622{color:#8B949E}.light .ct-fef622{color:#93A1A1}.light .ct-5cfde0{color:#657B83}.light .ct-14932b{color:#859900}.light .ct-5f8edc{color:#268BD2}.light .ct-7a6d34{color:#2AA198}.light .ct-99e5e1{color:#859900}.light .ct-211c1b{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"}
\ No newline at end of file
+{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-90172d"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-90172d"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-90172d"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-c1bb7b"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-c1bb7b"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-c1bb7b"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ea43c"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-216f2b"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-38509b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-99cdf2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a3bf04"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-216f2b{color:#79C0FF}.ct-6ea43c{color:#FF7B72}.ct-c1bb7b{color:#A5D6FF}.ct-a3bf04{color:#C9D1D9}.ct-99cdf2{color:#C9D1D9}.ct-38509b{color:#C9D1D9}.ct-90172d{color:#8B949E}.light .ct-90172d{color:#93A1A1}.light .ct-38509b{color:#657B83}.light .ct-99cdf2{color:#859900}.light .ct-a3bf04{color:#268BD2}.light .ct-c1bb7b{color:#2AA198}.light .ct-6ea43c{color:#859900}.light .ct-216f2b{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"}
\ No newline at end of file
diff --git a/bio/_payload.js b/bio/_payload.js
index d86b693..2c52d08 100644
--- a/bio/_payload.js
+++ b/bio/_payload.js
@@ -1 +1 @@
-export default {data:{},prerenderedAt:1667812490646}
\ No newline at end of file
+export default {data:{},prerenderedAt:1667813353088}
\ No newline at end of file
diff --git a/bio/index.html b/bio/index.html
index 004699d..ba19ccb 100644
--- a/bio/index.html
+++ b/bio/index.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/bio/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/bio.e2cfb6e3.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioHeading.fc552931.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioSkills.1cbb9b74.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioSkillsCard.dcf6f14b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiStars.0b5a97ee.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/IconStar.c0f2126f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiCard.fe784af1.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioProjects.9611713f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioProjectCard.4bb88134.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/IconsCode.51acf16d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiActionButton.8de8506c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ArrowRight.4c99b7f0.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioCareer.96a55a4c.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/howdy.824e8e62.svg"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._section_1e0mk_1{padding:40px 0}._section_1e0mk_1._heading_1e0mk_4{padding-bottom:0}</style><style>._grid_15n56_1{grid-column-gap:40px;display:grid;grid-template-columns:1fr 2fr}._text_15n56_7{color:var(--color-text-secondary)}._text_15n56_7 b{color:var(--color-text)}</style><style>._list_89lzg_1{-moz-column-gap:20px;column-gap:20px;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));row-gap:20px}</style><style>._grid_1kefv_1{grid-column-gap:16px;align-items:center;border-bottom:1px solid var(--color-line);display:grid;grid-template-columns:48px 1fr;padding:10px;transition:all .25s}._title_1kefv_11{margin:0 0 4px}._icon_1kefv_15{align-items:center;display:flex}._text_1kefv_20{display:flex;flex-direction:column;padding-bottom:4px}._description_1kefv_26{color:var(--color-text-secondary);font-size:.9rem;line-height:1.4rem;padding:10px}</style><style>._card_e1njf_1{border:1px solid var(--color-line);border-radius:8px;transition:all .25s}._card_e1njf_1:hover{background-color:var(--color-code-background);border-color:var(--color-text-secondary)}</style><style>._rating_11ify_1{display:flex;flex-direction:row;margin-left:-3px}._rating_11ify_1>img{margin-right:2px}._star_11ify_10{stroke:none;fill:currentColor}._star_11ify_10:first-child{color:var(--color-rating-1)}._star_11ify_10:nth-child(2){color:var(--color-rating-2)}._star_11ify_10:nth-child(3){color:var(--color-rating-3)}._star_11ify_10:nth-child(4){color:var(--color-rating-4)}._star_11ify_10:nth-child(5){color:var(--color-rating-5)}._star_11ify_10._filled_11ify_29{fill:var(--color-line)}</style><style>._grid_1ng9c_1{-moz-column-gap:16px;column-gap:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));row-gap:16px}</style><style>._card_1wy9v_1{display:flex;flex-direction:column;height:100%}._thumbnail_1wy9v_7{border-bottom:1px solid var(--color-line);border-radius:8px 8px 0 0;height:250px;overflow:hidden}._image_1wy9v_14{height:auto;-o-object-fit:cover;object-fit:cover;width:100%}._content_1wy9v_20{display:flex;flex:1;flex-direction:column;padding:16px}._head_1wy9v_27{margin-bottom:16px}._title_1wy9v_31{margin:0 0 4px}._url_1wy9v_35{font-size:.9em}._description_1wy9v_39{color:var(--color-text-secondary);font-size:.9em;line-height:1.5em;white-space:pre-line}._buttons_1wy9v_46{-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:repeat(2,1fr);padding:16px;row-gap:10px}</style><style>._button_aq4bi_1{align-items:center;border-radius:8px;color:#fff;display:inline-flex;justify-content:center;text-decoration:none}._button_aq4bi_1._variant-primary_aq4bi_9{background-color:var(--color-primary)}._button_aq4bi_1._variant-outline_aq4bi_12{box-shadow:var(--color-text) 0 0 0 1px;color:var(--color-text);overflow:hidden;position:relative;transition:all .25s}._button_aq4bi_1._variant-outline_aq4bi_12:after{background:var(--color-primary);border-radius:8px;content:" ";inset:0;opacity:0;position:absolute;transform:scale(0);transition:all .25s;z-index:0}._button_aq4bi_1._variant-outline_aq4bi_12:hover{box-shadow:var(--color-background) 0 0 0 1px}._button_aq4bi_1._variant-outline_aq4bi_12:hover:after{opacity:1;transform:scale(1)}._button_aq4bi_1._size-md_aq4bi_37{height:40px;padding:0 30px}._button_aq4bi_1._size-md_aq4bi_37._prefixed_aq4bi_41,._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding:0 10px 0 20px}._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding-right:0 20px 0 10px}._title_aq4bi_48{flex:1;position:relative;text-align:center;z-index:1}._size-md_aq4bi_37._prefixed_aq4bi_41 ._title_aq4bi_48{padding-left:10px}._size-md_aq4bi_37._suffixed_aq4bi_41 ._title_aq4bi_48{padding-right:10px}._prefix_aq4bi_41,._suffix_aq4bi_41{display:inline-flex;position:relative;z-index:2}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/bio/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/bio.3c0a5659.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioHeading.40d2dead.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioSkills.7301a037.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioSkillsCard.24be210d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiStars.ad96952a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/IconStar.67abd07c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiCard.c1974320.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioProjects.7d47d393.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioProjectCard.168802cd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/IconsCode.118b44a8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiActionButton.d5ab622f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ArrowRight.5a505e4f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/BioCareer.79116453.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/howdy.386ec27b.svg"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._section_1e0mk_1{padding:40px 0}._section_1e0mk_1._heading_1e0mk_4{padding-bottom:0}</style><style>._grid_15n56_1{grid-column-gap:40px;display:grid;grid-template-columns:1fr 2fr}._text_15n56_7{color:var(--color-text-secondary)}._text_15n56_7 b{color:var(--color-text)}</style><style>._list_89lzg_1{-moz-column-gap:20px;column-gap:20px;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));row-gap:20px}</style><style>._grid_1kefv_1{grid-column-gap:16px;align-items:center;border-bottom:1px solid var(--color-line);display:grid;grid-template-columns:48px 1fr;padding:10px;transition:all .25s}._title_1kefv_11{margin:0 0 4px}._icon_1kefv_15{align-items:center;display:flex}._text_1kefv_20{display:flex;flex-direction:column;padding-bottom:4px}._description_1kefv_26{color:var(--color-text-secondary);font-size:.9rem;line-height:1.4rem;padding:10px}</style><style>._card_e1njf_1{border:1px solid var(--color-line);border-radius:8px;transition:all .25s}._card_e1njf_1:hover{background-color:var(--color-code-background);border-color:var(--color-text-secondary)}</style><style>._rating_11ify_1{display:flex;flex-direction:row;margin-left:-3px}._rating_11ify_1>img{margin-right:2px}._star_11ify_10{stroke:none;fill:currentColor}._star_11ify_10:first-child{color:var(--color-rating-1)}._star_11ify_10:nth-child(2){color:var(--color-rating-2)}._star_11ify_10:nth-child(3){color:var(--color-rating-3)}._star_11ify_10:nth-child(4){color:var(--color-rating-4)}._star_11ify_10:nth-child(5){color:var(--color-rating-5)}._star_11ify_10._filled_11ify_29{fill:var(--color-line)}</style><style>._grid_1ng9c_1{-moz-column-gap:16px;column-gap:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));row-gap:16px}</style><style>._card_1wy9v_1{display:flex;flex-direction:column;height:100%}._thumbnail_1wy9v_7{border-bottom:1px solid var(--color-line);border-radius:8px 8px 0 0;height:250px;overflow:hidden}._image_1wy9v_14{height:auto;-o-object-fit:cover;object-fit:cover;width:100%}._content_1wy9v_20{display:flex;flex:1;flex-direction:column;padding:16px}._head_1wy9v_27{margin-bottom:16px}._title_1wy9v_31{margin:0 0 4px}._url_1wy9v_35{font-size:.9em}._description_1wy9v_39{color:var(--color-text-secondary);font-size:.9em;line-height:1.5em;white-space:pre-line}._buttons_1wy9v_46{-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:repeat(2,1fr);padding:16px;row-gap:10px}</style><style>._button_aq4bi_1{align-items:center;border-radius:8px;color:#fff;display:inline-flex;justify-content:center;text-decoration:none}._button_aq4bi_1._variant-primary_aq4bi_9{background-color:var(--color-primary)}._button_aq4bi_1._variant-outline_aq4bi_12{box-shadow:var(--color-text) 0 0 0 1px;color:var(--color-text);overflow:hidden;position:relative;transition:all .25s}._button_aq4bi_1._variant-outline_aq4bi_12:after{background:var(--color-primary);border-radius:8px;content:" ";inset:0;opacity:0;position:absolute;transform:scale(0);transition:all .25s;z-index:0}._button_aq4bi_1._variant-outline_aq4bi_12:hover{box-shadow:var(--color-background) 0 0 0 1px}._button_aq4bi_1._variant-outline_aq4bi_12:hover:after{opacity:1;transform:scale(1)}._button_aq4bi_1._size-md_aq4bi_37{height:40px;padding:0 30px}._button_aq4bi_1._size-md_aq4bi_37._prefixed_aq4bi_41,._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding:0 10px 0 20px}._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding-right:0 20px 0 10px}._title_aq4bi_48{flex:1;position:relative;text-align:center;z-index:1}._size-md_aq4bi_37._prefixed_aq4bi_41 ._title_aq4bi_48{padding-left:10px}._size-md_aq4bi_37._suffixed_aq4bi_41 ._title_aq4bi_48{padding-right:10px}._prefix_aq4bi_41,._suffix_aq4bi_41{display:inline-flex;position:relative;z-index:2}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><article><section class="_section_1e0mk_1 _heading_1e0mk_4"><div class="_grid_15n56_1"><div><img src="/nuxt/howdy.824e8e62.svg"></div><div class="_text_15n56_7"><h1>Howdy!</h1><p> My name is <b>Fedor Katurov</b>, I&#39;m a fullstack developer from Siberia. </p><p> I develop frontend applications with <b>React</b>, <b>Vue</b> and numerous other frameworks for the most of my time, but I&#39;m also capable of doing <b>Typescript</b> and <b>Golang</b> backend. </p></div></div></section><section class="_section_1e0mk_1"><div><h2>Skills</h2><div class="_list_89lzg_1"><!--[--><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/react-logo.8351f38f.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">React</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Classes and FC-s, hooks, context, redux, redux-saga, mobx</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/ts-logo.5847c362.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Typescript</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">For both frontend and backend development: generics, guards, infers</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/react-ssr-logo.3593105e.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">SSR (Next, Gatsby)</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Automated generation, incremental, static, and dynamic rendering</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/vue-logo.17ff892a.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Vue.js &amp; Nuxt</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Common SPA-s and SSR blogs like this one, with composition API, and Vuex</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/react-native-logo.bdbaa7c9.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">React Native</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Basic developing and releasing experience without native modules</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/golang-logo.f772e478.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Golang</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Monolith and microservice apps with REST, GraphQL, and GRPC</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/docker-logo.7f942bd1.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Docker</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Docker, docker-compose, private registries, gitlab-ci, and drone-ci</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/html-logo.1f694231.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">HTML, CSS, SVG</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/arch-logo.838efbc7.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Linux Shell</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/gql-logo.1e66e5b3.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">GraphQL</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Both server- and client-side. Queries, mutations, cache manipulation</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/swagger-logo.b314537c.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">REST API</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">With Axios, fetch, express, gorilla-mux, and gin-gonic</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/postgres-logo.d981f813.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">SQL</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Base queries, JOIN-s, indexes and simpl query optimizations</div><!--]--></div><!--]--></div></div></section><section class="_section_1e0mk_1"><div><h2>Pet Projects</h2><div class="_grid_1ng9c_1"><!--[--><div class="_card_e1njf_1"><!--[--><div class="_card_1wy9v_1"><div class="_thumbnail_1wy9v_7"><img src="/nuxt/vault48.40538b94.png" class="_image_1wy9v_14" alt="Vault48"></div><div class="_content_1wy9v_20"><div class="_head_1wy9v_27"><h3 class="_title_1wy9v_31">Vault48</h3><div class="_url_1wy9v_35"><a href="https://vault48.org" rel="noopener noreferrer">https://vault48.org</a></div></div><div class="_description_1wy9v_39">Community blog with a long 13-year history, features photo, video and audio embedding.
+<body data-head-attrs=""><div id="__nuxt"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><article><section class="_section_1e0mk_1 _heading_1e0mk_4"><div class="_grid_15n56_1"><div><img src="/nuxt/howdy.386ec27b.svg"></div><div class="_text_15n56_7"><h1>Howdy!</h1><p> My name is <b>Fedor Katurov</b>, I&#39;m a fullstack developer from Siberia. </p><p> I develop frontend applications with <b>React</b>, <b>Vue</b> and numerous other frameworks for the most of my time, but I&#39;m also capable of doing <b>Typescript</b> and <b>Golang</b> backend. </p></div></div></section><section class="_section_1e0mk_1"><div><h2>Skills</h2><div class="_list_89lzg_1"><!--[--><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/react-logo.8351f38f.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">React</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Classes and FC-s, hooks, context, redux, redux-saga, mobx</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/ts-logo.5847c362.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Typescript</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">For both frontend and backend development: generics, guards, infers</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/react-ssr-logo.3593105e.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">SSR (Next, Gatsby)</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Automated generation, incremental, static, and dynamic rendering</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/vue-logo.17ff892a.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Vue.js &amp; Nuxt</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Common SPA-s and SSR blogs like this one, with composition API, and Vuex</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/react-native-logo.bdbaa7c9.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">React Native</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Basic developing and releasing experience without native modules</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/golang-logo.f772e478.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Golang</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Monolith and microservice apps with REST, GraphQL, and GRPC</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/docker-logo.7f942bd1.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Docker</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Docker, docker-compose, private registries, gitlab-ci, and drone-ci</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/html-logo.1f694231.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">HTML, CSS, SVG</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/arch-logo.838efbc7.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">Linux Shell</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/gql-logo.1e66e5b3.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">GraphQL</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Both server- and client-side. Queries, mutations, cache manipulation</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/swagger-logo.b314537c.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">REST API</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">With Axios, fetch, express, gorilla-mux, and gin-gonic</div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_grid_1kefv_1"><div class="_icon_1kefv_15"><!--[--><img src="/nuxt/postgres-logo.d981f813.svg" width="48" height="48"><!--]--></div><div class="_text_1kefv_20"><h3 class="_title_1kefv_11">SQL</h3><div class="_rating_11ify_1"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" class="_star_11ify_10 _filled_11ify_29"><path d="m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"></path></svg><!--]--></div></div></div><div class="_description_1kefv_26">Base queries, JOIN-s, indexes and simpl query optimizations</div><!--]--></div><!--]--></div></div></section><section class="_section_1e0mk_1"><div><h2>Pet Projects</h2><div class="_grid_1ng9c_1"><!--[--><div class="_card_e1njf_1"><!--[--><div class="_card_1wy9v_1"><div class="_thumbnail_1wy9v_7"><img src="/nuxt/vault48.40538b94.png" class="_image_1wy9v_14" alt="Vault48"></div><div class="_content_1wy9v_20"><div class="_head_1wy9v_27"><h3 class="_title_1wy9v_31">Vault48</h3><div class="_url_1wy9v_35"><a href="https://vault48.org" rel="noopener noreferrer">https://vault48.org</a></div></div><div class="_description_1wy9v_39">Community blog with a long 13-year history, features photo, video and audio embedding.
 
 Beeing initially written with Drupal 5, went through refactoring to Laravel + Vue and then, nowadays works on React and Golang stack.</div></div><div class="_buttons_1wy9v_46"><a href="https://github.com/muerwre/vault-frontend" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Source Code <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path xmlns="http://www.w3.org/2000/svg" d="m16 35.9-12-12 12.1-12.1 2.15 2.15L8.3 23.9l9.85 9.85Zm15.9.1-2.15-2.15 9.95-9.95-9.85-9.85L32 11.9l12 12Z"></path></svg><!--]--></span></a><a href="https://vault48.org" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Visit <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path d="m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"></path></svg><!--]--></span></a></div></div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_card_1wy9v_1"><div class="_thumbnail_1wy9v_7"><img src="/nuxt/orchid-map.2f398715.png" class="_image_1wy9v_14" alt="Orchid Map"></div><div class="_content_1wy9v_20"><div class="_head_1wy9v_27"><h3 class="_title_1wy9v_31">Orchid Map</h3><div class="_url_1wy9v_35"><a href="https://map.vault48.org" rel="noopener noreferrer">https://map.vault48.org</a></div></div><div class="_description_1wy9v_39">Local cycling community Web Maps made with React, Leaflet, and Golang.
 
 Implements automatic route building with OSRM and map rasterization with canvas. Used by users in local cycling communities for ride sharing.</div></div><div class="_buttons_1wy9v_46"><a href="https://github.com/muerwre/orchidmap-front" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Source Code <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path xmlns="http://www.w3.org/2000/svg" d="m16 35.9-12-12 12.1-12.1 2.15 2.15L8.3 23.9l9.85 9.85Zm15.9.1-2.15-2.15 9.95-9.95-9.85-9.85L32 11.9l12 12Z"></path></svg><!--]--></span></a><a href="https://map.vault48.org" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Visit <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path d="m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"></path></svg><!--]--></span></a></div></div><!--]--></div><div class="_card_e1njf_1"><!--[--><div class="_card_1wy9v_1"><div class="_thumbnail_1wy9v_7"><img src="/nuxt/obsidian-garden.39e6dff3.png" class="_image_1wy9v_14" alt="Obsidian Garden"></div><div class="_content_1wy9v_20"><div class="_head_1wy9v_27"><h3 class="_title_1wy9v_31">Obsidian Garden</h3><div class="_url_1wy9v_35"><a href="https://muerwre.github.io" rel="noopener noreferrer">https://muerwre.github.io</a></div></div><div class="_description_1wy9v_39">Frontend for personal knowledge database managed by Obsidian.md software.
 
-Made with nuxt3, nuxt-content plugin and some customizations. Deployed with drone-ci directly to github-pages.</div></div><div class="_buttons_1wy9v_46"><a href="https://github.com/muerwre/muerwre.github.io" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Source Code <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path xmlns="http://www.w3.org/2000/svg" d="m16 35.9-12-12 12.1-12.1 2.15 2.15L8.3 23.9l9.85 9.85Zm15.9.1-2.15-2.15 9.95-9.95-9.85-9.85L32 11.9l12 12Z"></path></svg><!--]--></span></a><a href="https://muerwre.github.io" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Visit <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path d="m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"></path></svg><!--]--></span></a></div></div><!--]--></div><!--]--></div></div></section><section class="_section_1e0mk_1"><div><h2>Career</h2></div></section></article><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div><script type="module">import p from "/bio/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812490646}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/bio.e2cfb6e3.js" crossorigin></script><script type="module" src="/nuxt/BioHeading.fc552931.js" crossorigin></script><script type="module" src="/nuxt/BioSkills.1cbb9b74.js" crossorigin></script><script type="module" src="/nuxt/BioSkillsCard.dcf6f14b.js" crossorigin></script><script type="module" src="/nuxt/UiCard.fe784af1.js" crossorigin></script><script type="module" src="/nuxt/UiStars.0b5a97ee.js" crossorigin></script><script type="module" src="/nuxt/IconStar.c0f2126f.js" crossorigin></script><script type="module" src="/nuxt/BioProjects.9611713f.js" crossorigin></script><script type="module" src="/nuxt/BioProjectCard.4bb88134.js" crossorigin></script><script type="module" src="/nuxt/UiActionButton.8de8506c.js" crossorigin></script><script type="module" src="/nuxt/IconsCode.51acf16d.js" crossorigin></script><script type="module" src="/nuxt/ArrowRight.4c99b7f0.js" crossorigin></script><script type="module" src="/nuxt/BioCareer.96a55a4c.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script></body>
+Made with nuxt3, nuxt-content plugin and some customizations. Deployed with drone-ci directly to github-pages.</div></div><div class="_buttons_1wy9v_46"><a href="https://github.com/muerwre/muerwre.github.io" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Source Code <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path xmlns="http://www.w3.org/2000/svg" d="m16 35.9-12-12 12.1-12.1 2.15 2.15L8.3 23.9l9.85 9.85Zm15.9.1-2.15-2.15 9.95-9.95-9.85-9.85L32 11.9l12 12Z"></path></svg><!--]--></span></a><a href="https://muerwre.github.io" rel="noopener noreferrer" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41" _target="blank"><!----><span class="_title_aq4bi_48"><!--[--> Visit <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path d="m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"></path></svg><!--]--></span></a></div></div><!--]--></div><!--]--></div></div></section><section class="_section_1e0mk_1"><div><h2>Career</h2></div></section></article><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div><script type="module">import p from "/bio/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813353088}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/bio.3c0a5659.js" crossorigin></script><script type="module" src="/nuxt/BioHeading.40d2dead.js" crossorigin></script><script type="module" src="/nuxt/BioSkills.7301a037.js" crossorigin></script><script type="module" src="/nuxt/BioSkillsCard.24be210d.js" crossorigin></script><script type="module" src="/nuxt/UiCard.c1974320.js" crossorigin></script><script type="module" src="/nuxt/UiStars.ad96952a.js" crossorigin></script><script type="module" src="/nuxt/IconStar.67abd07c.js" crossorigin></script><script type="module" src="/nuxt/BioProjects.7d47d393.js" crossorigin></script><script type="module" src="/nuxt/BioProjectCard.168802cd.js" crossorigin></script><script type="module" src="/nuxt/UiActionButton.d5ab622f.js" crossorigin></script><script type="module" src="/nuxt/IconsCode.118b44a8.js" crossorigin></script><script type="module" src="/nuxt/ArrowRight.5a505e4f.js" crossorigin></script><script type="module" src="/nuxt/BioCareer.79116453.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/blockchain/common-typescript-examples/_payload.js b/blockchain/common-typescript-examples/_payload.js
index 84b1470..c63a7d2 100644
--- a/blockchain/common-typescript-examples/_payload.js
+++ b/blockchain/common-typescript-examples/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:aY,_path:aZ},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-84dtRQ1pg6":{_path:aZ,_dir:"blockchain",_draft:ak,_partial:ak,_locale:"en",_empty:ak,title:aY,description:p,excerpt:{type:a_,children:[{type:a,tag:a$,props:{},children:[{type:a,tag:Y,props:{},children:[{type:c,value:ba},{type:a,tag:M,props:{href:Z,rel:[_]},children:[{type:c,value:Z}]}]},{type:a,tag:Y,props:{},children:[{type:c,value:bb},{type:a,tag:M,props:{href:bc},children:[{type:c,value:bd}]}]}]},{type:a,tag:u,props:{id:al},children:[{type:c,value:am}]},{type:a,tag:D,props:{},children:[{type:c,value:be},{type:a,tag:N,props:{},children:[{type:c,value:bf}]},{type:c,value:bg},{type:a,tag:M,props:{href:bh,rel:[_]},children:[{type:c,value:bi}]},{type:c,value:bj}]},{type:a,tag:j,props:{code:an,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:an}]}]}]},{type:a,tag:u,props:{id:ao},children:[{type:c,value:ap}]},{type:a,tag:j,props:{code:aq,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aq}]}]}]},{type:a,tag:u,props:{id:ar},children:[{type:c,value:as}]},{type:a,tag:j,props:{code:at,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:at}]}]}]},{type:a,tag:u,props:{id:au},children:[{type:c,value:av}]},{type:a,tag:D,props:{},children:[{type:c,value:bk},{type:a,tag:N,props:{},children:[{type:c,value:O}]},{type:c,value:bl},{type:a,tag:N,props:{},children:[{type:c,value:P}]},{type:c,value:bm}]},{type:a,tag:j,props:{code:aw,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aw}]}]}]},{type:a,tag:u,props:{id:ax},children:[{type:c,value:ay}]},{type:a,tag:D,props:{},children:[{type:c,value:bn}]},{type:a,tag:j,props:{code:az,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:az}]}]}]},{type:a,tag:u,props:{id:aA},children:[{type:c,value:aB}]},{type:a,tag:j,props:{code:aC,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aC}]}]}]},{type:a,tag:u,props:{id:aD},children:[{type:c,value:aE}]},{type:a,tag:j,props:{code:aF,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aF}]}]}]},{type:a,tag:u,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:j,props:{code:aI,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aI}]}]}]},{type:a,tag:u,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:D,props:{},children:[{type:c,value:bo}]},{type:a,tag:j,props:{code:aL,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aL}]}]}]},{type:a,tag:D,props:{},children:[{type:c,value:bp}]},{type:a,tag:j,props:{code:aM,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aM}]}]}]}]},body:{type:a_,children:[{type:a,tag:a$,props:{},children:[{type:a,tag:Y,props:{},children:[{type:c,value:ba},{type:a,tag:M,props:{href:Z,rel:[_]},children:[{type:c,value:Z}]}]},{type:a,tag:Y,props:{},children:[{type:c,value:bb},{type:a,tag:M,props:{href:bc},children:[{type:c,value:bd}]}]}]},{type:a,tag:u,props:{id:al},children:[{type:c,value:am}]},{type:a,tag:D,props:{},children:[{type:c,value:be},{type:a,tag:N,props:{},children:[{type:c,value:bf}]},{type:c,value:bg},{type:a,tag:M,props:{href:bh,rel:[_]},children:[{type:c,value:bi}]},{type:c,value:bj}]},{type:a,tag:j,props:{code:an,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'web3'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F URL of your node"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002F...'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"givenProvider"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"||"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]}]}]}]},{type:a,tag:u,props:{id:ao},children:[{type:c,value:ap}]},{type:a,tag:j,props:{code:aq,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:aa},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:bs}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:bt},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:bu},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:bt},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-4196a1"},children:[{type:c,value:"string"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bs}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:ar},children:[{type:c,value:as}]},{type:a,tag:j,props:{code:at,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F first we need to authorize"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"authorize"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'eth_requestAccounts'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F then we can get wallet address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getCurrentAddressUser"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"selectedAddress"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:au},children:[{type:c,value:av}]},{type:a,tag:D,props:{},children:[{type:c,value:bk},{type:a,tag:N,props:{},children:[{type:c,value:O}]},{type:c,value:bl},{type:a,tag:N,props:{},children:[{type:c,value:P}]},{type:c,value:bm}]},{type:a,tag:j,props:{code:aw,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"transfer"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getTransactionCount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gasLimit: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gasPrice: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      nonce: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bI}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"EthUtil"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"toBuffer"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"Transaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sign"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bK}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"serialize"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:"this"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sendSignedTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"`0x${"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bK}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'hex'"}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}`"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bL}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:ax},children:[{type:c,value:ay}]},{type:a,tag:D,props:{},children:[{type:c,value:bn}]},{type:a,tag:j,props:{code:az,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bM}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bN}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateFee"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateGas"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bI}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"asciiToHex"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    })."}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"call"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"fromWei"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:bP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"())"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bQ}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"multiply"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:bP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bQ}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bL}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:aA},children:[{type:c,value:aB}]},{type:a,tag:j,props:{code:aC,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bM}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bN}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'accountsChanged'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"callback"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]}]}]}]},{type:a,tag:u,props:{id:aD},children:[{type:c,value:aE}]},{type:a,tag:j,props:{code:aF,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'chainChanged'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"handler"}]},{type:a,tag:b,props:{class:"ct-34f27a"},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]}]}]}]}]},{type:a,tag:u,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:j,props:{code:aI,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bS}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_watchAsset'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    params: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      type: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'ERC20'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      options: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        address: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        symbol: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'FOO'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        decimals: "}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:bT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        image: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Ffoo.io\u002Ftoken-image.svg'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bU}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:y},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:"then"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:bu},children:[{type:c,value:bV}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"log"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'FOO successfully added to wallet!'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bY}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"throw"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:"Error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'Something went wrong.'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bU}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:b_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]}]}]}]},{type:a,tag:u,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:D,props:{},children:[{type:c,value:bo}]},{type:a,tag:j,props:{code:aL,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getChainID"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'eth_chainId'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:D,props:{},children:[{type:c,value:bp}]},{type:a,tag:j,props:{code:aM,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:b$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bS}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_switchEthereumChain'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    params: [{ chainId: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:ca}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }], "}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:cb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"switchError"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F This error code indicates that the chain has not been added to MetaMask."}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:b_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"==="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:"4902"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:b$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        method: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_addEthereumChain'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        params: [{ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          chainId: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:ca}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:cb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          chainName: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'Ropsten Test Network'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          nativeCurrency: { "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              name: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:cc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              symbol: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:cc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              decimals: "}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:bT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          }, "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          rpcUrls: ["}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Fropsten.infura.io\u002Fv3\u002F9aa3d95b3bc440fa88ea12eaa4456161'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          blockExplorerUrls: ["}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Fropsten.etherscan.io'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        }] ,"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bY}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"addError"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F handle \"add\" error"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F handle other \"switch\" errors"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-58cded{color:#79C0FF}.ct-34f27a{color:#C9D1D9}.ct-99e7a2{color:#79C0FF}.ct-ac6681{color:#A5D6FF}.ct-4196a1{color:#79C0FF}.ct-0c3276{color:#FFA657}.ct-930ba7{color:#FF7B72}.ct-832f93{color:#D2A8FF}.ct-dcdfaf{color:#C9D1D9}.ct-e18cdc{color:#FF7B72}.ct-b7644c{color:#D2A8FF}.ct-4f105d{color:#79C0FF}.ct-86f4ab{color:#FF7B72}.ct-5e418d{color:#8B949E}.ct-6bd6d4{color:#A5D6FF}.ct-862b9b{color:#C9D1D9}.ct-d1af39{color:#C9D1D9}.ct-b084f5{color:#FF7B72}.light .ct-b084f5{color:#859900}.light .ct-d1af39{color:#657B83}.light .ct-862b9b{color:#268BD2}.light .ct-6bd6d4{color:#2AA198}.light .ct-5e418d{color:#93A1A1}.light .ct-86f4ab{color:#073642}.light .ct-4f105d{color:#268BD2}.light .ct-b7644c{color:#268BD2}.light .ct-e18cdc{color:#073642}.light .ct-dcdfaf{color:#657B83}.light .ct-832f93{color:#268BD2}.light .ct-930ba7{color:#859900}.light .ct-0c3276{color:#657B83}.light .ct-4196a1{color:#859900}.light .ct-ac6681{color:#657B83}.light .ct-99e7a2{color:#859900}.light .ct-34f27a{color:#859900}.light .ct-58cded{color:#D33682}"}]}],toc:{title:p,searchDepth:C,depth:C,links:[{id:al,depth:C,text:am},{id:ao,depth:C,text:ap},{id:ar,depth:C,text:as},{id:au,depth:C,text:av},{id:ax,depth:C,text:ay},{id:aA,depth:C,text:aB},{id:aD,depth:C,text:aE},{id:aG,depth:C,text:aH},{id:aJ,depth:C,text:aK}]}},_type:"markdown",_id:"content:Blockchain:Common typescript examples.md",_source:"content",_file:"Blockchain\u002FCommon typescript examples.md",_extension:"md"}},prerenderedAt:1667812496643}}("element","span","text","ct-d1af39","line","ct-862b9b"," ",".","ct-b084f5","code","ct-b7644c","ct-6bd6d4","    ","(","ct-86f4ab","","typescript","pre","web3",",","h2","=","const","ct-4f105d","ct-dcdfaf"," {","  ",", ",2,"p","      ","utils","from","ct-5e418d","await",");","=\u003E","}","a","code-inline","value","memo","eth",";","async"," (","return","request","toHex","ethereum","li","https:\u002F\u002Fmetamask.github.io\u002Ftest-dapp\u002F","nofollow","Web3","ct-e18cdc","to","gasLimit","gasPrice","();","),","toString",")","({",") {",false,"connecting-to-node","Connecting to node","import Web3 from 'web3';\n\n\u002F\u002F URL of your node\nconst PROVIDER_URL = 'https:\u002F\u002F...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","getting-wallet-balance","Getting wallet balance","const getBalance = async (address: string) =\u003E {\n    return await web3.eth.getBalance(address);\n}\n","getting-wallet-address","Getting wallet address","\u002F\u002F first we need to authorize\nconst authorize = async () =\u003E {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n\u002F\u002F then we can get wallet address\nconst getCurrentAddressUser = () =\u003E {\n    return web3.currentProvider.selectedAddress;\n}\n","sending-transaction","Sending transaction","\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) =\u003E {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","estimating-transaction-fee","Estimating transaction FEE","import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) =\u003E {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","subscribing-to-wallet-address-change","Subscribing to wallet address change","import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","watching-network-change","Watching network change","ethereum.on('chainChanged', handler: (chainId: string) =\u003E void);\n","adding-custom-token-to-wallet","Adding custom token to wallet","window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https:\u002F\u002Ffoo.io\u002Ftoken-image.svg',\n      },\n    },\n  })\n  .then((success) =\u003E {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","changing-network-to-custom","Changing network to custom","const getChainID = async () =\u003E {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], \u002F\u002F ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  \u002F\u002F This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', \u002F\u002F ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https:\u002F\u002Fropsten.infura.io\u002Fv3\u002F9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https:\u002F\u002Fropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      \u002F\u002F handle \"add\" error\n    }\n  }\n  \u002F\u002F handle other \"switch\" errors\n}\n","import","new"," () ","currentProvider","tx","ct-ac6681","ct-99e7a2","window","  .","ct-58cded","catch","Common Typescript Examples","\u002Fblockchain\u002Fcommon-typescript-examples","root","ul","Simple #dapp example for tests: ","Interaction with smart contracts described in ","Smart%20contracts","Smart contracts","If #Metamask extension installed, ","Web3.givenProvider"," is available in global window. You can use ","https:\u002F\u002Finfura.io","Infura"," or your node instead:","Sending "," tokens with "," as value:","Useful to get fixed amount of tokens from user with pre-estimated fee.","Checking current chainId:","Asking wallet to change current network:","PROVIDER_URL","ct-832f93","getBalance","ct-930ba7","ct-0c3276","address",":",") ","({ method: ","privateKey","}) ","nonce","getGasPrice","rawTx","      value: ","toWei","'ether'",")),","      data: ","privateKeyBuffer","serializedTx","    );"," { "," } ","'.'","BigInt","        .","on","    method: ","18","  })","success","if","console","    } ","    }","error","try","'0x03'","\u002F\u002F ropsten chainID (3) in hex","'ETH'"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:aY,_path:aZ},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-84dtRQ1pg6":{_path:aZ,_dir:"blockchain",_draft:ak,_partial:ak,_locale:"en",_empty:ak,title:aY,description:p,excerpt:{type:a_,children:[{type:a,tag:a$,props:{},children:[{type:a,tag:Y,props:{},children:[{type:c,value:ba},{type:a,tag:M,props:{href:Z,rel:[_]},children:[{type:c,value:Z}]}]},{type:a,tag:Y,props:{},children:[{type:c,value:bb},{type:a,tag:M,props:{href:bc},children:[{type:c,value:bd}]}]}]},{type:a,tag:u,props:{id:al},children:[{type:c,value:am}]},{type:a,tag:D,props:{},children:[{type:c,value:be},{type:a,tag:N,props:{},children:[{type:c,value:bf}]},{type:c,value:bg},{type:a,tag:M,props:{href:bh,rel:[_]},children:[{type:c,value:bi}]},{type:c,value:bj}]},{type:a,tag:j,props:{code:an,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:an}]}]}]},{type:a,tag:u,props:{id:ao},children:[{type:c,value:ap}]},{type:a,tag:j,props:{code:aq,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aq}]}]}]},{type:a,tag:u,props:{id:ar},children:[{type:c,value:as}]},{type:a,tag:j,props:{code:at,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:at}]}]}]},{type:a,tag:u,props:{id:au},children:[{type:c,value:av}]},{type:a,tag:D,props:{},children:[{type:c,value:bk},{type:a,tag:N,props:{},children:[{type:c,value:O}]},{type:c,value:bl},{type:a,tag:N,props:{},children:[{type:c,value:P}]},{type:c,value:bm}]},{type:a,tag:j,props:{code:aw,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aw}]}]}]},{type:a,tag:u,props:{id:ax},children:[{type:c,value:ay}]},{type:a,tag:D,props:{},children:[{type:c,value:bn}]},{type:a,tag:j,props:{code:az,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:az}]}]}]},{type:a,tag:u,props:{id:aA},children:[{type:c,value:aB}]},{type:a,tag:j,props:{code:aC,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aC}]}]}]},{type:a,tag:u,props:{id:aD},children:[{type:c,value:aE}]},{type:a,tag:j,props:{code:aF,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aF}]}]}]},{type:a,tag:u,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:j,props:{code:aI,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aI}]}]}]},{type:a,tag:u,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:D,props:{},children:[{type:c,value:bo}]},{type:a,tag:j,props:{code:aL,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aL}]}]}]},{type:a,tag:D,props:{},children:[{type:c,value:bp}]},{type:a,tag:j,props:{code:aM,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aM}]}]}]}]},body:{type:a_,children:[{type:a,tag:a$,props:{},children:[{type:a,tag:Y,props:{},children:[{type:c,value:ba},{type:a,tag:M,props:{href:Z,rel:[_]},children:[{type:c,value:Z}]}]},{type:a,tag:Y,props:{},children:[{type:c,value:bb},{type:a,tag:M,props:{href:bc},children:[{type:c,value:bd}]}]}]},{type:a,tag:u,props:{id:al},children:[{type:c,value:am}]},{type:a,tag:D,props:{},children:[{type:c,value:be},{type:a,tag:N,props:{},children:[{type:c,value:bf}]},{type:c,value:bg},{type:a,tag:M,props:{href:bh,rel:[_]},children:[{type:c,value:bi}]},{type:c,value:bj}]},{type:a,tag:j,props:{code:an,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'web3'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F URL of your node"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002F...'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"givenProvider"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"||"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]}]}]}]},{type:a,tag:u,props:{id:ao},children:[{type:c,value:ap}]},{type:a,tag:j,props:{code:aq,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:aa},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:bs}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:bt},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:bu},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:bt},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-e5bd8a"},children:[{type:c,value:"string"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bs}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:ar},children:[{type:c,value:as}]},{type:a,tag:j,props:{code:at,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F first we need to authorize"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"authorize"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'eth_requestAccounts'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F then we can get wallet address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getCurrentAddressUser"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"selectedAddress"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:au},children:[{type:c,value:av}]},{type:a,tag:D,props:{},children:[{type:c,value:bk},{type:a,tag:N,props:{},children:[{type:c,value:O}]},{type:c,value:bl},{type:a,tag:N,props:{},children:[{type:c,value:P}]},{type:c,value:bm}]},{type:a,tag:j,props:{code:aw,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"transfer"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getTransactionCount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gasLimit: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gasPrice: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      nonce: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bI}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"EthUtil"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"toBuffer"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"Transaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sign"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bK}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"serialize"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:"this"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sendSignedTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"`0x${"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bK}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'hex'"}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}`"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bL}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:ax},children:[{type:c,value:ay}]},{type:a,tag:D,props:{},children:[{type:c,value:bn}]},{type:a,tag:j,props:{code:az,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bM}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bN}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateFee"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateGas"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bI}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"asciiToHex"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    })."}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"call"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"fromWei"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:bP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"())"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bQ}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"multiply"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:bP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bQ}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bL}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:aA},children:[{type:c,value:aB}]},{type:a,tag:j,props:{code:aC,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bM}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bN}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'accountsChanged'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"callback"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]}]}]}]},{type:a,tag:u,props:{id:aD},children:[{type:c,value:aE}]},{type:a,tag:j,props:{code:aF,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'chainChanged'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"handler"}]},{type:a,tag:b,props:{class:"ct-9c2fa8"},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]}]}]}]}]},{type:a,tag:u,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:j,props:{code:aI,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bS}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_watchAsset'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    params: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      type: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'ERC20'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      options: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        address: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        symbol: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'FOO'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        decimals: "}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:bT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        image: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Ffoo.io\u002Ftoken-image.svg'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bU}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:y},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:"then"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:bu},children:[{type:c,value:bV}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"log"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'FOO successfully added to wallet!'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bY}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"throw"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:"Error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'Something went wrong.'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bU}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:b_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]}]}]}]},{type:a,tag:u,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:D,props:{},children:[{type:c,value:bo}]},{type:a,tag:j,props:{code:aL,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getChainID"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'eth_chainId'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:D,props:{},children:[{type:c,value:bp}]},{type:a,tag:j,props:{code:aM,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:b$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bS}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_switchEthereumChain'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    params: [{ chainId: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:ca}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }], "}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:cb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"switchError"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F This error code indicates that the chain has not been added to MetaMask."}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:b_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"==="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:"4902"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:b$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        method: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_addEthereumChain'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        params: [{ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          chainId: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:ca}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:cb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          chainName: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'Ropsten Test Network'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          nativeCurrency: { "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              name: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:cc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              symbol: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:cc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              decimals: "}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:bT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          }, "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          rpcUrls: ["}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Fropsten.infura.io\u002Fv3\u002F9aa3d95b3bc440fa88ea12eaa4456161'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          blockExplorerUrls: ["}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Fropsten.etherscan.io'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        }] ,"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bY}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"addError"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F handle \"add\" error"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F handle other \"switch\" errors"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-b2d291{color:#79C0FF}.ct-9c2fa8{color:#C9D1D9}.ct-bba616{color:#79C0FF}.ct-255b39{color:#A5D6FF}.ct-e5bd8a{color:#79C0FF}.ct-388d87{color:#FFA657}.ct-c88325{color:#FF7B72}.ct-619167{color:#D2A8FF}.ct-001a1d{color:#C9D1D9}.ct-83b2aa{color:#FF7B72}.ct-76c663{color:#D2A8FF}.ct-a3bc7b{color:#79C0FF}.ct-51348d{color:#FF7B72}.ct-09d035{color:#8B949E}.ct-df7cba{color:#A5D6FF}.ct-4a3086{color:#C9D1D9}.ct-a39e24{color:#C9D1D9}.ct-8e8040{color:#FF7B72}.light .ct-8e8040{color:#859900}.light .ct-a39e24{color:#657B83}.light .ct-4a3086{color:#268BD2}.light .ct-df7cba{color:#2AA198}.light .ct-09d035{color:#93A1A1}.light .ct-51348d{color:#073642}.light .ct-a3bc7b{color:#268BD2}.light .ct-76c663{color:#268BD2}.light .ct-83b2aa{color:#073642}.light .ct-001a1d{color:#657B83}.light .ct-619167{color:#268BD2}.light .ct-c88325{color:#859900}.light .ct-388d87{color:#657B83}.light .ct-e5bd8a{color:#859900}.light .ct-255b39{color:#657B83}.light .ct-bba616{color:#859900}.light .ct-9c2fa8{color:#859900}.light .ct-b2d291{color:#D33682}"}]}],toc:{title:p,searchDepth:C,depth:C,links:[{id:al,depth:C,text:am},{id:ao,depth:C,text:ap},{id:ar,depth:C,text:as},{id:au,depth:C,text:av},{id:ax,depth:C,text:ay},{id:aA,depth:C,text:aB},{id:aD,depth:C,text:aE},{id:aG,depth:C,text:aH},{id:aJ,depth:C,text:aK}]}},_type:"markdown",_id:"content:Blockchain:Common typescript examples.md",_source:"content",_file:"Blockchain\u002FCommon typescript examples.md",_extension:"md"}},prerenderedAt:1667813358969}}("element","span","text","ct-a39e24","line","ct-4a3086"," ",".","ct-8e8040","code","ct-76c663","ct-df7cba","    ","(","ct-51348d","","typescript","pre","web3",",","h2","=","const","ct-a3bc7b","ct-001a1d"," {","  ",", ",2,"p","      ","utils","from","ct-09d035","await",");","=\u003E","}","a","code-inline","value","memo","eth",";","async"," (","return","request","toHex","ethereum","li","https:\u002F\u002Fmetamask.github.io\u002Ftest-dapp\u002F","nofollow","Web3","ct-83b2aa","to","gasLimit","gasPrice","();","),","toString",")","({",") {",false,"connecting-to-node","Connecting to node","import Web3 from 'web3';\n\n\u002F\u002F URL of your node\nconst PROVIDER_URL = 'https:\u002F\u002F...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","getting-wallet-balance","Getting wallet balance","const getBalance = async (address: string) =\u003E {\n    return await web3.eth.getBalance(address);\n}\n","getting-wallet-address","Getting wallet address","\u002F\u002F first we need to authorize\nconst authorize = async () =\u003E {\n  await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n\u002F\u002F then we can get wallet address\nconst getCurrentAddressUser = () =\u003E {\n    return web3.currentProvider.selectedAddress;\n}\n","sending-transaction","Sending transaction","\nconst transfer = async ({ \n  from, \n  to, \n  value, \n  memo, \n  privateKey, \n  gasLimit = 44000 \n}) =\u003E {\n    const nonce = await web3.eth.getTransactionCount(from);\n    const gasPrice = await web3.eth.getGasPrice();\n    \n    const rawTx = {\n      from,\n      to,\n      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n      gasLimit: web3.utils.toHex(gasLimit),\n      gasPrice: web3.utils.toHex(gasPrice),\n      nonce: web3.utils.toHex(nonce),\n      data: memo,\n    };\n    \n    const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n    \n    const tx = new Transaction(rawTx);\n    \n    tx.sign(privateKeyBuffer);\n    const serializedTx = tx.serialize();\n    \n    return this.web3.eth.sendSignedTransaction(\n      `0x${serializedTx.toString('hex')}`\n    );\n}\n","estimating-transaction-fee","Estimating transaction FEE","import { web3 } from '.';\n\nconst estimateFee = async ({\n    from,\n    to,\n    value,\n    memo,\n}) =\u003E {\n    const gasPrice = await web3.eth.getGasPrice();\n    const gasLimit = await web3.eth.estimateGas({\n      from,\n      to,\n      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n      data: web3.utils.asciiToHex(memo),\n    }).call();\n    \n    return web3.utils.fromWei(\n      BigInt(gasPrice.toString())\n        .multiply(BigInt(gasLimit.toString()))\n        .toString()\n    );\n}\n","subscribing-to-wallet-address-change","Subscribing to wallet address change","import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","watching-network-change","Watching network change","ethereum.on('chainChanged', handler: (chainId: string) =\u003E void);\n","adding-custom-token-to-wallet","Adding custom token to wallet","window.ethereum\n  .request({\n    method: 'wallet_watchAsset',\n    params: {\n      type: 'ERC20',\n      options: {\n        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n        symbol: 'FOO',\n        decimals: 18,\n        image: 'https:\u002F\u002Ffoo.io\u002Ftoken-image.svg',\n      },\n    },\n  })\n  .then((success) =\u003E {\n    if (success) {\n      console.log('FOO successfully added to wallet!')\n    } else {\n      throw new Error('Something went wrong.')\n    }\n  })\n  .catch(console.error)\n","changing-network-to-custom","Changing network to custom","const getChainID = async () =\u003E {\n    return ethereum.request({ method: 'eth_chainId' })\n}\n","try {\n  await window.ethereum.request({\n    method: 'wallet_switchEthereumChain',\n    params: [{ chainId: '0x03' }], \u002F\u002F ropsten chainID (3) in hex\n  });\n} catch (switchError) {\n  \u002F\u002F This error code indicates that the chain has not been added to MetaMask.\n  if (error.code === 4902) {\n    try {\n      await window.ethereum.request({\n        method: 'wallet_addEthereumChain',\n        params: [{ \n          chainId: '0x03', \u002F\u002F ropsten chainID (3) in hex\n          chainName: 'Ropsten Test Network', \n          nativeCurrency: { \n              name: 'ETH',\n              symbol: 'ETH',\n              decimals: 18\n          }, \n          rpcUrls: ['https:\u002F\u002Fropsten.infura.io\u002Fv3\u002F9aa3d95b3bc440fa88ea12eaa4456161'], \n          blockExplorerUrls: ['https:\u002F\u002Fropsten.etherscan.io'] \n        }] ,\n      });\n    } catch (addError) {\n      \u002F\u002F handle \"add\" error\n    }\n  }\n  \u002F\u002F handle other \"switch\" errors\n}\n","import","new"," () ","currentProvider","tx","ct-255b39","ct-bba616","window","  .","ct-b2d291","catch","Common Typescript Examples","\u002Fblockchain\u002Fcommon-typescript-examples","root","ul","Simple #dapp example for tests: ","Interaction with smart contracts described in ","Smart%20contracts","Smart contracts","If #Metamask extension installed, ","Web3.givenProvider"," is available in global window. You can use ","https:\u002F\u002Finfura.io","Infura"," or your node instead:","Sending "," tokens with "," as value:","Useful to get fixed amount of tokens from user with pre-estimated fee.","Checking current chainId:","Asking wallet to change current network:","PROVIDER_URL","ct-619167","getBalance","ct-c88325","ct-388d87","address",":",") ","({ method: ","privateKey","}) ","nonce","getGasPrice","rawTx","      value: ","toWei","'ether'",")),","      data: ","privateKeyBuffer","serializedTx","    );"," { "," } ","'.'","BigInt","        .","on","    method: ","18","  })","success","if","console","    } ","    }","error","try","'0x03'","\u002F\u002F ropsten chainID (3) in hex","'ETH'"))
\ No newline at end of file
diff --git a/blockchain/common-typescript-examples/index.html b/blockchain/common-typescript-examples/index.html
index f507fdb..e1e0042 100644
--- a/blockchain/common-typescript-examples/index.html
+++ b/blockchain/common-typescript-examples/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Common Typescript Examples • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/blockchain/common-typescript-examples/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseUl.7c14583d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.f5f48b70.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Common Typescript Examples • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/blockchain/common-typescript-examples/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseUl.85dc1033.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.94808e98.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/blockchain/common-typescript-examples" class="router-link-active _active_192pu_81 _link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Common Typescript Examples</h1><article><div><ul><!--[--><li><!--[-->Simple #dapp example for tests: <a href="https://metamask.github.io/test-dapp/" rel="nofollow" target="_blank"><!--[-->https://metamask.github.io/test-dapp/<!--]--></a><!--]--></li><li><!--[-->Interaction with smart contracts described in <a href="/blockchain/smart-contracts" class=""><!--[-->Smart contracts<!--]--></a><!--]--></li><!--]--></ul><h2 id="connecting-to-node"><a href="#connecting-to-node"><!--[-->Connecting to node<!--]--></a></h2><p><!--[-->If #Metamask extension installed, <code><!--[-->Web3.givenProvider<!--]--></code> is available in global window. You can use <a href="https://infura.io" rel="nofollow" target="_blank"><!--[-->Infura<!--]--></a> or your node instead:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b084f5">import</span><span class="ct-d1af39"> </span><span class="ct-862b9b">Web3</span><span class="ct-d1af39"> </span><span class="ct-b084f5">from</span><span class="ct-d1af39"> </span><span class="ct-6bd6d4">&#39;web3&#39;</span><span class="ct-d1af39">;</span></span><span class="line"></span><span class="line"><span class="ct-5e418d">// URL of your node</span></span><span class="line"><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">PROVIDER_URL</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-6bd6d4">&#39;https://...&#39;</span><span class="ct-d1af39">;</span></span><span class="line"></span><span class="line"><span class="ct-b084f5">export</span><span class="ct-d1af39"> </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">web3</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-b084f5">new</span><span class="ct-d1af39"> </span><span class="ct-b7644c">Web3</span><span class="ct-d1af39">(</span><span class="ct-862b9b">Web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">givenProvider</span><span class="ct-d1af39"> </span><span class="ct-b084f5">||</span><span class="ct-d1af39"> </span><span class="ct-4f105d">PROVIDER_URL</span><span class="ct-d1af39">);</span></span></code></pre><!--]--></div><h2 id="getting-wallet-balance"><a href="#getting-wallet-balance"><!--[-->Getting wallet balance<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-e18cdc">const</span><span class="ct-dcdfaf"> </span><span class="ct-832f93">getBalance</span><span class="ct-dcdfaf"> </span><span class="ct-930ba7">=</span><span class="ct-dcdfaf"> </span><span class="ct-e18cdc">async</span><span class="ct-dcdfaf"> (</span><span class="ct-0c3276">address</span><span class="ct-930ba7">:</span><span class="ct-dcdfaf"> </span><span class="ct-4196a1">string</span><span class="ct-dcdfaf">) </span><span class="ct-e18cdc">=&gt;</span><span class="ct-dcdfaf"> {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">return</span><span class="ct-d1af39"> </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">eth</span><span class="ct-d1af39">.</span><span class="ct-b7644c">getBalance</span><span class="ct-d1af39">(</span><span class="ct-862b9b">address</span><span class="ct-d1af39">);</span></span><span class="line"><span class="ct-d1af39">}</span></span></code></pre><!--]--></div><h2 id="getting-wallet-address"><a href="#getting-wallet-address"><!--[-->Getting wallet address<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-5e418d">// first we need to authorize</span></span><span class="line"><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-b7644c">authorize</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-86f4ab">async</span><span class="ct-d1af39"> () </span><span class="ct-86f4ab">=&gt;</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">currentProvider</span><span class="ct-d1af39">.</span><span class="ct-b7644c">request</span><span class="ct-d1af39">({ method: </span><span class="ct-6bd6d4">&#39;eth_requestAccounts&#39;</span><span class="ct-d1af39"> });</span></span><span class="line"><span class="ct-d1af39">}</span></span><span class="line"></span><span class="line"><span class="ct-5e418d">// then we can get wallet address</span></span><span class="line"><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-b7644c">getCurrentAddressUser</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> () </span><span class="ct-86f4ab">=&gt;</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">return</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">currentProvider</span><span class="ct-d1af39">.</span><span class="ct-862b9b">selectedAddress</span><span class="ct-d1af39">;</span></span><span class="line"><span class="ct-d1af39">}</span></span></code></pre><!--]--></div><h2 id="sending-transaction"><a href="#sending-transaction"><!--[-->Sending transaction<!--]--></a></h2><p><!--[-->Sending <code><!--[-->value<!--]--></code> tokens with <code><!--[-->memo<!--]--></code> as value:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"></span><span class="line"><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-b7644c">transfer</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-86f4ab">async</span><span class="ct-d1af39"> ({ </span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-862b9b">from</span><span class="ct-d1af39">, </span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-862b9b">to</span><span class="ct-d1af39">, </span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-862b9b">value</span><span class="ct-d1af39">, </span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-862b9b">memo</span><span class="ct-d1af39">, </span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-862b9b">privateKey</span><span class="ct-d1af39">, </span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-862b9b">gasLimit</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span></span><span class="line"><span class="ct-d1af39">}) </span><span class="ct-86f4ab">=&gt;</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">nonce</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">eth</span><span class="ct-d1af39">.</span><span class="ct-b7644c">getTransactionCount</span><span class="ct-d1af39">(</span><span class="ct-862b9b">from</span><span class="ct-d1af39">);</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">gasPrice</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">eth</span><span class="ct-d1af39">.</span><span class="ct-b7644c">getGasPrice</span><span class="ct-d1af39">();</span></span><span class="line"><span class="ct-d1af39">    </span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">rawTx</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-862b9b">from</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-862b9b">to</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">      value: </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toHex</span><span class="ct-d1af39">(</span><span class="ct-862b9b">Web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toWei</span><span class="ct-d1af39">(</span><span class="ct-862b9b">value</span><span class="ct-d1af39">, </span><span class="ct-6bd6d4">&#39;ether&#39;</span><span class="ct-d1af39">)),</span></span><span class="line"><span class="ct-d1af39">      gasLimit: </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toHex</span><span class="ct-d1af39">(</span><span class="ct-862b9b">gasLimit</span><span class="ct-d1af39">),</span></span><span class="line"><span class="ct-d1af39">      gasPrice: </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toHex</span><span class="ct-d1af39">(</span><span class="ct-862b9b">gasPrice</span><span class="ct-d1af39">),</span></span><span class="line"><span class="ct-d1af39">      nonce: </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toHex</span><span class="ct-d1af39">(</span><span class="ct-862b9b">nonce</span><span class="ct-d1af39">),</span></span><span class="line"><span class="ct-d1af39">      data: </span><span class="ct-862b9b">memo</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">    };</span></span><span class="line"><span class="ct-d1af39">    </span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">privateKeyBuffer</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-862b9b">EthUtil</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toBuffer</span><span class="ct-d1af39">(</span><span class="ct-862b9b">privateKey</span><span class="ct-d1af39">);</span></span><span class="line"><span class="ct-d1af39">    </span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">tx</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-b084f5">new</span><span class="ct-d1af39"> </span><span class="ct-b7644c">Transaction</span><span class="ct-d1af39">(</span><span class="ct-862b9b">rawTx</span><span class="ct-d1af39">);</span></span><span class="line"><span class="ct-d1af39">    </span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-862b9b">tx</span><span class="ct-d1af39">.</span><span class="ct-b7644c">sign</span><span class="ct-d1af39">(</span><span class="ct-862b9b">privateKeyBuffer</span><span class="ct-d1af39">);</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">serializedTx</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-862b9b">tx</span><span class="ct-d1af39">.</span><span class="ct-b7644c">serialize</span><span class="ct-d1af39">();</span></span><span class="line"><span class="ct-d1af39">    </span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">return</span><span class="ct-d1af39"> </span><span class="ct-4f105d">this</span><span class="ct-d1af39">.</span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">eth</span><span class="ct-d1af39">.</span><span class="ct-b7644c">sendSignedTransaction</span><span class="ct-d1af39">(</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-6bd6d4">`0x${</span><span class="ct-862b9b">serializedTx</span><span class="ct-ac6681">.</span><span class="ct-b7644c">toString</span><span class="ct-ac6681">(</span><span class="ct-6bd6d4">&#39;hex&#39;</span><span class="ct-ac6681">)</span><span class="ct-6bd6d4">}`</span></span><span class="line"><span class="ct-d1af39">    );</span></span><span class="line"><span class="ct-d1af39">}</span></span></code></pre><!--]--></div><h2 id="estimating-transaction-fee"><a href="#estimating-transaction-fee"><!--[-->Estimating transaction FEE<!--]--></a></h2><p><!--[-->Useful to get fixed amount of tokens from user with pre-estimated fee.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b084f5">import</span><span class="ct-d1af39"> { </span><span class="ct-862b9b">web3</span><span class="ct-d1af39"> } </span><span class="ct-b084f5">from</span><span class="ct-d1af39"> </span><span class="ct-6bd6d4">&#39;.&#39;</span><span class="ct-d1af39">;</span></span><span class="line"></span><span class="line"><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-b7644c">estimateFee</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-86f4ab">async</span><span class="ct-d1af39"> ({</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-862b9b">from</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-862b9b">to</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-862b9b">value</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-862b9b">memo</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">}) </span><span class="ct-86f4ab">=&gt;</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">gasPrice</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">eth</span><span class="ct-d1af39">.</span><span class="ct-b7644c">getGasPrice</span><span class="ct-d1af39">();</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-4f105d">gasLimit</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">eth</span><span class="ct-d1af39">.</span><span class="ct-b7644c">estimateGas</span><span class="ct-d1af39">({</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-862b9b">from</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-862b9b">to</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">      value: </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toHex</span><span class="ct-d1af39">(</span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toWei</span><span class="ct-d1af39">(</span><span class="ct-862b9b">value</span><span class="ct-d1af39">, </span><span class="ct-6bd6d4">&#39;ether&#39;</span><span class="ct-d1af39">)),</span></span><span class="line"><span class="ct-d1af39">      data: </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">asciiToHex</span><span class="ct-d1af39">(</span><span class="ct-862b9b">memo</span><span class="ct-d1af39">),</span></span><span class="line"><span class="ct-d1af39">    }).</span><span class="ct-b7644c">call</span><span class="ct-d1af39">();</span></span><span class="line"><span class="ct-d1af39">    </span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">return</span><span class="ct-d1af39"> </span><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">utils</span><span class="ct-d1af39">.</span><span class="ct-b7644c">fromWei</span><span class="ct-d1af39">(</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-99e7a2">BigInt</span><span class="ct-d1af39">(</span><span class="ct-862b9b">gasPrice</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toString</span><span class="ct-d1af39">())</span></span><span class="line"><span class="ct-d1af39">        .</span><span class="ct-b7644c">multiply</span><span class="ct-d1af39">(</span><span class="ct-99e7a2">BigInt</span><span class="ct-d1af39">(</span><span class="ct-862b9b">gasLimit</span><span class="ct-d1af39">.</span><span class="ct-b7644c">toString</span><span class="ct-d1af39">()))</span></span><span class="line"><span class="ct-d1af39">        .</span><span class="ct-b7644c">toString</span><span class="ct-d1af39">()</span></span><span class="line"><span class="ct-d1af39">    );</span></span><span class="line"><span class="ct-d1af39">}</span></span></code></pre><!--]--></div><h2 id="subscribing-to-wallet-address-change"><a href="#subscribing-to-wallet-address-change"><!--[-->Subscribing to wallet address change<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b084f5">import</span><span class="ct-d1af39"> { </span><span class="ct-862b9b">web3</span><span class="ct-d1af39"> } </span><span class="ct-b084f5">from</span><span class="ct-d1af39"> </span><span class="ct-6bd6d4">&#39;.&#39;</span><span class="ct-d1af39">;</span></span><span class="line"></span><span class="line"><span class="ct-862b9b">web3</span><span class="ct-d1af39">.</span><span class="ct-862b9b">currentProvider</span><span class="ct-d1af39">.</span><span class="ct-b7644c">on</span><span class="ct-d1af39">(</span><span class="ct-6bd6d4">&#39;accountsChanged&#39;</span><span class="ct-d1af39">, </span><span class="ct-862b9b">callback</span><span class="ct-d1af39">);</span></span></code></pre><!--]--></div><h2 id="watching-network-change"><a href="#watching-network-change"><!--[-->Watching network change<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-862b9b">ethereum</span><span class="ct-d1af39">.</span><span class="ct-b7644c">on</span><span class="ct-d1af39">(</span><span class="ct-6bd6d4">&#39;chainChanged&#39;</span><span class="ct-d1af39">, </span><span class="ct-862b9b">handler</span><span class="ct-34f27a">:</span><span class="ct-d1af39"> </span></span></code></pre><!--]--></div><h2 id="adding-custom-token-to-wallet"><a href="#adding-custom-token-to-wallet"><!--[-->Adding custom token to wallet<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-862b9b">window</span><span class="ct-d1af39">.</span><span class="ct-862b9b">ethereum</span></span><span class="line"><span class="ct-d1af39">  .</span><span class="ct-b7644c">request</span><span class="ct-d1af39">({</span></span><span class="line"><span class="ct-d1af39">    method: </span><span class="ct-6bd6d4">&#39;wallet_watchAsset&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">    params: {</span></span><span class="line"><span class="ct-d1af39">      type: </span><span class="ct-6bd6d4">&#39;ERC20&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">      options: {</span></span><span class="line"><span class="ct-d1af39">        address: </span><span class="ct-6bd6d4">&#39;0xb60e8dd61c5d32be8058bb8eb970870f07233155&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">        symbol: </span><span class="ct-6bd6d4">&#39;FOO&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">        decimals: </span><span class="ct-58cded">18</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">        image: </span><span class="ct-6bd6d4">&#39;https://foo.io/token-image.svg&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">      },</span></span><span class="line"><span class="ct-d1af39">    },</span></span><span class="line"><span class="ct-d1af39">  })</span></span><span class="line"><span class="ct-dcdfaf">  .</span><span class="ct-832f93">then</span><span class="ct-dcdfaf">((</span><span class="ct-0c3276">success</span><span class="ct-dcdfaf">) </span><span class="ct-e18cdc">=&gt;</span><span class="ct-dcdfaf"> {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">if</span><span class="ct-d1af39"> (</span><span class="ct-862b9b">success</span><span class="ct-d1af39">) {</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-862b9b">console</span><span class="ct-d1af39">.</span><span class="ct-b7644c">log</span><span class="ct-d1af39">(</span><span class="ct-6bd6d4">&#39;FOO successfully added to wallet!&#39;</span><span class="ct-d1af39">)</span></span><span class="line"><span class="ct-d1af39">    } </span><span class="ct-b084f5">else</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-b084f5">throw</span><span class="ct-d1af39"> </span><span class="ct-b084f5">new</span><span class="ct-d1af39"> </span><span class="ct-99e7a2">Error</span><span class="ct-d1af39">(</span><span class="ct-6bd6d4">&#39;Something went wrong.&#39;</span><span class="ct-d1af39">)</span></span><span class="line"><span class="ct-d1af39">    }</span></span><span class="line"><span class="ct-d1af39">  })</span></span><span class="line"><span class="ct-d1af39">  .</span><span class="ct-b7644c">catch</span><span class="ct-d1af39">(</span><span class="ct-862b9b">console</span><span class="ct-d1af39">.</span><span class="ct-862b9b">error</span><span class="ct-d1af39">)</span></span></code></pre><!--]--></div><h2 id="changing-network-to-custom"><a href="#changing-network-to-custom"><!--[-->Changing network to custom<!--]--></a></h2><p><!--[-->Checking current chainId:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-86f4ab">const</span><span class="ct-d1af39"> </span><span class="ct-b7644c">getChainID</span><span class="ct-d1af39"> </span><span class="ct-b084f5">=</span><span class="ct-d1af39"> </span><span class="ct-86f4ab">async</span><span class="ct-d1af39"> () </span><span class="ct-86f4ab">=&gt;</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">return</span><span class="ct-d1af39"> </span><span class="ct-862b9b">ethereum</span><span class="ct-d1af39">.</span><span class="ct-b7644c">request</span><span class="ct-d1af39">({ method: </span><span class="ct-6bd6d4">&#39;eth_chainId&#39;</span><span class="ct-d1af39"> })</span></span><span class="line"><span class="ct-d1af39">}</span></span></code></pre><!--]--></div><p><!--[-->Asking wallet to change current network:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b084f5">try</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">window</span><span class="ct-d1af39">.</span><span class="ct-862b9b">ethereum</span><span class="ct-d1af39">.</span><span class="ct-b7644c">request</span><span class="ct-d1af39">({</span></span><span class="line"><span class="ct-d1af39">    method: </span><span class="ct-6bd6d4">&#39;wallet_switchEthereumChain&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">    params: [{ chainId: </span><span class="ct-6bd6d4">&#39;0x03&#39;</span><span class="ct-d1af39"> }], </span><span class="ct-5e418d">// ropsten chainID (3) in hex</span></span><span class="line"><span class="ct-d1af39">  });</span></span><span class="line"><span class="ct-d1af39">} </span><span class="ct-b084f5">catch</span><span class="ct-d1af39"> (</span><span class="ct-862b9b">switchError</span><span class="ct-d1af39">) {</span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-5e418d">// This error code indicates that the chain has not been added to MetaMask.</span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-b084f5">if</span><span class="ct-d1af39"> (</span><span class="ct-862b9b">error</span><span class="ct-d1af39">.</span><span class="ct-862b9b">code</span><span class="ct-d1af39"> </span><span class="ct-b084f5">===</span><span class="ct-d1af39"> </span><span class="ct-58cded">4902</span><span class="ct-d1af39">) {</span></span><span class="line"><span class="ct-d1af39">    </span><span class="ct-b084f5">try</span><span class="ct-d1af39"> {</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-b084f5">await</span><span class="ct-d1af39"> </span><span class="ct-862b9b">window</span><span class="ct-d1af39">.</span><span class="ct-862b9b">ethereum</span><span class="ct-d1af39">.</span><span class="ct-b7644c">request</span><span class="ct-d1af39">({</span></span><span class="line"><span class="ct-d1af39">        method: </span><span class="ct-6bd6d4">&#39;wallet_addEthereumChain&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">        params: [{ </span></span><span class="line"><span class="ct-d1af39">          chainId: </span><span class="ct-6bd6d4">&#39;0x03&#39;</span><span class="ct-d1af39">, </span><span class="ct-5e418d">// ropsten chainID (3) in hex</span></span><span class="line"><span class="ct-d1af39">          chainName: </span><span class="ct-6bd6d4">&#39;Ropsten Test Network&#39;</span><span class="ct-d1af39">, </span></span><span class="line"><span class="ct-d1af39">          nativeCurrency: { </span></span><span class="line"><span class="ct-d1af39">              name: </span><span class="ct-6bd6d4">&#39;ETH&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">              symbol: </span><span class="ct-6bd6d4">&#39;ETH&#39;</span><span class="ct-d1af39">,</span></span><span class="line"><span class="ct-d1af39">              decimals: </span><span class="ct-58cded">18</span></span><span class="line"><span class="ct-d1af39">          }, </span></span><span class="line"><span class="ct-d1af39">          rpcUrls: [</span><span class="ct-6bd6d4">&#39;https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161&#39;</span><span class="ct-d1af39">], </span></span><span class="line"><span class="ct-d1af39">          blockExplorerUrls: [</span><span class="ct-6bd6d4">&#39;https://ropsten.etherscan.io&#39;</span><span class="ct-d1af39">] </span></span><span class="line"><span class="ct-d1af39">        }] ,</span></span><span class="line"><span class="ct-d1af39">      });</span></span><span class="line"><span class="ct-d1af39">    } </span><span class="ct-b084f5">catch</span><span class="ct-d1af39"> (</span><span class="ct-862b9b">addError</span><span class="ct-d1af39">) {</span></span><span class="line"><span class="ct-d1af39">      </span><span class="ct-5e418d">// handle &quot;add&quot; error</span></span><span class="line"><span class="ct-d1af39">    }</span></span><span class="line"><span class="ct-d1af39">  }</span></span><span class="line"><span class="ct-d1af39">  </span><span class="ct-5e418d">// handle other &quot;switch&quot; errors</span></span><span class="line"><span class="ct-d1af39">}</span></span></code></pre><!--]--></div><style>.ct-58cded{color:#79C0FF}.ct-34f27a{color:#C9D1D9}.ct-99e7a2{color:#79C0FF}.ct-ac6681{color:#A5D6FF}.ct-4196a1{color:#79C0FF}.ct-0c3276{color:#FFA657}.ct-930ba7{color:#FF7B72}.ct-832f93{color:#D2A8FF}.ct-dcdfaf{color:#C9D1D9}.ct-e18cdc{color:#FF7B72}.ct-b7644c{color:#D2A8FF}.ct-4f105d{color:#79C0FF}.ct-86f4ab{color:#FF7B72}.ct-5e418d{color:#8B949E}.ct-6bd6d4{color:#A5D6FF}.ct-862b9b{color:#C9D1D9}.ct-d1af39{color:#C9D1D9}.ct-b084f5{color:#FF7B72}.light .ct-b084f5{color:#859900}.light .ct-d1af39{color:#657B83}.light .ct-862b9b{color:#268BD2}.light .ct-6bd6d4{color:#2AA198}.light .ct-5e418d{color:#93A1A1}.light .ct-86f4ab{color:#073642}.light .ct-4f105d{color:#268BD2}.light .ct-b7644c{color:#268BD2}.light .ct-e18cdc{color:#073642}.light .ct-dcdfaf{color:#657B83}.light .ct-832f93{color:#268BD2}.light .ct-930ba7{color:#859900}.light .ct-0c3276{color:#657B83}.light .ct-4196a1{color:#859900}.light .ct-ac6681{color:#657B83}.light .ct-99e7a2{color:#859900}.light .ct-34f27a{color:#859900}.light .ct-58cded{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/blockchain/common-typescript-examples/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812496643}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseUl.7c14583d.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.f5f48b70.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/blockchain/common-typescript-examples" class="router-link-active _active_192pu_81 _link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Common Typescript Examples</h1><article><div><ul><!--[--><li><!--[-->Simple #dapp example for tests: <a href="https://metamask.github.io/test-dapp/" rel="nofollow" target="_blank"><!--[-->https://metamask.github.io/test-dapp/<!--]--></a><!--]--></li><li><!--[-->Interaction with smart contracts described in <a href="/blockchain/smart-contracts" class=""><!--[-->Smart contracts<!--]--></a><!--]--></li><!--]--></ul><h2 id="connecting-to-node"><a href="#connecting-to-node"><!--[-->Connecting to node<!--]--></a></h2><p><!--[-->If #Metamask extension installed, <code><!--[-->Web3.givenProvider<!--]--></code> is available in global window. You can use <a href="https://infura.io" rel="nofollow" target="_blank"><!--[-->Infura<!--]--></a> or your node instead:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8e8040">import</span><span class="ct-a39e24"> </span><span class="ct-4a3086">Web3</span><span class="ct-a39e24"> </span><span class="ct-8e8040">from</span><span class="ct-a39e24"> </span><span class="ct-df7cba">&#39;web3&#39;</span><span class="ct-a39e24">;</span></span><span class="line"></span><span class="line"><span class="ct-09d035">// URL of your node</span></span><span class="line"><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">PROVIDER_URL</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-df7cba">&#39;https://...&#39;</span><span class="ct-a39e24">;</span></span><span class="line"></span><span class="line"><span class="ct-8e8040">export</span><span class="ct-a39e24"> </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">web3</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-8e8040">new</span><span class="ct-a39e24"> </span><span class="ct-76c663">Web3</span><span class="ct-a39e24">(</span><span class="ct-4a3086">Web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">givenProvider</span><span class="ct-a39e24"> </span><span class="ct-8e8040">||</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">PROVIDER_URL</span><span class="ct-a39e24">);</span></span></code></pre><!--]--></div><h2 id="getting-wallet-balance"><a href="#getting-wallet-balance"><!--[-->Getting wallet balance<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-83b2aa">const</span><span class="ct-001a1d"> </span><span class="ct-619167">getBalance</span><span class="ct-001a1d"> </span><span class="ct-c88325">=</span><span class="ct-001a1d"> </span><span class="ct-83b2aa">async</span><span class="ct-001a1d"> (</span><span class="ct-388d87">address</span><span class="ct-c88325">:</span><span class="ct-001a1d"> </span><span class="ct-e5bd8a">string</span><span class="ct-001a1d">) </span><span class="ct-83b2aa">=&gt;</span><span class="ct-001a1d"> {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">return</span><span class="ct-a39e24"> </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">eth</span><span class="ct-a39e24">.</span><span class="ct-76c663">getBalance</span><span class="ct-a39e24">(</span><span class="ct-4a3086">address</span><span class="ct-a39e24">);</span></span><span class="line"><span class="ct-a39e24">}</span></span></code></pre><!--]--></div><h2 id="getting-wallet-address"><a href="#getting-wallet-address"><!--[-->Getting wallet address<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-09d035">// first we need to authorize</span></span><span class="line"><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-76c663">authorize</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-51348d">async</span><span class="ct-a39e24"> () </span><span class="ct-51348d">=&gt;</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">currentProvider</span><span class="ct-a39e24">.</span><span class="ct-76c663">request</span><span class="ct-a39e24">({ method: </span><span class="ct-df7cba">&#39;eth_requestAccounts&#39;</span><span class="ct-a39e24"> });</span></span><span class="line"><span class="ct-a39e24">}</span></span><span class="line"></span><span class="line"><span class="ct-09d035">// then we can get wallet address</span></span><span class="line"><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-76c663">getCurrentAddressUser</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> () </span><span class="ct-51348d">=&gt;</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">return</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">currentProvider</span><span class="ct-a39e24">.</span><span class="ct-4a3086">selectedAddress</span><span class="ct-a39e24">;</span></span><span class="line"><span class="ct-a39e24">}</span></span></code></pre><!--]--></div><h2 id="sending-transaction"><a href="#sending-transaction"><!--[-->Sending transaction<!--]--></a></h2><p><!--[-->Sending <code><!--[-->value<!--]--></code> tokens with <code><!--[-->memo<!--]--></code> as value:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"></span><span class="line"><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-76c663">transfer</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-51348d">async</span><span class="ct-a39e24"> ({ </span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-4a3086">from</span><span class="ct-a39e24">, </span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-4a3086">to</span><span class="ct-a39e24">, </span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-4a3086">value</span><span class="ct-a39e24">, </span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-4a3086">memo</span><span class="ct-a39e24">, </span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-4a3086">privateKey</span><span class="ct-a39e24">, </span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-4a3086">gasLimit</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span></span><span class="line"><span class="ct-a39e24">}) </span><span class="ct-51348d">=&gt;</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">nonce</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">eth</span><span class="ct-a39e24">.</span><span class="ct-76c663">getTransactionCount</span><span class="ct-a39e24">(</span><span class="ct-4a3086">from</span><span class="ct-a39e24">);</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">gasPrice</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">eth</span><span class="ct-a39e24">.</span><span class="ct-76c663">getGasPrice</span><span class="ct-a39e24">();</span></span><span class="line"><span class="ct-a39e24">    </span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">rawTx</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-4a3086">from</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-4a3086">to</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">      value: </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toHex</span><span class="ct-a39e24">(</span><span class="ct-4a3086">Web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toWei</span><span class="ct-a39e24">(</span><span class="ct-4a3086">value</span><span class="ct-a39e24">, </span><span class="ct-df7cba">&#39;ether&#39;</span><span class="ct-a39e24">)),</span></span><span class="line"><span class="ct-a39e24">      gasLimit: </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toHex</span><span class="ct-a39e24">(</span><span class="ct-4a3086">gasLimit</span><span class="ct-a39e24">),</span></span><span class="line"><span class="ct-a39e24">      gasPrice: </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toHex</span><span class="ct-a39e24">(</span><span class="ct-4a3086">gasPrice</span><span class="ct-a39e24">),</span></span><span class="line"><span class="ct-a39e24">      nonce: </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toHex</span><span class="ct-a39e24">(</span><span class="ct-4a3086">nonce</span><span class="ct-a39e24">),</span></span><span class="line"><span class="ct-a39e24">      data: </span><span class="ct-4a3086">memo</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">    };</span></span><span class="line"><span class="ct-a39e24">    </span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">privateKeyBuffer</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-4a3086">EthUtil</span><span class="ct-a39e24">.</span><span class="ct-76c663">toBuffer</span><span class="ct-a39e24">(</span><span class="ct-4a3086">privateKey</span><span class="ct-a39e24">);</span></span><span class="line"><span class="ct-a39e24">    </span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">tx</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-8e8040">new</span><span class="ct-a39e24"> </span><span class="ct-76c663">Transaction</span><span class="ct-a39e24">(</span><span class="ct-4a3086">rawTx</span><span class="ct-a39e24">);</span></span><span class="line"><span class="ct-a39e24">    </span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-4a3086">tx</span><span class="ct-a39e24">.</span><span class="ct-76c663">sign</span><span class="ct-a39e24">(</span><span class="ct-4a3086">privateKeyBuffer</span><span class="ct-a39e24">);</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">serializedTx</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-4a3086">tx</span><span class="ct-a39e24">.</span><span class="ct-76c663">serialize</span><span class="ct-a39e24">();</span></span><span class="line"><span class="ct-a39e24">    </span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">return</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">this</span><span class="ct-a39e24">.</span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">eth</span><span class="ct-a39e24">.</span><span class="ct-76c663">sendSignedTransaction</span><span class="ct-a39e24">(</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-df7cba">`0x${</span><span class="ct-4a3086">serializedTx</span><span class="ct-255b39">.</span><span class="ct-76c663">toString</span><span class="ct-255b39">(</span><span class="ct-df7cba">&#39;hex&#39;</span><span class="ct-255b39">)</span><span class="ct-df7cba">}`</span></span><span class="line"><span class="ct-a39e24">    );</span></span><span class="line"><span class="ct-a39e24">}</span></span></code></pre><!--]--></div><h2 id="estimating-transaction-fee"><a href="#estimating-transaction-fee"><!--[-->Estimating transaction FEE<!--]--></a></h2><p><!--[-->Useful to get fixed amount of tokens from user with pre-estimated fee.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8e8040">import</span><span class="ct-a39e24"> { </span><span class="ct-4a3086">web3</span><span class="ct-a39e24"> } </span><span class="ct-8e8040">from</span><span class="ct-a39e24"> </span><span class="ct-df7cba">&#39;.&#39;</span><span class="ct-a39e24">;</span></span><span class="line"></span><span class="line"><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-76c663">estimateFee</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-51348d">async</span><span class="ct-a39e24"> ({</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-4a3086">from</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-4a3086">to</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-4a3086">value</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-4a3086">memo</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">}) </span><span class="ct-51348d">=&gt;</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">gasPrice</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">eth</span><span class="ct-a39e24">.</span><span class="ct-76c663">getGasPrice</span><span class="ct-a39e24">();</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-a3bc7b">gasLimit</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">eth</span><span class="ct-a39e24">.</span><span class="ct-76c663">estimateGas</span><span class="ct-a39e24">({</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-4a3086">from</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-4a3086">to</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">      value: </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toHex</span><span class="ct-a39e24">(</span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">toWei</span><span class="ct-a39e24">(</span><span class="ct-4a3086">value</span><span class="ct-a39e24">, </span><span class="ct-df7cba">&#39;ether&#39;</span><span class="ct-a39e24">)),</span></span><span class="line"><span class="ct-a39e24">      data: </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">asciiToHex</span><span class="ct-a39e24">(</span><span class="ct-4a3086">memo</span><span class="ct-a39e24">),</span></span><span class="line"><span class="ct-a39e24">    }).</span><span class="ct-76c663">call</span><span class="ct-a39e24">();</span></span><span class="line"><span class="ct-a39e24">    </span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">return</span><span class="ct-a39e24"> </span><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">utils</span><span class="ct-a39e24">.</span><span class="ct-76c663">fromWei</span><span class="ct-a39e24">(</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-bba616">BigInt</span><span class="ct-a39e24">(</span><span class="ct-4a3086">gasPrice</span><span class="ct-a39e24">.</span><span class="ct-76c663">toString</span><span class="ct-a39e24">())</span></span><span class="line"><span class="ct-a39e24">        .</span><span class="ct-76c663">multiply</span><span class="ct-a39e24">(</span><span class="ct-bba616">BigInt</span><span class="ct-a39e24">(</span><span class="ct-4a3086">gasLimit</span><span class="ct-a39e24">.</span><span class="ct-76c663">toString</span><span class="ct-a39e24">()))</span></span><span class="line"><span class="ct-a39e24">        .</span><span class="ct-76c663">toString</span><span class="ct-a39e24">()</span></span><span class="line"><span class="ct-a39e24">    );</span></span><span class="line"><span class="ct-a39e24">}</span></span></code></pre><!--]--></div><h2 id="subscribing-to-wallet-address-change"><a href="#subscribing-to-wallet-address-change"><!--[-->Subscribing to wallet address change<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8e8040">import</span><span class="ct-a39e24"> { </span><span class="ct-4a3086">web3</span><span class="ct-a39e24"> } </span><span class="ct-8e8040">from</span><span class="ct-a39e24"> </span><span class="ct-df7cba">&#39;.&#39;</span><span class="ct-a39e24">;</span></span><span class="line"></span><span class="line"><span class="ct-4a3086">web3</span><span class="ct-a39e24">.</span><span class="ct-4a3086">currentProvider</span><span class="ct-a39e24">.</span><span class="ct-76c663">on</span><span class="ct-a39e24">(</span><span class="ct-df7cba">&#39;accountsChanged&#39;</span><span class="ct-a39e24">, </span><span class="ct-4a3086">callback</span><span class="ct-a39e24">);</span></span></code></pre><!--]--></div><h2 id="watching-network-change"><a href="#watching-network-change"><!--[-->Watching network change<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4a3086">ethereum</span><span class="ct-a39e24">.</span><span class="ct-76c663">on</span><span class="ct-a39e24">(</span><span class="ct-df7cba">&#39;chainChanged&#39;</span><span class="ct-a39e24">, </span><span class="ct-4a3086">handler</span><span class="ct-9c2fa8">:</span><span class="ct-a39e24"> </span></span></code></pre><!--]--></div><h2 id="adding-custom-token-to-wallet"><a href="#adding-custom-token-to-wallet"><!--[-->Adding custom token to wallet<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4a3086">window</span><span class="ct-a39e24">.</span><span class="ct-4a3086">ethereum</span></span><span class="line"><span class="ct-a39e24">  .</span><span class="ct-76c663">request</span><span class="ct-a39e24">({</span></span><span class="line"><span class="ct-a39e24">    method: </span><span class="ct-df7cba">&#39;wallet_watchAsset&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">    params: {</span></span><span class="line"><span class="ct-a39e24">      type: </span><span class="ct-df7cba">&#39;ERC20&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">      options: {</span></span><span class="line"><span class="ct-a39e24">        address: </span><span class="ct-df7cba">&#39;0xb60e8dd61c5d32be8058bb8eb970870f07233155&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">        symbol: </span><span class="ct-df7cba">&#39;FOO&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">        decimals: </span><span class="ct-b2d291">18</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">        image: </span><span class="ct-df7cba">&#39;https://foo.io/token-image.svg&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">      },</span></span><span class="line"><span class="ct-a39e24">    },</span></span><span class="line"><span class="ct-a39e24">  })</span></span><span class="line"><span class="ct-001a1d">  .</span><span class="ct-619167">then</span><span class="ct-001a1d">((</span><span class="ct-388d87">success</span><span class="ct-001a1d">) </span><span class="ct-83b2aa">=&gt;</span><span class="ct-001a1d"> {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">if</span><span class="ct-a39e24"> (</span><span class="ct-4a3086">success</span><span class="ct-a39e24">) {</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-4a3086">console</span><span class="ct-a39e24">.</span><span class="ct-76c663">log</span><span class="ct-a39e24">(</span><span class="ct-df7cba">&#39;FOO successfully added to wallet!&#39;</span><span class="ct-a39e24">)</span></span><span class="line"><span class="ct-a39e24">    } </span><span class="ct-8e8040">else</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-8e8040">throw</span><span class="ct-a39e24"> </span><span class="ct-8e8040">new</span><span class="ct-a39e24"> </span><span class="ct-bba616">Error</span><span class="ct-a39e24">(</span><span class="ct-df7cba">&#39;Something went wrong.&#39;</span><span class="ct-a39e24">)</span></span><span class="line"><span class="ct-a39e24">    }</span></span><span class="line"><span class="ct-a39e24">  })</span></span><span class="line"><span class="ct-a39e24">  .</span><span class="ct-76c663">catch</span><span class="ct-a39e24">(</span><span class="ct-4a3086">console</span><span class="ct-a39e24">.</span><span class="ct-4a3086">error</span><span class="ct-a39e24">)</span></span></code></pre><!--]--></div><h2 id="changing-network-to-custom"><a href="#changing-network-to-custom"><!--[-->Changing network to custom<!--]--></a></h2><p><!--[-->Checking current chainId:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-51348d">const</span><span class="ct-a39e24"> </span><span class="ct-76c663">getChainID</span><span class="ct-a39e24"> </span><span class="ct-8e8040">=</span><span class="ct-a39e24"> </span><span class="ct-51348d">async</span><span class="ct-a39e24"> () </span><span class="ct-51348d">=&gt;</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">return</span><span class="ct-a39e24"> </span><span class="ct-4a3086">ethereum</span><span class="ct-a39e24">.</span><span class="ct-76c663">request</span><span class="ct-a39e24">({ method: </span><span class="ct-df7cba">&#39;eth_chainId&#39;</span><span class="ct-a39e24"> })</span></span><span class="line"><span class="ct-a39e24">}</span></span></code></pre><!--]--></div><p><!--[-->Asking wallet to change current network:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8e8040">try</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">window</span><span class="ct-a39e24">.</span><span class="ct-4a3086">ethereum</span><span class="ct-a39e24">.</span><span class="ct-76c663">request</span><span class="ct-a39e24">({</span></span><span class="line"><span class="ct-a39e24">    method: </span><span class="ct-df7cba">&#39;wallet_switchEthereumChain&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">    params: [{ chainId: </span><span class="ct-df7cba">&#39;0x03&#39;</span><span class="ct-a39e24"> }], </span><span class="ct-09d035">// ropsten chainID (3) in hex</span></span><span class="line"><span class="ct-a39e24">  });</span></span><span class="line"><span class="ct-a39e24">} </span><span class="ct-8e8040">catch</span><span class="ct-a39e24"> (</span><span class="ct-4a3086">switchError</span><span class="ct-a39e24">) {</span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-09d035">// This error code indicates that the chain has not been added to MetaMask.</span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-8e8040">if</span><span class="ct-a39e24"> (</span><span class="ct-4a3086">error</span><span class="ct-a39e24">.</span><span class="ct-4a3086">code</span><span class="ct-a39e24"> </span><span class="ct-8e8040">===</span><span class="ct-a39e24"> </span><span class="ct-b2d291">4902</span><span class="ct-a39e24">) {</span></span><span class="line"><span class="ct-a39e24">    </span><span class="ct-8e8040">try</span><span class="ct-a39e24"> {</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-8e8040">await</span><span class="ct-a39e24"> </span><span class="ct-4a3086">window</span><span class="ct-a39e24">.</span><span class="ct-4a3086">ethereum</span><span class="ct-a39e24">.</span><span class="ct-76c663">request</span><span class="ct-a39e24">({</span></span><span class="line"><span class="ct-a39e24">        method: </span><span class="ct-df7cba">&#39;wallet_addEthereumChain&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">        params: [{ </span></span><span class="line"><span class="ct-a39e24">          chainId: </span><span class="ct-df7cba">&#39;0x03&#39;</span><span class="ct-a39e24">, </span><span class="ct-09d035">// ropsten chainID (3) in hex</span></span><span class="line"><span class="ct-a39e24">          chainName: </span><span class="ct-df7cba">&#39;Ropsten Test Network&#39;</span><span class="ct-a39e24">, </span></span><span class="line"><span class="ct-a39e24">          nativeCurrency: { </span></span><span class="line"><span class="ct-a39e24">              name: </span><span class="ct-df7cba">&#39;ETH&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">              symbol: </span><span class="ct-df7cba">&#39;ETH&#39;</span><span class="ct-a39e24">,</span></span><span class="line"><span class="ct-a39e24">              decimals: </span><span class="ct-b2d291">18</span></span><span class="line"><span class="ct-a39e24">          }, </span></span><span class="line"><span class="ct-a39e24">          rpcUrls: [</span><span class="ct-df7cba">&#39;https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161&#39;</span><span class="ct-a39e24">], </span></span><span class="line"><span class="ct-a39e24">          blockExplorerUrls: [</span><span class="ct-df7cba">&#39;https://ropsten.etherscan.io&#39;</span><span class="ct-a39e24">] </span></span><span class="line"><span class="ct-a39e24">        }] ,</span></span><span class="line"><span class="ct-a39e24">      });</span></span><span class="line"><span class="ct-a39e24">    } </span><span class="ct-8e8040">catch</span><span class="ct-a39e24"> (</span><span class="ct-4a3086">addError</span><span class="ct-a39e24">) {</span></span><span class="line"><span class="ct-a39e24">      </span><span class="ct-09d035">// handle &quot;add&quot; error</span></span><span class="line"><span class="ct-a39e24">    }</span></span><span class="line"><span class="ct-a39e24">  }</span></span><span class="line"><span class="ct-a39e24">  </span><span class="ct-09d035">// handle other &quot;switch&quot; errors</span></span><span class="line"><span class="ct-a39e24">}</span></span></code></pre><!--]--></div><style>.ct-b2d291{color:#79C0FF}.ct-9c2fa8{color:#C9D1D9}.ct-bba616{color:#79C0FF}.ct-255b39{color:#A5D6FF}.ct-e5bd8a{color:#79C0FF}.ct-388d87{color:#FFA657}.ct-c88325{color:#FF7B72}.ct-619167{color:#D2A8FF}.ct-001a1d{color:#C9D1D9}.ct-83b2aa{color:#FF7B72}.ct-76c663{color:#D2A8FF}.ct-a3bc7b{color:#79C0FF}.ct-51348d{color:#FF7B72}.ct-09d035{color:#8B949E}.ct-df7cba{color:#A5D6FF}.ct-4a3086{color:#C9D1D9}.ct-a39e24{color:#C9D1D9}.ct-8e8040{color:#FF7B72}.light .ct-8e8040{color:#859900}.light .ct-a39e24{color:#657B83}.light .ct-4a3086{color:#268BD2}.light .ct-df7cba{color:#2AA198}.light .ct-09d035{color:#93A1A1}.light .ct-51348d{color:#073642}.light .ct-a3bc7b{color:#268BD2}.light .ct-76c663{color:#268BD2}.light .ct-83b2aa{color:#073642}.light .ct-001a1d{color:#657B83}.light .ct-619167{color:#268BD2}.light .ct-c88325{color:#859900}.light .ct-388d87{color:#657B83}.light .ct-e5bd8a{color:#859900}.light .ct-255b39{color:#657B83}.light .ct-bba616{color:#859900}.light .ct-9c2fa8{color:#859900}.light .ct-b2d291{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/blockchain/common-typescript-examples/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813358969}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseUl.85dc1033.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.94808e98.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/blockchain/smart-contracts/_payload.js b/blockchain/smart-contracts/_payload.js
index d734d44..9bceb2e 100644
--- a/blockchain/smart-contracts/_payload.js
+++ b/blockchain/smart-contracts/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,cA,cB,cC,cD,cE,cF,cG,cH,cI,cJ,cK,cL,cM,cN,cO,cP,cQ,cR,cS,cT,cU,cV,cW,cX,cY,cZ,c_,c$,da,db){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:bI,_path:bJ}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-GyYuUyCYai":{_path:bJ,_dir:"blockchain",_draft:aF,_partial:aF,_locale:"en",_empty:aF,title:bI,description:"For common functions see Common typescript examples.",excerpt:{type:bK,children:[{type:a,tag:A,props:{},children:[{type:c,value:bL},{type:a,tag:_,props:{href:bM},children:[{type:c,value:bN}]},{type:c,value:i}]},{type:a,tag:$,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:A,props:{},children:[{type:c,value:bO}]},{type:a,tag:m,props:{code:aI,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aI}]}]}]},{type:a,tag:$,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:A,props:{},children:[{type:c,value:bP},{type:a,tag:G,props:{},children:[{type:c,value:bQ}]},{type:c,value:bR},{type:a,tag:G,props:{},children:[{type:c,value:bS}]},{type:c,value:bT},{type:a,tag:_,props:{href:bU,rel:[as]},children:[{type:c,value:bV}]},{type:c,value:bW}]},{type:a,tag:A,props:{},children:[{type:a,tag:G,props:{},children:[{type:c,value:bX}]},{type:c,value:bY},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:bZ},{type:a,tag:G,props:{},children:[{type:c,value:b_}]},{type:c,value:b$},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:ca}]},{type:a,tag:D,props:{id:aL},children:[{type:c,value:aM}]},{type:a,tag:m,props:{code:aN,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aN}]}]}]},{type:a,tag:D,props:{id:aO},children:[{type:c,value:aP}]},{type:a,tag:m,props:{code:aQ,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aQ}]}]}]},{type:a,tag:D,props:{id:aR},children:[{type:c,value:aS}]},{type:a,tag:A,props:{},children:[{type:c,value:cb}]},{type:a,tag:m,props:{code:aT,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aT}]}]}]},{type:a,tag:m,props:{code:aU,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aU}]}]}]},{type:a,tag:$,props:{id:aV},children:[{type:c,value:aW}]},{type:a,tag:A,props:{},children:[{type:c,value:cc}]},{type:a,tag:m,props:{code:aX,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aX}]}]}]},{type:a,tag:D,props:{id:aY},children:[{type:c,value:aZ}]},{type:a,tag:m,props:{code:a_,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:a_}]}]}]},{type:a,tag:D,props:{id:a$},children:[{type:c,value:ba}]},{type:a,tag:A,props:{},children:[{type:c,value:cd},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ce}]},{type:a,tag:m,props:{code:bb,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:bb}]}]}]},{type:a,tag:D,props:{id:bc},children:[{type:c,value:bd}]},{type:a,tag:A,props:{},children:[{type:c,value:cf}]},{type:a,tag:m,props:{code:be,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:be}]}]}]},{type:a,tag:D,props:{id:bf},children:[{type:c,value:bg}]},{type:a,tag:A,props:{},children:[{type:c,value:cg},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ch},{type:a,tag:_,props:{href:ci,rel:[as]},children:[{type:c,value:cj}]}]},{type:a,tag:m,props:{code:bh,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:bh}]}]}]}]},body:{type:bK,children:[{type:a,tag:A,props:{},children:[{type:c,value:bL},{type:a,tag:_,props:{href:bM},children:[{type:c,value:bN}]},{type:c,value:i}]},{type:a,tag:$,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:A,props:{},children:[{type:c,value:bO}]},{type:a,tag:m,props:{code:aI,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'web3-eth-contract'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:"abi"}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"object"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:ck}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cl},children:[{type:c,value:cm}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-b92caf"},children:[{type:c,value:"JSON"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:cl},children:[{type:c,value:"parse"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cn}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:$,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:A,props:{},children:[{type:c,value:bP},{type:a,tag:G,props:{},children:[{type:c,value:bQ}]},{type:c,value:bR},{type:a,tag:G,props:{},children:[{type:c,value:bS}]},{type:c,value:bT},{type:a,tag:_,props:{href:bU,rel:[as]},children:[{type:c,value:bV}]},{type:c,value:bW}]},{type:a,tag:A,props:{},children:[{type:a,tag:G,props:{},children:[{type:c,value:bX}]},{type:c,value:bY},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:bZ},{type:a,tag:G,props:{},children:[{type:c,value:b_}]},{type:c,value:b$},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:ca}]},{type:a,tag:D,props:{id:aL},children:[{type:c,value:aM}]},{type:a,tag:m,props:{code:aN,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:co}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F ABI of contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:cp}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cq}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F address for contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cr}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cs}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({}) "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:ct}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F Calling write method"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F authorizing with Metamask"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ method: "}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'eth_requestAccounts'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F getting wallet address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"selectedAddress"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F calling \"store\" store method for contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F payload should include `from` address, that matches"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F current user's wallet"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'Parameter'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"send"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      from: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cy}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F calling read method"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F this method can return data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"retrieve"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"}"}]}]}]}]}]},{type:a,tag:D,props:{id:aO},children:[{type:c,value:aP}]},{type:a,tag:m,props:{code:aQ,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:co}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F ABI контракта"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:cp}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cq}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F contract address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cr}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:ct}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F account's private key"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'...'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F write-methods requires private key"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:cs}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cA}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"number"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"privateKeyToAccount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      to: "}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      data: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"encodeABI"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gas: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateGas"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ from: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gasPrice: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getGasPrice"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"signTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sendSignedTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"rawTransaction"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]}]}]}]},{type:a,tag:D,props:{id:aR},children:[{type:c,value:aS}]},{type:a,tag:A,props:{},children:[{type:c,value:cb}]},{type:a,tag:m,props:{code:aT,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"requests"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cG}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cH}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"balanceOf"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cG}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cH}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getStaked"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bv}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  ]"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]}]}]}]},{type:a,tag:m,props:{code:aU,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"givenProvider"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"||"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"PROVIDER_URL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cI}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"any"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"[]) "}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getWeb3NoAccount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"BatchRequest"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"map"}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:cK}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cL}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cM}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"add"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cN}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cN}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cy}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"execute"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cK}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"all"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-379fe1"},children:[{type:c,value:"null"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cn}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:$,props:{id:aV},children:[{type:c,value:aW}]},{type:a,tag:A,props:{},children:[{type:c,value:cc}]},{type:a,tag:m,props:{code:aX,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'web3'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR_RPC_ENDPOINT_HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR ABI HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR CONTRACT ADDRESS HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]}]}]}]},{type:a,tag:D,props:{id:aY},children:[{type:c,value:aZ}]},{type:a,tag:m,props:{code:a_,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"referralProgramContract"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"RegisterUser"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:cQ},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:cR}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cS}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:ck}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"`| UserRegistered | events | ${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cS}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cU}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"boolean"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cV}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cW},children:[{type:c,value:"RegisterUserResponseInterface"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }) "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cY}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cY}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"`| ONCE | ${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  )"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:cQ},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:cR}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cZ}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cW},children:[{type:c,value:"ErrnoException"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c_}]}]}]}]}]},{type:a,tag:D,props:{id:a$},children:[{type:c,value:ba}]},{type:a,tag:A,props:{},children:[{type:c,value:cd},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ce}]},{type:a,tag:m,props:{code:bb,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        value: [],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:da}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:db}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"str"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]}]}]}]},{type:a,tag:D,props:{id:bc},children:[{type:c,value:bd}]},{type:a,tag:A,props:{},children:[{type:c,value:cf}]},{type:a,tag:m,props:{code:be,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    address: ["}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'address-1'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'address-2'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"],    "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002FOnly get events from specific addresses"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    topics: []                              "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002FWhat topics to subscribe to"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'logs'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cF}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c_}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:da}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:db}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"nr"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]}]}]}]},{type:a,tag:D,props:{id:bf},children:[{type:c,value:bg}]},{type:a,tag:A,props:{},children:[{type:c,value:cg},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ch},{type:a,tag:_,props:{href:ci,rel:[as]},children:[{type:c,value:cj}]}]},{type:a,tag:m,props:{code:bh,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002Fexample options(optional)"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F only get events where transfer value was 1000 or 1337"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        value: ["}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'1000'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'1337'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]    "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F number | \"earliest\" | \"pending\" | \"latest\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:",                  "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    toBlock: "}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'latest'"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getPastEvents"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'Transfer'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"then"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"results"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-f9ea63{color:#FFA657}.ct-52b2ad{color:#A5D6FF}.ct-379fe1{color:#79C0FF}.ct-c97e13{color:#79C0FF}.ct-5e5af7{color:#79C0FF}.ct-56c89d{color:#79C0FF}.ct-cd60fa{color:#FF7B72}.ct-4323f8{color:#8B949E}.ct-854fa3{color:#FFA657}.ct-afd0a6{color:#D2A8FF}.ct-b92caf{color:#79C0FF}.ct-6a4bf1{color:#79C0FF}.ct-11520d{color:#79C0FF}.ct-9561a5{color:#FFA657}.ct-0b1079{color:#FF7B72}.ct-56bd12{color:#D2A8FF}.ct-defe47{color:#C9D1D9}.ct-dade4d{color:#FF7B72}.ct-fa7691{color:#A5D6FF}.ct-b6261e{color:#C9D1D9}.ct-95ba07{color:#C9D1D9}.ct-70f244{color:#FF7B72}.light .ct-70f244{color:#859900}.light .ct-95ba07{color:#657B83}.light .ct-b6261e{color:#268BD2}.light .ct-fa7691{color:#2AA198}.light .ct-dade4d{color:#073642}.light .ct-defe47{color:#657B83}.light .ct-56bd12{color:#268BD2}.light .ct-0b1079{color:#859900}.light .ct-9561a5{color:#657B83}.light .ct-11520d{color:#859900}.light .ct-6a4bf1{color:#268BD2}.light .ct-b92caf{color:#657B83}.light .ct-afd0a6{color:#268BD2}.light .ct-854fa3{color:#657B83}.light .ct-4323f8{color:#93A1A1}.light .ct-cd60fa{color:#073642}.light .ct-56c89d{color:#268BD2}.light .ct-5e5af7{color:#D33682}.light .ct-c97e13{color:#859900}.light .ct-379fe1{color:#B58900}.light .ct-52b2ad{color:#2AA198}.light .ct-f9ea63{color:#268BD2}"}]}],toc:{title:v,searchDepth:ar,depth:ar,links:[{id:aG,depth:ar,text:aH},{id:aJ,depth:ar,text:aK,children:[{id:aL,depth:Z,text:aM},{id:aO,depth:Z,text:aP},{id:aR,depth:Z,text:aS}]},{id:aV,depth:ar,text:aW,children:[{id:aY,depth:Z,text:aZ},{id:a$,depth:Z,text:ba},{id:bc,depth:Z,text:bd},{id:bf,depth:Z,text:bg}]}]}},_type:"markdown",_id:"content:Blockchain:Smart contracts.md",_source:"content",_file:"Blockchain\u002FSmart contracts.md",_extension:"md"}},prerenderedAt:1667812496952}}("element","span","text","ct-95ba07","line"," ","ct-b6261e","ct-70f244",".","ct-defe47","ct-afd0a6","(","code","ct-cd60fa","ct-fa7691","=","ct-56c89d","const","  ","    ","ct-4323f8","","typescript","pre"," {",");","p",";","ct-0b1079","h3",", ","=\u003E","strong","web3","ct-dade4d","log"," (","ct-9561a5","on",":"," { ","new","await","options","      ","console","ct-11520d","CONTRACT_ADDRESS","contract",",","))",3,"a","h2","getContract","e","        ","event","    .","Transfer","import"," } ","from","ct-56bd12",")","return","eth","catch",") {","Web3","subscription",2,"nofollow","gas","code-inline","ct-854fa3","CONTRACT_ABI","try","ct-5e5af7","0","();",") ","err","  .","let",false,"getting-smart-contract-instance","Getting smart contract instance","import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract =\u003E {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","executing-contract-method","Executing contract method","example-for-metamask-without-private-key","Example for #Metamask without private key","\u002F\u002F see example below\nimport { getContract } from '.';\n\n\u002F\u002F ABI of contract\nconst CONTRACT_ABI = { \u002F* ... *\u002F };\n \u002F\u002F address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) =\u003E {\n  \u002F\u002F getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  \u002F\u002F Calling write method\n  try {\n    \u002F\u002F authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    \u002F\u002F getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    \u002F\u002F calling \"store\" store method for contract\n    \u002F\u002F payload should include `from` address, that matches\n    \u002F\u002F current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  \u002F\u002F calling read method\n  try {\n    \u002F\u002F this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","nodejs-and-react-native-example","Node.js and React Native example","\u002F\u002F see example below\nimport { getContract } from '.';\n\n\u002F\u002F ABI контракта\nconst CONTRACT_ABI = { \u002F* ... *\u002F };\n\u002F\u002F contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\u002F\u002F getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n\u002F\u002F account's private key\nconst privateKey = '...';\n\n\u002F\u002F write-methods requires private key\nconst executeContractMethod = async (val: number) =\u003E {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","calling-a-batch-of-contracts-methods","Calling a batch of contract's methods","  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) =\u003E {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) =\u003E {\n      return new Promise((resolve, reject) =\u003E {\n        batch.add(\n          call.request({}, (err, result) =\u003E {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","subscribing-to-smart-contract-events","Subscribing to smart contract events","  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","by-accessing-contractevents","By accessing contract.events","referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) =\u003E {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) =\u003E {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) =\u003E {\n    console.log(error);\n  });\n","with-filtering","With filtering","  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event =\u003E console.log(event))\n    .on('changed', changed =\u003E console.log(changed))\n    .on('error', err =\u003E throw err)\n    .on('connected', str =\u003E console.log(str))\n","common-subscribe-method","Common Subscribe method","  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    \u002F\u002FOnly get events from specific addresses\n    topics: []                              \u002F\u002FWhat topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) =\u003E {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event =\u003E console.log(event))\n  subscription.on('changed', changed =\u003E console.log(changed))\n  subscription.on('error', err =\u003E { throw err })\n  subscription.on('connected', nr =\u003E console.log(nr))\n","getting-event-history","Getting event history","  \u002F\u002Fexample options(optional)\n  let options = {\n    filter: {\n        \u002F\u002F only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    \u002F\u002F number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results =\u003E console.log(results))\n    .catch(err =\u003E throw err);\n\n","Contract","'.'","address","};","export","async","methods","  } ","throw","ct-c97e13","  }","result","().","call","privateKey","transaction","makeBatchRequest","batch","if","myContract","'connected'","'data'","    },","'error'","    fromBlock: ","  };","Smart Contracts","\u002Fblockchain\u002Fsmart-contracts","root","For common functions see ","Common%20typescript%20examples","Common typescript examples","Useful for calling smart contract methods:","Contract has ","read"," and ","write"," methods. To get a list of methods, you can paste contract address on  ","https:\u002F\u002Fetherscan.io\u002Ftoken\u002F0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","https:\u002F\u002Fetherscan.io\u002F ETH"," or any other service.","Read"," methods doesn't require spending ",". ","Write"," methods cost some amount of ",", hence they will be executed with confirmation from user.","Function calls batch of requests, returning array of results. For example:","There're different ways to subscribe for contract events. For all of them you will need following variables:","We're listening to "," event here:","Filtering options can also be specified:","Getting history for "," events for specific values. More info can be found ","https:\u002F\u002Fweb3js.readthedocs.io\u002Fen\u002Fv1.2.11\u002Fweb3-eth-subscribe.html#","here","string","ct-6a4bf1","abiFromJson","default","\u002F\u002F see example below","\u002F* ... *\u002F"," };","'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'","executeContractMethod","\u002F\u002F getting contract","currentProvider","request","addressUser","store","    });","Error","val","account","accounts","(),","signed","!","   ","method","calls","promises","Promise","resolve","reject","              ","ABI","events","ct-52b2ad",", (","subscriptionId","}`","removed","returnValues","ct-f9ea63","user","referrer","error","  });","    filter: {","'changed'","changed"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,cA,cB,cC,cD,cE,cF,cG,cH,cI,cJ,cK,cL,cM,cN,cO,cP,cQ,cR,cS,cT,cU,cV,cW,cX,cY,cZ,c_,c$,da,db){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:bI,_path:bJ}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-GyYuUyCYai":{_path:bJ,_dir:"blockchain",_draft:aF,_partial:aF,_locale:"en",_empty:aF,title:bI,description:"For common functions see Common typescript examples.",excerpt:{type:bK,children:[{type:a,tag:A,props:{},children:[{type:c,value:bL},{type:a,tag:_,props:{href:bM},children:[{type:c,value:bN}]},{type:c,value:i}]},{type:a,tag:$,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:A,props:{},children:[{type:c,value:bO}]},{type:a,tag:m,props:{code:aI,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aI}]}]}]},{type:a,tag:$,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:A,props:{},children:[{type:c,value:bP},{type:a,tag:G,props:{},children:[{type:c,value:bQ}]},{type:c,value:bR},{type:a,tag:G,props:{},children:[{type:c,value:bS}]},{type:c,value:bT},{type:a,tag:_,props:{href:bU,rel:[as]},children:[{type:c,value:bV}]},{type:c,value:bW}]},{type:a,tag:A,props:{},children:[{type:a,tag:G,props:{},children:[{type:c,value:bX}]},{type:c,value:bY},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:bZ},{type:a,tag:G,props:{},children:[{type:c,value:b_}]},{type:c,value:b$},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:ca}]},{type:a,tag:D,props:{id:aL},children:[{type:c,value:aM}]},{type:a,tag:m,props:{code:aN,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aN}]}]}]},{type:a,tag:D,props:{id:aO},children:[{type:c,value:aP}]},{type:a,tag:m,props:{code:aQ,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aQ}]}]}]},{type:a,tag:D,props:{id:aR},children:[{type:c,value:aS}]},{type:a,tag:A,props:{},children:[{type:c,value:cb}]},{type:a,tag:m,props:{code:aT,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aT}]}]}]},{type:a,tag:m,props:{code:aU,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aU}]}]}]},{type:a,tag:$,props:{id:aV},children:[{type:c,value:aW}]},{type:a,tag:A,props:{},children:[{type:c,value:cc}]},{type:a,tag:m,props:{code:aX,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aX}]}]}]},{type:a,tag:D,props:{id:aY},children:[{type:c,value:aZ}]},{type:a,tag:m,props:{code:a_,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:a_}]}]}]},{type:a,tag:D,props:{id:a$},children:[{type:c,value:ba}]},{type:a,tag:A,props:{},children:[{type:c,value:cd},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ce}]},{type:a,tag:m,props:{code:bb,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:bb}]}]}]},{type:a,tag:D,props:{id:bc},children:[{type:c,value:bd}]},{type:a,tag:A,props:{},children:[{type:c,value:cf}]},{type:a,tag:m,props:{code:be,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:be}]}]}]},{type:a,tag:D,props:{id:bf},children:[{type:c,value:bg}]},{type:a,tag:A,props:{},children:[{type:c,value:cg},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ch},{type:a,tag:_,props:{href:ci,rel:[as]},children:[{type:c,value:cj}]}]},{type:a,tag:m,props:{code:bh,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:bh}]}]}]}]},body:{type:bK,children:[{type:a,tag:A,props:{},children:[{type:c,value:bL},{type:a,tag:_,props:{href:bM},children:[{type:c,value:bN}]},{type:c,value:i}]},{type:a,tag:$,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:A,props:{},children:[{type:c,value:bO}]},{type:a,tag:m,props:{code:aI,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'web3-eth-contract'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:"abi"}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"object"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:ck}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cl},children:[{type:c,value:cm}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-9a0108"},children:[{type:c,value:"JSON"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:cl},children:[{type:c,value:"parse"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cn}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:$,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:A,props:{},children:[{type:c,value:bP},{type:a,tag:G,props:{},children:[{type:c,value:bQ}]},{type:c,value:bR},{type:a,tag:G,props:{},children:[{type:c,value:bS}]},{type:c,value:bT},{type:a,tag:_,props:{href:bU,rel:[as]},children:[{type:c,value:bV}]},{type:c,value:bW}]},{type:a,tag:A,props:{},children:[{type:a,tag:G,props:{},children:[{type:c,value:bX}]},{type:c,value:bY},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:bZ},{type:a,tag:G,props:{},children:[{type:c,value:b_}]},{type:c,value:b$},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:ca}]},{type:a,tag:D,props:{id:aL},children:[{type:c,value:aM}]},{type:a,tag:m,props:{code:aN,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:co}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F ABI of contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:cp}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cq}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F address for contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cr}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cs}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({}) "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:ct}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F Calling write method"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F authorizing with Metamask"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ method: "}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'eth_requestAccounts'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F getting wallet address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"selectedAddress"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F calling \"store\" store method for contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F payload should include `from` address, that matches"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F current user's wallet"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'Parameter'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"send"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      from: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cy}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F calling read method"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F this method can return data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"retrieve"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"}"}]}]}]}]}]},{type:a,tag:D,props:{id:aO},children:[{type:c,value:aP}]},{type:a,tag:m,props:{code:aQ,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:co}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F ABI контракта"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:cp}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cq}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F contract address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cr}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:ct}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F account's private key"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'...'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F write-methods requires private key"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:cs}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cA}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"number"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"privateKeyToAccount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      to: "}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      data: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"encodeABI"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gas: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateGas"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ from: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      gasPrice: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getGasPrice"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"signTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sendSignedTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"rawTransaction"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]}]}]}]},{type:a,tag:D,props:{id:aR},children:[{type:c,value:aS}]},{type:a,tag:A,props:{},children:[{type:c,value:cb}]},{type:a,tag:m,props:{code:aT,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"requests"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cG}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cH}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"balanceOf"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cG}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cH}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getStaked"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bv}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  ]"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]}]}]}]},{type:a,tag:m,props:{code:aU,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"givenProvider"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"||"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"PROVIDER_URL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cI}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"any"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"[]) "}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getWeb3NoAccount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"BatchRequest"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"map"}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:cK}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cL}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cM}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"add"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cN}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cN}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cy}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"execute"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cK}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"all"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-f4eb4f"},children:[{type:c,value:"null"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cn}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:$,props:{id:aV},children:[{type:c,value:aW}]},{type:a,tag:A,props:{},children:[{type:c,value:cc}]},{type:a,tag:m,props:{code:aX,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'web3'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR_RPC_ENDPOINT_HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR ABI HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR CONTRACT ADDRESS HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]}]}]}]},{type:a,tag:D,props:{id:aY},children:[{type:c,value:aZ}]},{type:a,tag:m,props:{code:a_,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"referralProgramContract"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"RegisterUser"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:cQ},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:cR}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cS}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:ck}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"`| UserRegistered | events | ${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cS}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cU}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"boolean"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cV}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cW},children:[{type:c,value:"RegisterUserResponseInterface"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }) "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cY}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cY}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"`| ONCE | ${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  )"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:cQ},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:cR}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cZ}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cW},children:[{type:c,value:"ErrnoException"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c_}]}]}]}]}]},{type:a,tag:D,props:{id:a$},children:[{type:c,value:ba}]},{type:a,tag:A,props:{},children:[{type:c,value:cd},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ce}]},{type:a,tag:m,props:{code:bb,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        value: [],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:da}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:db}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"str"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]}]}]}]},{type:a,tag:D,props:{id:bc},children:[{type:c,value:bd}]},{type:a,tag:A,props:{},children:[{type:c,value:cf}]},{type:a,tag:m,props:{code:be,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    address: ["}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'address-1'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'address-2'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"],    "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002FOnly get events from specific addresses"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    topics: []                              "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002FWhat topics to subscribe to"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'logs'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cF}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c_}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:da}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:db}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"nr"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]}]}]}]},{type:a,tag:D,props:{id:bf},children:[{type:c,value:bg}]},{type:a,tag:A,props:{},children:[{type:c,value:cg},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ch},{type:a,tag:_,props:{href:ci,rel:[as]},children:[{type:c,value:cj}]}]},{type:a,tag:m,props:{code:bh,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002Fexample options(optional)"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F only get events where transfer value was 1000 or 1337"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        value: ["}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'1000'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'1337'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]    "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F number | \"earliest\" | \"pending\" | \"latest\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:",                  "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    toBlock: "}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'latest'"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getPastEvents"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'Transfer'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"then"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"results"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-0b7056{color:#FFA657}.ct-88fe7c{color:#A5D6FF}.ct-f4eb4f{color:#79C0FF}.ct-6be8ce{color:#79C0FF}.ct-5d0b1c{color:#79C0FF}.ct-3a4cb4{color:#79C0FF}.ct-050e10{color:#FF7B72}.ct-5fbbf4{color:#8B949E}.ct-792f31{color:#FFA657}.ct-1b2dd4{color:#D2A8FF}.ct-9a0108{color:#79C0FF}.ct-a88101{color:#79C0FF}.ct-19af27{color:#79C0FF}.ct-4104ed{color:#FFA657}.ct-db30a0{color:#FF7B72}.ct-12b01c{color:#D2A8FF}.ct-c2cf18{color:#C9D1D9}.ct-bbc798{color:#FF7B72}.ct-79e8f5{color:#A5D6FF}.ct-f50cca{color:#C9D1D9}.ct-241f90{color:#C9D1D9}.ct-903217{color:#FF7B72}.light .ct-903217{color:#859900}.light .ct-241f90{color:#657B83}.light .ct-f50cca{color:#268BD2}.light .ct-79e8f5{color:#2AA198}.light .ct-bbc798{color:#073642}.light .ct-c2cf18{color:#657B83}.light .ct-12b01c{color:#268BD2}.light .ct-db30a0{color:#859900}.light .ct-4104ed{color:#657B83}.light .ct-19af27{color:#859900}.light .ct-a88101{color:#268BD2}.light .ct-9a0108{color:#657B83}.light .ct-1b2dd4{color:#268BD2}.light .ct-792f31{color:#657B83}.light .ct-5fbbf4{color:#93A1A1}.light .ct-050e10{color:#073642}.light .ct-3a4cb4{color:#268BD2}.light .ct-5d0b1c{color:#D33682}.light .ct-6be8ce{color:#859900}.light .ct-f4eb4f{color:#B58900}.light .ct-88fe7c{color:#2AA198}.light .ct-0b7056{color:#268BD2}"}]}],toc:{title:v,searchDepth:ar,depth:ar,links:[{id:aG,depth:ar,text:aH},{id:aJ,depth:ar,text:aK,children:[{id:aL,depth:Z,text:aM},{id:aO,depth:Z,text:aP},{id:aR,depth:Z,text:aS}]},{id:aV,depth:ar,text:aW,children:[{id:aY,depth:Z,text:aZ},{id:a$,depth:Z,text:ba},{id:bc,depth:Z,text:bd},{id:bf,depth:Z,text:bg}]}]}},_type:"markdown",_id:"content:Blockchain:Smart contracts.md",_source:"content",_file:"Blockchain\u002FSmart contracts.md",_extension:"md"}},prerenderedAt:1667813359262}}("element","span","text","ct-241f90","line"," ","ct-f50cca","ct-903217",".","ct-c2cf18","ct-1b2dd4","(","code","ct-050e10","ct-79e8f5","=","ct-3a4cb4","const","  ","    ","ct-5fbbf4","","typescript","pre"," {",");","p",";","ct-db30a0","h3",", ","=\u003E","strong","web3","ct-bbc798","log"," (","ct-4104ed","on",":"," { ","new","await","options","      ","console","ct-19af27","CONTRACT_ADDRESS","contract",",","))",3,"a","h2","getContract","e","        ","event","    .","Transfer","import"," } ","from","ct-12b01c",")","return","eth","catch",") {","Web3","subscription",2,"nofollow","gas","code-inline","ct-792f31","CONTRACT_ABI","try","ct-5d0b1c","0","();",") ","err","  .","let",false,"getting-smart-contract-instance","Getting smart contract instance","import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract =\u003E {\n  const abiFromJson = JSON.parse(JSON.stringify(abi));\n  return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","executing-contract-method","Executing contract method","example-for-metamask-without-private-key","Example for #Metamask without private key","\u002F\u002F see example below\nimport { getContract } from '.';\n\n\u002F\u002F ABI of contract\nconst CONTRACT_ABI = { \u002F* ... *\u002F };\n \u002F\u002F address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) =\u003E {\n  \u002F\u002F getting contract\n  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n  \n  \u002F\u002F Calling write method\n  try {\n    \u002F\u002F authorizing with Metamask\n    await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n    \u002F\u002F getting wallet address\n    const addressUser = web3.currentProvider.selectedAddress;\n    \u002F\u002F calling \"store\" store method for contract\n    \u002F\u002F payload should include `from` address, that matches\n    \u002F\u002F current user's wallet\n    await contract.methods.store(0, 'Parameter').send({\n      from: addressUser,\n    });\n  } catch (e) {\n    throw new Error(e);\n  }\n  \n  \u002F\u002F calling read method\n  try {\n    \u002F\u002F this method can return data\n    const result = await contract.methods.retrieve().call();\n  } catch (e) {\n    throw new Error(e);\n  }\n}\n","nodejs-and-react-native-example","Node.js and React Native example","\u002F\u002F see example below\nimport { getContract } from '.';\n\n\u002F\u002F ABI контракта\nconst CONTRACT_ABI = { \u002F* ... *\u002F };\n\u002F\u002F contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\u002F\u002F getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n\u002F\u002F account's private key\nconst privateKey = '...';\n\n\u002F\u002F write-methods requires private key\nconst executeContractMethod = async (val: number) =\u003E {\n    const transaction = contract.methods.store(val);\n    const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n    const options = {\n      to: CONTRACT_ADDRESS,\n      data: transaction.encodeABI(),\n      gas: await transaction.estimateGas({ from: account.address }),\n      gasPrice: await web3.eth.getGasPrice(),\n    };\n    const signed = await web3.eth.accounts.signTransaction(\n      options,\n      privateKey,\n    );\n    await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","calling-a-batch-of-contracts-methods","Calling a batch of contract's methods","  const requests = [\n   contract.method.balanceOf().call,\n   contract.method.getStaked().call\n  ]\n\n  const result = await makeBatchRequest(request);\n","const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) =\u003E {\n  try {\n    const web3 = getWeb3NoAccount();\n    const batch = new web3.BatchRequest();\n\n    const promises = calls.map((call) =\u003E {\n      return new Promise((resolve, reject) =\u003E {\n        batch.add(\n          call.request({}, (err, result) =\u003E {\n            if (err) {\n              reject(err);\n            } else {\n              resolve(result);\n            }\n          })\n        );\n      });\n    });\n\n    batch.execute();\n\n    return Promise.all(promises);\n  } catch {\n    return null;\n  }\n};\n\nexport default makeBatchRequest;\n","subscribing-to-smart-contract-events","Subscribing to smart contract events","  import Web3 from 'web3';\n  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n  const ABI = 'YOUR ABI HERE';\n  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","by-accessing-contractevents","By accessing contract.events","referralProgramContract.events\n  .RegisterUser()\n  .on('connected', (subscriptionId: string) =\u003E {\n    console.log(`| UserRegistered | events | ${subscriptionId}`);\n  })\n  .on(\n    'data',\n    async (event: {\n      removed: boolean;\n      returnValues: RegisterUserResponseInterface;\n    }) =\u003E {\n      try {\n        if (event.removed) {\n          return;\n        }\n        const { user, referrer } = event.returnValues;\n        console.log(user, referrer);\n      } catch (e) {\n        console.log(`| ONCE | ${e}`);\n      }\n    },\n  )\n  .on('error', (error: ErrnoException) =\u003E {\n    console.log(error);\n  });\n","with-filtering","With filtering","  let options = {\n    filter: {\n        value: [],\n    },\n    fromBlock: 0\n  };\n\n  myContract.events.Transfer(options)\n    .on('data', event =\u003E console.log(event))\n    .on('changed', changed =\u003E console.log(changed))\n    .on('error', err =\u003E throw err)\n    .on('connected', str =\u003E console.log(str))\n","common-subscribe-method","Common Subscribe method","  let options = {\n    fromBlock: 0,\n    address: ['address-1', 'address-2'],    \u002F\u002FOnly get events from specific addresses\n    topics: []                              \u002F\u002FWhat topics to subscribe to\n  };\n\n  let subscription = ('logs', options, (err,event) =\u003E {\n      if (!err)\n      console.log(event)\n  });\n\n  subscription.on('data', event =\u003E console.log(event))\n  subscription.on('changed', changed =\u003E console.log(changed))\n  subscription.on('error', err =\u003E { throw err })\n  subscription.on('connected', nr =\u003E console.log(nr))\n","getting-event-history","Getting event history","  \u002F\u002Fexample options(optional)\n  let options = {\n    filter: {\n        \u002F\u002F only get events where transfer value was 1000 or 1337\n        value: ['1000', '1337']    \n    },\n    \u002F\u002F number | \"earliest\" | \"pending\" | \"latest\"\n    fromBlock: 0,                  \n    toBlock: 'latest'\n  };\n\n  myContract.getPastEvents('Transfer', options)\n    .then(results =\u003E console.log(results))\n    .catch(err =\u003E throw err);\n\n","Contract","'.'","address","};","export","async","methods","  } ","throw","ct-6be8ce","  }","result","().","call","privateKey","transaction","makeBatchRequest","batch","if","myContract","'connected'","'data'","    },","'error'","    fromBlock: ","  };","Smart Contracts","\u002Fblockchain\u002Fsmart-contracts","root","For common functions see ","Common%20typescript%20examples","Common typescript examples","Useful for calling smart contract methods:","Contract has ","read"," and ","write"," methods. To get a list of methods, you can paste contract address on  ","https:\u002F\u002Fetherscan.io\u002Ftoken\u002F0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","https:\u002F\u002Fetherscan.io\u002F ETH"," or any other service.","Read"," methods doesn't require spending ",". ","Write"," methods cost some amount of ",", hence they will be executed with confirmation from user.","Function calls batch of requests, returning array of results. For example:","There're different ways to subscribe for contract events. For all of them you will need following variables:","We're listening to "," event here:","Filtering options can also be specified:","Getting history for "," events for specific values. More info can be found ","https:\u002F\u002Fweb3js.readthedocs.io\u002Fen\u002Fv1.2.11\u002Fweb3-eth-subscribe.html#","here","string","ct-a88101","abiFromJson","default","\u002F\u002F see example below","\u002F* ... *\u002F"," };","'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'","executeContractMethod","\u002F\u002F getting contract","currentProvider","request","addressUser","store","    });","Error","val","account","accounts","(),","signed","!","   ","method","calls","promises","Promise","resolve","reject","              ","ABI","events","ct-88fe7c",", (","subscriptionId","}`","removed","returnValues","ct-0b7056","user","referrer","error","  });","    filter: {","'changed'","changed"))
\ No newline at end of file
diff --git a/blockchain/smart-contracts/index.html b/blockchain/smart-contracts/index.html
index 88b0951..34f8b6f 100644
--- a/blockchain/smart-contracts/index.html
+++ b/blockchain/smart-contracts/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Smart Contracts • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="For common functions see Common typescript examples."><meta name="head:count" content="3"><link rel="modulepreload" href="/blockchain/smart-contracts/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseStrong.f3ca6279.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.ed0e0070.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Smart Contracts • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="For common functions see Common typescript examples."><meta name="head:count" content="3"><link rel="modulepreload" href="/blockchain/smart-contracts/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseStrong.e221982f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.af0f4af9.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a aria-current="page" href="/blockchain/smart-contracts" class="router-link-active _active_192pu_81 _link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Smart Contracts</h1><article><div><p><!--[-->For common functions see <a href="/blockchain/common-typescript-examples" class=""><!--[-->Common typescript examples<!--]--></a>.<!--]--></p><h2 id="getting-smart-contract-instance"><a href="#getting-smart-contract-instance"><!--[-->Getting smart contract instance<!--]--></a></h2><p><!--[-->Useful for calling smart contract methods:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-70f244">import</span><span class="ct-95ba07"> { </span><span class="ct-b6261e">Contract</span><span class="ct-95ba07"> } </span><span class="ct-70f244">from</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;web3-eth-contract&#39;</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-70f244">import</span><span class="ct-95ba07"> { </span><span class="ct-b6261e">web3</span><span class="ct-95ba07"> } </span><span class="ct-70f244">from</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;.&#39;</span><span class="ct-95ba07">;</span></span><span class="line"></span><span class="line"><span class="ct-dade4d">const</span><span class="ct-defe47"> </span><span class="ct-56bd12">getContract</span><span class="ct-defe47"> </span><span class="ct-0b1079">=</span><span class="ct-defe47"> (</span><span class="ct-9561a5">abi</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-11520d">object</span><span class="ct-defe47">, </span><span class="ct-9561a5">address</span><span class="ct-0b1079">?:</span><span class="ct-defe47"> </span><span class="ct-11520d">string</span><span class="ct-defe47">)</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-dade4d">=&gt;</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-defe47">  </span><span class="ct-dade4d">const</span><span class="ct-defe47"> </span><span class="ct-6a4bf1">abiFromJson</span><span class="ct-defe47"> </span><span class="ct-0b1079">=</span><span class="ct-defe47"> </span><span class="ct-b92caf">JSON</span><span class="ct-defe47">.</span><span class="ct-6a4bf1">parse</span><span class="ct-defe47">(</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-70f244">return</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">eth</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">Contract</span><span class="ct-95ba07">(</span><span class="ct-b6261e">abiFromJson</span><span class="ct-95ba07">, </span><span class="ct-b6261e">address</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">};</span></span><span class="line"></span><span class="line"><span class="ct-70f244">export</span><span class="ct-854fa3"> </span><span class="ct-70f244">default</span><span class="ct-854fa3"> </span><span class="ct-b6261e">getContract</span><span class="ct-95ba07">;</span></span></code></pre><!--]--></div><h2 id="executing-contract-method"><a href="#executing-contract-method"><!--[-->Executing contract method<!--]--></a></h2><p><!--[-->Contract has <strong><!--[-->read<!--]--></strong> and <strong><!--[-->write<!--]--></strong> methods. To get a list of methods, you can paste contract address on  <a href="https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract" rel="nofollow" target="_blank"><!--[-->https://etherscan.io/ ETH<!--]--></a> or any other service.<!--]--></p><p><!--[--><strong><!--[-->Read<!--]--></strong> methods doesn&#39;t require spending <strong><!--[-->gas<!--]--></strong>. <strong><!--[-->Write<!--]--></strong> methods cost some amount of <strong><!--[-->gas<!--]--></strong>, hence they will be executed with confirmation from user.<!--]--></p><h3 id="example-for-metamask-without-private-key"><a href="#example-for-metamask-without-private-key"><!--[-->Example for #Metamask without private key<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4323f8">// see example below</span></span><span class="line"><span class="ct-70f244">import</span><span class="ct-95ba07"> { </span><span class="ct-b6261e">getContract</span><span class="ct-95ba07"> } </span><span class="ct-70f244">from</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;.&#39;</span><span class="ct-95ba07">;</span></span><span class="line"></span><span class="line"><span class="ct-4323f8">// ABI of contract</span></span><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">CONTRACT_ABI</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> { </span><span class="ct-4323f8">/* ... */</span><span class="ct-95ba07"> };</span></span><span class="line"><span class="ct-95ba07"> </span><span class="ct-4323f8">// address for contract</span></span><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;0xdea164f67df4dbfe675d5271c9d404e0260f33bb&#39;</span><span class="ct-95ba07">;</span></span><span class="line"></span><span class="line"><span class="ct-70f244">export</span><span class="ct-95ba07"> </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">executeContractMethod</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-cd60fa">async</span><span class="ct-95ba07"> ({}) </span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-4323f8">// getting contract</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">contract</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">getContract</span><span class="ct-95ba07">(</span><span class="ct-56c89d">CONTRACT_ABI</span><span class="ct-95ba07">, </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  </span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-4323f8">// Calling write method</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-70f244">try</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// authorizing with Metamask</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">currentProvider</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">request</span><span class="ct-95ba07">({ method: </span><span class="ct-fa7691">&#39;eth_requestAccounts&#39;</span><span class="ct-95ba07"> });</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// getting wallet address</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">addressUser</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">currentProvider</span><span class="ct-95ba07">.</span><span class="ct-b6261e">selectedAddress</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// calling &quot;store&quot; store method for contract</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// payload should include `from` address, that matches</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// current user&#39;s wallet</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">contract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">methods</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">store</span><span class="ct-95ba07">(</span><span class="ct-5e5af7">0</span><span class="ct-95ba07">, </span><span class="ct-fa7691">&#39;Parameter&#39;</span><span class="ct-95ba07">).</span><span class="ct-afd0a6">send</span><span class="ct-95ba07">({</span></span><span class="line"><span class="ct-95ba07">      from: </span><span class="ct-b6261e">addressUser</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-95ba07">    });</span></span><span class="line"><span class="ct-95ba07">  } </span><span class="ct-70f244">catch</span><span class="ct-95ba07"> (</span><span class="ct-b6261e">e</span><span class="ct-95ba07">) {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">throw</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-c97e13">Error</span><span class="ct-95ba07">(</span><span class="ct-b6261e">e</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  }</span></span><span class="line"><span class="ct-95ba07">  </span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-4323f8">// calling read method</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-70f244">try</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// this method can return data</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">result</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">contract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">methods</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">retrieve</span><span class="ct-95ba07">().</span><span class="ct-afd0a6">call</span><span class="ct-95ba07">();</span></span><span class="line"><span class="ct-95ba07">  } </span><span class="ct-70f244">catch</span><span class="ct-95ba07"> (</span><span class="ct-b6261e">e</span><span class="ct-95ba07">) {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">throw</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-c97e13">Error</span><span class="ct-95ba07">(</span><span class="ct-b6261e">e</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  }</span></span><span class="line"><span class="ct-95ba07">}</span></span></code></pre><!--]--></div><h3 id="nodejs-and-react-native-example"><a href="#nodejs-and-react-native-example"><!--[-->Node.js and React Native example<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4323f8">// see example below</span></span><span class="line"><span class="ct-70f244">import</span><span class="ct-95ba07"> { </span><span class="ct-b6261e">getContract</span><span class="ct-95ba07"> } </span><span class="ct-70f244">from</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;.&#39;</span><span class="ct-95ba07">;</span></span><span class="line"></span><span class="line"><span class="ct-4323f8">// ABI контракта</span></span><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">CONTRACT_ABI</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> { </span><span class="ct-4323f8">/* ... */</span><span class="ct-95ba07"> };</span></span><span class="line"><span class="ct-4323f8">// contract address</span></span><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;0xdea164f67df4dbfe675d5271c9d404e0260f33bb&#39;</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-4323f8">// getting contract</span></span><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">contract</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">getContract</span><span class="ct-95ba07">(</span><span class="ct-56c89d">CONTRACT_ABI</span><span class="ct-95ba07">, </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-4323f8">// account&#39;s private key</span></span><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">privateKey</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;...&#39;</span><span class="ct-95ba07">;</span></span><span class="line"></span><span class="line"><span class="ct-4323f8">// write-methods requires private key</span></span><span class="line"><span class="ct-dade4d">const</span><span class="ct-defe47"> </span><span class="ct-56bd12">executeContractMethod</span><span class="ct-defe47"> </span><span class="ct-0b1079">=</span><span class="ct-defe47"> </span><span class="ct-dade4d">async</span><span class="ct-defe47"> (</span><span class="ct-9561a5">val</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-11520d">number</span><span class="ct-defe47">) </span><span class="ct-dade4d">=&gt;</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">transaction</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-b6261e">contract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">methods</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">store</span><span class="ct-95ba07">(</span><span class="ct-b6261e">val</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">account</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">eth</span><span class="ct-95ba07">.</span><span class="ct-b6261e">accounts</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">privateKeyToAccount</span><span class="ct-95ba07">(</span><span class="ct-b6261e">privateKey</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">options</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">      to: </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-95ba07">      data: </span><span class="ct-b6261e">transaction</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">encodeABI</span><span class="ct-95ba07">(),</span></span><span class="line"><span class="ct-95ba07">      gas: </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">transaction</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">estimateGas</span><span class="ct-95ba07">({ from: </span><span class="ct-b6261e">account</span><span class="ct-95ba07">.</span><span class="ct-b6261e">address</span><span class="ct-95ba07"> }),</span></span><span class="line"><span class="ct-95ba07">      gasPrice: </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">eth</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">getGasPrice</span><span class="ct-95ba07">(),</span></span><span class="line"><span class="ct-95ba07">    };</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">signed</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">eth</span><span class="ct-95ba07">.</span><span class="ct-b6261e">accounts</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">signTransaction</span><span class="ct-95ba07">(</span></span><span class="line"><span class="ct-95ba07">      </span><span class="ct-b6261e">options</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-95ba07">      </span><span class="ct-b6261e">privateKey</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-95ba07">    );</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">eth</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">sendSignedTransaction</span><span class="ct-95ba07">(</span><span class="ct-b6261e">signed</span><span class="ct-95ba07">.</span><span class="ct-b6261e">rawTransaction</span><span class="ct-70f244">!</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">};</span></span></code></pre><!--]--></div><h3 id="calling-a-batch-of-contracts-methods"><a href="#calling-a-batch-of-contracts-methods"><!--[-->Calling a batch of contract&#39;s methods<!--]--></a></h3><p><!--[-->Function calls batch of requests, returning array of results. For example:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">requests</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> [</span></span><span class="line"><span class="ct-95ba07">   </span><span class="ct-b6261e">contract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">method</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">balanceOf</span><span class="ct-95ba07">().</span><span class="ct-b6261e">call</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-95ba07">   </span><span class="ct-b6261e">contract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">method</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">getStaked</span><span class="ct-95ba07">().</span><span class="ct-b6261e">call</span></span><span class="line"><span class="ct-95ba07">  ]</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">result</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">await</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">makeBatchRequest</span><span class="ct-95ba07">(</span><span class="ct-b6261e">request</span><span class="ct-95ba07">);</span></span></code></pre><!--]--></div><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">web3</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">Web3</span><span class="ct-95ba07">(</span><span class="ct-b6261e">Web3</span><span class="ct-95ba07">.</span><span class="ct-b6261e">givenProvider</span><span class="ct-95ba07"> </span><span class="ct-70f244">||</span><span class="ct-95ba07"> </span><span class="ct-56c89d">PROVIDER_URL</span><span class="ct-95ba07">);</span></span><span class="line"></span><span class="line"><span class="ct-dade4d">const</span><span class="ct-defe47"> </span><span class="ct-56bd12">makeBatchRequest</span><span class="ct-defe47"> </span><span class="ct-0b1079">=</span><span class="ct-defe47"> (</span><span class="ct-9561a5">calls</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-11520d">any</span><span class="ct-defe47">[]) </span><span class="ct-dade4d">=&gt;</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-70f244">try</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">web3</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">getWeb3NoAccount</span><span class="ct-95ba07">();</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">batch</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-b6261e">web3</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">BatchRequest</span><span class="ct-95ba07">();</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">promises</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-b6261e">calls</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">map</span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-defe47">      </span><span class="ct-0b1079">return</span><span class="ct-defe47"> </span><span class="ct-0b1079">new</span><span class="ct-defe47"> </span><span class="ct-11520d">Promise</span><span class="ct-defe47">((</span><span class="ct-9561a5">resolve</span><span class="ct-defe47">, </span><span class="ct-9561a5">reject</span><span class="ct-defe47">) </span><span class="ct-dade4d">=&gt;</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-95ba07">        </span><span class="ct-b6261e">batch</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">add</span><span class="ct-95ba07">(</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">            </span><span class="ct-70f244">if</span><span class="ct-95ba07"> (</span><span class="ct-b6261e">err</span><span class="ct-95ba07">) {</span></span><span class="line"><span class="ct-95ba07">              </span><span class="ct-afd0a6">reject</span><span class="ct-95ba07">(</span><span class="ct-b6261e">err</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">            } </span><span class="ct-70f244">else</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">              </span><span class="ct-afd0a6">resolve</span><span class="ct-95ba07">(</span><span class="ct-b6261e">result</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">            }</span></span><span class="line"><span class="ct-95ba07">          })</span></span><span class="line"><span class="ct-95ba07">        );</span></span><span class="line"><span class="ct-95ba07">      });</span></span><span class="line"><span class="ct-95ba07">    });</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-b6261e">batch</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">execute</span><span class="ct-95ba07">();</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">return</span><span class="ct-95ba07"> </span><span class="ct-c97e13">Promise</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">all</span><span class="ct-95ba07">(</span><span class="ct-b6261e">promises</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  } </span><span class="ct-70f244">catch</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-70f244">return</span><span class="ct-95ba07"> </span><span class="ct-379fe1">null</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">  }</span></span><span class="line"><span class="ct-95ba07">};</span></span><span class="line"></span><span class="line"><span class="ct-70f244">export</span><span class="ct-854fa3"> </span><span class="ct-70f244">default</span><span class="ct-854fa3"> </span><span class="ct-b6261e">makeBatchRequest</span><span class="ct-95ba07">;</span></span></code></pre><!--]--></div><h2 id="subscribing-to-smart-contract-events"><a href="#subscribing-to-smart-contract-events"><!--[-->Subscribing to smart contract events<!--]--></a></h2><p><!--[-->There&#39;re different ways to subscribe for contract events. For all of them you will need following variables:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-95ba07">  </span><span class="ct-70f244">import</span><span class="ct-95ba07"> </span><span class="ct-b6261e">Web3</span><span class="ct-95ba07"> </span><span class="ct-70f244">from</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;web3&#39;</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">web3</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">Web3</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;YOUR_RPC_ENDPOINT_HERE&#39;</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">ABI</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;YOUR ABI HERE&#39;</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-fa7691">&#39;YOUR CONTRACT ADDRESS HERE&#39;</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> </span><span class="ct-56c89d">myContract</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-70f244">new</span><span class="ct-95ba07"> </span><span class="ct-b6261e">Web3</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">Contract</span><span class="ct-95ba07">(</span><span class="ct-56c89d">ABI</span><span class="ct-95ba07">, </span><span class="ct-56c89d">CONTRACT_ADDRESS</span><span class="ct-95ba07">);</span></span></code></pre><!--]--></div><h3 id="by-accessing-contractevents"><a href="#by-accessing-contractevents"><!--[-->By accessing contract.events<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b6261e">referralProgramContract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">events</span></span><span class="line"><span class="ct-95ba07">  .</span><span class="ct-afd0a6">RegisterUser</span><span class="ct-95ba07">()</span></span><span class="line"><span class="ct-defe47">  .</span><span class="ct-56bd12">on</span><span class="ct-defe47">(</span><span class="ct-52b2ad">&#39;connected&#39;</span><span class="ct-defe47">, (</span><span class="ct-9561a5">subscriptionId</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-11520d">string</span><span class="ct-defe47">) </span><span class="ct-dade4d">=&gt;</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-fa7691">`| UserRegistered | events | ${</span><span class="ct-b6261e">subscriptionId</span><span class="ct-fa7691">}`</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  })</span></span><span class="line"><span class="ct-95ba07">  .</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-fa7691">&#39;data&#39;</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-defe47">    </span><span class="ct-dade4d">async</span><span class="ct-defe47"> (</span><span class="ct-9561a5">event</span><span class="ct-0b1079">:</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-defe47">      </span><span class="ct-9561a5">removed</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-11520d">boolean</span><span class="ct-defe47">;</span></span><span class="line"><span class="ct-defe47">      </span><span class="ct-9561a5">returnValues</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-f9ea63">RegisterUserResponseInterface</span><span class="ct-defe47">;</span></span><span class="line"><span class="ct-95ba07">    }) </span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">      </span><span class="ct-70f244">try</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">        </span><span class="ct-70f244">if</span><span class="ct-95ba07"> (</span><span class="ct-b6261e">event</span><span class="ct-95ba07">.</span><span class="ct-b6261e">removed</span><span class="ct-95ba07">) {</span></span><span class="line"><span class="ct-95ba07">          </span><span class="ct-70f244">return</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">        }</span></span><span class="line"><span class="ct-95ba07">        </span><span class="ct-cd60fa">const</span><span class="ct-95ba07"> { </span><span class="ct-56c89d">user</span><span class="ct-95ba07">, </span><span class="ct-56c89d">referrer</span><span class="ct-95ba07"> } </span><span class="ct-70f244">=</span><span class="ct-95ba07"> </span><span class="ct-b6261e">event</span><span class="ct-95ba07">.</span><span class="ct-b6261e">returnValues</span><span class="ct-95ba07">;</span></span><span class="line"><span class="ct-95ba07">        </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">user</span><span class="ct-95ba07">, </span><span class="ct-b6261e">referrer</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">      } </span><span class="ct-70f244">catch</span><span class="ct-95ba07"> (</span><span class="ct-b6261e">e</span><span class="ct-95ba07">) {</span></span><span class="line"><span class="ct-95ba07">        </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-fa7691">`| ONCE | ${</span><span class="ct-b6261e">e</span><span class="ct-fa7691">}`</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">      }</span></span><span class="line"><span class="ct-95ba07">    },</span></span><span class="line"><span class="ct-95ba07">  )</span></span><span class="line"><span class="ct-defe47">  .</span><span class="ct-56bd12">on</span><span class="ct-defe47">(</span><span class="ct-52b2ad">&#39;error&#39;</span><span class="ct-defe47">, (</span><span class="ct-9561a5">error</span><span class="ct-0b1079">:</span><span class="ct-defe47"> </span><span class="ct-f9ea63">ErrnoException</span><span class="ct-defe47">) </span><span class="ct-dade4d">=&gt;</span><span class="ct-defe47"> {</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">error</span><span class="ct-95ba07">);</span></span><span class="line"><span class="ct-95ba07">  });</span></span></code></pre><!--]--></div><h3 id="with-filtering"><a href="#with-filtering"><!--[-->With filtering<!--]--></a></h3><p><!--[-->We&#39;re listening to <code><!--[-->Transfer<!--]--></code> event here:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">let</span><span class="ct-95ba07"> </span><span class="ct-b6261e">options</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    filter: {</span></span><span class="line"><span class="ct-95ba07">        value: [],</span></span><span class="line"><span class="ct-95ba07">    },</span></span><span class="line"><span class="ct-95ba07">    fromBlock: </span><span class="ct-5e5af7">0</span></span><span class="line"><span class="ct-95ba07">  };</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-b6261e">myContract</span><span class="ct-95ba07">.</span><span class="ct-b6261e">events</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">Transfer</span><span class="ct-95ba07">(</span><span class="ct-b6261e">options</span><span class="ct-95ba07">)</span></span><span class="line"><span class="ct-95ba07">    .</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;data&#39;</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">event</span><span class="ct-95ba07">))</span></span><span class="line"><span class="ct-95ba07">    .</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;changed&#39;</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">changed</span><span class="ct-95ba07">))</span></span><span class="line"><span class="ct-95ba07">    .</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;error&#39;</span><span class="ct-95ba07"> </span></span><span class="line"><span class="ct-95ba07">    .</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;connected&#39;</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">str</span><span class="ct-95ba07">))</span></span></code></pre><!--]--></div><h3 id="common-subscribe-method"><a href="#common-subscribe-method"><!--[-->Common Subscribe method<!--]--></a></h3><p><!--[-->Filtering options can also be specified:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">let</span><span class="ct-95ba07"> </span><span class="ct-b6261e">options</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    fromBlock: </span><span class="ct-5e5af7">0</span><span class="ct-95ba07">,</span></span><span class="line"><span class="ct-95ba07">    address: [</span><span class="ct-fa7691">&#39;address-1&#39;</span><span class="ct-95ba07">, </span><span class="ct-fa7691">&#39;address-2&#39;</span><span class="ct-95ba07">],    </span><span class="ct-4323f8">//Only get events from specific addresses</span></span><span class="line"><span class="ct-95ba07">    topics: []                              </span><span class="ct-4323f8">//What topics to subscribe to</span></span><span class="line"><span class="ct-95ba07">  };</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">let</span><span class="ct-95ba07"> </span><span class="ct-b6261e">subscription</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> (</span><span class="ct-fa7691">&#39;logs&#39;</span><span class="ct-95ba07">, </span><span class="ct-b6261e">options</span></span><span class="line"><span class="ct-95ba07">      </span><span class="ct-70f244">if</span><span class="ct-95ba07"> (</span><span class="ct-70f244">!</span><span class="ct-b6261e">err</span><span class="ct-95ba07">)</span></span><span class="line"><span class="ct-95ba07">      </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">event</span><span class="ct-95ba07">)</span></span><span class="line"><span class="ct-95ba07">  });</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-b6261e">subscription</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;data&#39;</span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">event</span><span class="ct-95ba07">))</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-b6261e">subscription</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;changed&#39;</span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">changed</span><span class="ct-95ba07">))</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-b6261e">subscription</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;error&#39;</span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> { </span><span class="ct-70f244">throw</span><span class="ct-95ba07"> </span><span class="ct-b6261e">err</span><span class="ct-95ba07"> })</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-b6261e">subscription</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">on</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;connected&#39;</span><span class="ct-cd60fa">=&gt;</span><span class="ct-95ba07"> </span><span class="ct-b6261e">console</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">nr</span><span class="ct-95ba07">))</span></span></code></pre><!--]--></div><h3 id="getting-event-history"><a href="#getting-event-history"><!--[-->Getting event history<!--]--></a></h3><p><!--[-->Getting history for <code><!--[-->Transfer<!--]--></code> events for specific values. More info can be found <a href="https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#" rel="nofollow" target="_blank"><!--[-->here<!--]--></a><!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-95ba07">  </span><span class="ct-4323f8">//example options(optional)</span></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-cd60fa">let</span><span class="ct-95ba07"> </span><span class="ct-b6261e">options</span><span class="ct-95ba07"> </span><span class="ct-70f244">=</span><span class="ct-95ba07"> {</span></span><span class="line"><span class="ct-95ba07">    filter: {</span></span><span class="line"><span class="ct-95ba07">        </span><span class="ct-4323f8">// only get events where transfer value was 1000 or 1337</span></span><span class="line"><span class="ct-95ba07">        value: [</span><span class="ct-fa7691">&#39;1000&#39;</span><span class="ct-95ba07">, </span><span class="ct-fa7691">&#39;1337&#39;</span><span class="ct-95ba07">]    </span></span><span class="line"><span class="ct-95ba07">    },</span></span><span class="line"><span class="ct-95ba07">    </span><span class="ct-4323f8">// number | &quot;earliest&quot; | &quot;pending&quot; | &quot;latest&quot;</span></span><span class="line"><span class="ct-95ba07">    fromBlock: </span><span class="ct-5e5af7">0</span><span class="ct-95ba07">,                  </span></span><span class="line"><span class="ct-95ba07">    toBlock: </span><span class="ct-fa7691">&#39;latest&#39;</span></span><span class="line"><span class="ct-95ba07">  };</span></span><span class="line"></span><span class="line"><span class="ct-95ba07">  </span><span class="ct-b6261e">myContract</span><span class="ct-95ba07">.</span><span class="ct-afd0a6">getPastEvents</span><span class="ct-95ba07">(</span><span class="ct-fa7691">&#39;Transfer&#39;</span><span class="ct-95ba07">, </span><span class="ct-b6261e">options</span><span class="ct-95ba07">)</span></span><span class="line"><span class="ct-95ba07">    .</span><span class="ct-afd0a6">then</span><span class="ct-95ba07"> </span><span class="ct-afd0a6">log</span><span class="ct-95ba07">(</span><span class="ct-b6261e">results</span><span class="ct-95ba07">))</span></span><span class="line"><span class="ct-95ba07">    .</span><span class="ct-afd0a6">catch</span><span class="ct-95ba07"> </span></span></code></pre><!--]--></div><style>.ct-f9ea63{color:#FFA657}.ct-52b2ad{color:#A5D6FF}.ct-379fe1{color:#79C0FF}.ct-c97e13{color:#79C0FF}.ct-5e5af7{color:#79C0FF}.ct-56c89d{color:#79C0FF}.ct-cd60fa{color:#FF7B72}.ct-4323f8{color:#8B949E}.ct-854fa3{color:#FFA657}.ct-afd0a6{color:#D2A8FF}.ct-b92caf{color:#79C0FF}.ct-6a4bf1{color:#79C0FF}.ct-11520d{color:#79C0FF}.ct-9561a5{color:#FFA657}.ct-0b1079{color:#FF7B72}.ct-56bd12{color:#D2A8FF}.ct-defe47{color:#C9D1D9}.ct-dade4d{color:#FF7B72}.ct-fa7691{color:#A5D6FF}.ct-b6261e{color:#C9D1D9}.ct-95ba07{color:#C9D1D9}.ct-70f244{color:#FF7B72}.light .ct-70f244{color:#859900}.light .ct-95ba07{color:#657B83}.light .ct-b6261e{color:#268BD2}.light .ct-fa7691{color:#2AA198}.light .ct-dade4d{color:#073642}.light .ct-defe47{color:#657B83}.light .ct-56bd12{color:#268BD2}.light .ct-0b1079{color:#859900}.light .ct-9561a5{color:#657B83}.light .ct-11520d{color:#859900}.light .ct-6a4bf1{color:#268BD2}.light .ct-b92caf{color:#657B83}.light .ct-afd0a6{color:#268BD2}.light .ct-854fa3{color:#657B83}.light .ct-4323f8{color:#93A1A1}.light .ct-cd60fa{color:#073642}.light .ct-56c89d{color:#268BD2}.light .ct-5e5af7{color:#D33682}.light .ct-c97e13{color:#859900}.light .ct-379fe1{color:#B58900}.light .ct-52b2ad{color:#2AA198}.light .ct-f9ea63{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/blockchain/smart-contracts/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812496952}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseStrong.f3ca6279.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.ed0e0070.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a aria-current="page" href="/blockchain/smart-contracts" class="router-link-active _active_192pu_81 _link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Smart Contracts</h1><article><div><p><!--[-->For common functions see <a href="/blockchain/common-typescript-examples" class=""><!--[-->Common typescript examples<!--]--></a>.<!--]--></p><h2 id="getting-smart-contract-instance"><a href="#getting-smart-contract-instance"><!--[-->Getting smart contract instance<!--]--></a></h2><p><!--[-->Useful for calling smart contract methods:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-903217">import</span><span class="ct-241f90"> { </span><span class="ct-f50cca">Contract</span><span class="ct-241f90"> } </span><span class="ct-903217">from</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;web3-eth-contract&#39;</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-903217">import</span><span class="ct-241f90"> { </span><span class="ct-f50cca">web3</span><span class="ct-241f90"> } </span><span class="ct-903217">from</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;.&#39;</span><span class="ct-241f90">;</span></span><span class="line"></span><span class="line"><span class="ct-bbc798">const</span><span class="ct-c2cf18"> </span><span class="ct-12b01c">getContract</span><span class="ct-c2cf18"> </span><span class="ct-db30a0">=</span><span class="ct-c2cf18"> (</span><span class="ct-4104ed">abi</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-19af27">object</span><span class="ct-c2cf18">, </span><span class="ct-4104ed">address</span><span class="ct-db30a0">?:</span><span class="ct-c2cf18"> </span><span class="ct-19af27">string</span><span class="ct-c2cf18">)</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-bbc798">=&gt;</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-c2cf18">  </span><span class="ct-bbc798">const</span><span class="ct-c2cf18"> </span><span class="ct-a88101">abiFromJson</span><span class="ct-c2cf18"> </span><span class="ct-db30a0">=</span><span class="ct-c2cf18"> </span><span class="ct-9a0108">JSON</span><span class="ct-c2cf18">.</span><span class="ct-a88101">parse</span><span class="ct-c2cf18">(</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-903217">return</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">eth</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">Contract</span><span class="ct-241f90">(</span><span class="ct-f50cca">abiFromJson</span><span class="ct-241f90">, </span><span class="ct-f50cca">address</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">};</span></span><span class="line"></span><span class="line"><span class="ct-903217">export</span><span class="ct-792f31"> </span><span class="ct-903217">default</span><span class="ct-792f31"> </span><span class="ct-f50cca">getContract</span><span class="ct-241f90">;</span></span></code></pre><!--]--></div><h2 id="executing-contract-method"><a href="#executing-contract-method"><!--[-->Executing contract method<!--]--></a></h2><p><!--[-->Contract has <strong><!--[-->read<!--]--></strong> and <strong><!--[-->write<!--]--></strong> methods. To get a list of methods, you can paste contract address on  <a href="https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract" rel="nofollow" target="_blank"><!--[-->https://etherscan.io/ ETH<!--]--></a> or any other service.<!--]--></p><p><!--[--><strong><!--[-->Read<!--]--></strong> methods doesn&#39;t require spending <strong><!--[-->gas<!--]--></strong>. <strong><!--[-->Write<!--]--></strong> methods cost some amount of <strong><!--[-->gas<!--]--></strong>, hence they will be executed with confirmation from user.<!--]--></p><h3 id="example-for-metamask-without-private-key"><a href="#example-for-metamask-without-private-key"><!--[-->Example for #Metamask without private key<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-5fbbf4">// see example below</span></span><span class="line"><span class="ct-903217">import</span><span class="ct-241f90"> { </span><span class="ct-f50cca">getContract</span><span class="ct-241f90"> } </span><span class="ct-903217">from</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;.&#39;</span><span class="ct-241f90">;</span></span><span class="line"></span><span class="line"><span class="ct-5fbbf4">// ABI of contract</span></span><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">CONTRACT_ABI</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> { </span><span class="ct-5fbbf4">/* ... */</span><span class="ct-241f90"> };</span></span><span class="line"><span class="ct-241f90"> </span><span class="ct-5fbbf4">// address for contract</span></span><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;0xdea164f67df4dbfe675d5271c9d404e0260f33bb&#39;</span><span class="ct-241f90">;</span></span><span class="line"></span><span class="line"><span class="ct-903217">export</span><span class="ct-241f90"> </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">executeContractMethod</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-050e10">async</span><span class="ct-241f90"> ({}) </span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-5fbbf4">// getting contract</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">contract</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">getContract</span><span class="ct-241f90">(</span><span class="ct-3a4cb4">CONTRACT_ABI</span><span class="ct-241f90">, </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  </span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-5fbbf4">// Calling write method</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-903217">try</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// authorizing with Metamask</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">currentProvider</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">request</span><span class="ct-241f90">({ method: </span><span class="ct-79e8f5">&#39;eth_requestAccounts&#39;</span><span class="ct-241f90"> });</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// getting wallet address</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">addressUser</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">currentProvider</span><span class="ct-241f90">.</span><span class="ct-f50cca">selectedAddress</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// calling &quot;store&quot; store method for contract</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// payload should include `from` address, that matches</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// current user&#39;s wallet</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">contract</span><span class="ct-241f90">.</span><span class="ct-f50cca">methods</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">store</span><span class="ct-241f90">(</span><span class="ct-5d0b1c">0</span><span class="ct-241f90">, </span><span class="ct-79e8f5">&#39;Parameter&#39;</span><span class="ct-241f90">).</span><span class="ct-1b2dd4">send</span><span class="ct-241f90">({</span></span><span class="line"><span class="ct-241f90">      from: </span><span class="ct-f50cca">addressUser</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-241f90">    });</span></span><span class="line"><span class="ct-241f90">  } </span><span class="ct-903217">catch</span><span class="ct-241f90"> (</span><span class="ct-f50cca">e</span><span class="ct-241f90">) {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">throw</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-6be8ce">Error</span><span class="ct-241f90">(</span><span class="ct-f50cca">e</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  }</span></span><span class="line"><span class="ct-241f90">  </span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-5fbbf4">// calling read method</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-903217">try</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// this method can return data</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">result</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">contract</span><span class="ct-241f90">.</span><span class="ct-f50cca">methods</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">retrieve</span><span class="ct-241f90">().</span><span class="ct-1b2dd4">call</span><span class="ct-241f90">();</span></span><span class="line"><span class="ct-241f90">  } </span><span class="ct-903217">catch</span><span class="ct-241f90"> (</span><span class="ct-f50cca">e</span><span class="ct-241f90">) {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">throw</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-6be8ce">Error</span><span class="ct-241f90">(</span><span class="ct-f50cca">e</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  }</span></span><span class="line"><span class="ct-241f90">}</span></span></code></pre><!--]--></div><h3 id="nodejs-and-react-native-example"><a href="#nodejs-and-react-native-example"><!--[-->Node.js and React Native example<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-5fbbf4">// see example below</span></span><span class="line"><span class="ct-903217">import</span><span class="ct-241f90"> { </span><span class="ct-f50cca">getContract</span><span class="ct-241f90"> } </span><span class="ct-903217">from</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;.&#39;</span><span class="ct-241f90">;</span></span><span class="line"></span><span class="line"><span class="ct-5fbbf4">// ABI контракта</span></span><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">CONTRACT_ABI</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> { </span><span class="ct-5fbbf4">/* ... */</span><span class="ct-241f90"> };</span></span><span class="line"><span class="ct-5fbbf4">// contract address</span></span><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;0xdea164f67df4dbfe675d5271c9d404e0260f33bb&#39;</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-5fbbf4">// getting contract</span></span><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">contract</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">getContract</span><span class="ct-241f90">(</span><span class="ct-3a4cb4">CONTRACT_ABI</span><span class="ct-241f90">, </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-5fbbf4">// account&#39;s private key</span></span><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">privateKey</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;...&#39;</span><span class="ct-241f90">;</span></span><span class="line"></span><span class="line"><span class="ct-5fbbf4">// write-methods requires private key</span></span><span class="line"><span class="ct-bbc798">const</span><span class="ct-c2cf18"> </span><span class="ct-12b01c">executeContractMethod</span><span class="ct-c2cf18"> </span><span class="ct-db30a0">=</span><span class="ct-c2cf18"> </span><span class="ct-bbc798">async</span><span class="ct-c2cf18"> (</span><span class="ct-4104ed">val</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-19af27">number</span><span class="ct-c2cf18">) </span><span class="ct-bbc798">=&gt;</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">transaction</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-f50cca">contract</span><span class="ct-241f90">.</span><span class="ct-f50cca">methods</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">store</span><span class="ct-241f90">(</span><span class="ct-f50cca">val</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">account</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">eth</span><span class="ct-241f90">.</span><span class="ct-f50cca">accounts</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">privateKeyToAccount</span><span class="ct-241f90">(</span><span class="ct-f50cca">privateKey</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">options</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">      to: </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-241f90">      data: </span><span class="ct-f50cca">transaction</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">encodeABI</span><span class="ct-241f90">(),</span></span><span class="line"><span class="ct-241f90">      gas: </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">transaction</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">estimateGas</span><span class="ct-241f90">({ from: </span><span class="ct-f50cca">account</span><span class="ct-241f90">.</span><span class="ct-f50cca">address</span><span class="ct-241f90"> }),</span></span><span class="line"><span class="ct-241f90">      gasPrice: </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">eth</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">getGasPrice</span><span class="ct-241f90">(),</span></span><span class="line"><span class="ct-241f90">    };</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">signed</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">eth</span><span class="ct-241f90">.</span><span class="ct-f50cca">accounts</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">signTransaction</span><span class="ct-241f90">(</span></span><span class="line"><span class="ct-241f90">      </span><span class="ct-f50cca">options</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-241f90">      </span><span class="ct-f50cca">privateKey</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-241f90">    );</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">eth</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">sendSignedTransaction</span><span class="ct-241f90">(</span><span class="ct-f50cca">signed</span><span class="ct-241f90">.</span><span class="ct-f50cca">rawTransaction</span><span class="ct-903217">!</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">};</span></span></code></pre><!--]--></div><h3 id="calling-a-batch-of-contracts-methods"><a href="#calling-a-batch-of-contracts-methods"><!--[-->Calling a batch of contract&#39;s methods<!--]--></a></h3><p><!--[-->Function calls batch of requests, returning array of results. For example:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">requests</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> [</span></span><span class="line"><span class="ct-241f90">   </span><span class="ct-f50cca">contract</span><span class="ct-241f90">.</span><span class="ct-f50cca">method</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">balanceOf</span><span class="ct-241f90">().</span><span class="ct-f50cca">call</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-241f90">   </span><span class="ct-f50cca">contract</span><span class="ct-241f90">.</span><span class="ct-f50cca">method</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">getStaked</span><span class="ct-241f90">().</span><span class="ct-f50cca">call</span></span><span class="line"><span class="ct-241f90">  ]</span></span><span class="line"></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">result</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">await</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">makeBatchRequest</span><span class="ct-241f90">(</span><span class="ct-f50cca">request</span><span class="ct-241f90">);</span></span></code></pre><!--]--></div><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">web3</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">Web3</span><span class="ct-241f90">(</span><span class="ct-f50cca">Web3</span><span class="ct-241f90">.</span><span class="ct-f50cca">givenProvider</span><span class="ct-241f90"> </span><span class="ct-903217">||</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">PROVIDER_URL</span><span class="ct-241f90">);</span></span><span class="line"></span><span class="line"><span class="ct-bbc798">const</span><span class="ct-c2cf18"> </span><span class="ct-12b01c">makeBatchRequest</span><span class="ct-c2cf18"> </span><span class="ct-db30a0">=</span><span class="ct-c2cf18"> (</span><span class="ct-4104ed">calls</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-19af27">any</span><span class="ct-c2cf18">[]) </span><span class="ct-bbc798">=&gt;</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-903217">try</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">web3</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">getWeb3NoAccount</span><span class="ct-241f90">();</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">batch</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-f50cca">web3</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">BatchRequest</span><span class="ct-241f90">();</span></span><span class="line"></span><span class="line"><span class="ct-241f90">    </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">promises</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-f50cca">calls</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">map</span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-c2cf18">      </span><span class="ct-db30a0">return</span><span class="ct-c2cf18"> </span><span class="ct-db30a0">new</span><span class="ct-c2cf18"> </span><span class="ct-19af27">Promise</span><span class="ct-c2cf18">((</span><span class="ct-4104ed">resolve</span><span class="ct-c2cf18">, </span><span class="ct-4104ed">reject</span><span class="ct-c2cf18">) </span><span class="ct-bbc798">=&gt;</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-241f90">        </span><span class="ct-f50cca">batch</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">add</span><span class="ct-241f90">(</span></span><span class="line"></span><span class="line"><span class="ct-241f90">            </span><span class="ct-903217">if</span><span class="ct-241f90"> (</span><span class="ct-f50cca">err</span><span class="ct-241f90">) {</span></span><span class="line"><span class="ct-241f90">              </span><span class="ct-1b2dd4">reject</span><span class="ct-241f90">(</span><span class="ct-f50cca">err</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">            } </span><span class="ct-903217">else</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">              </span><span class="ct-1b2dd4">resolve</span><span class="ct-241f90">(</span><span class="ct-f50cca">result</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">            }</span></span><span class="line"><span class="ct-241f90">          })</span></span><span class="line"><span class="ct-241f90">        );</span></span><span class="line"><span class="ct-241f90">      });</span></span><span class="line"><span class="ct-241f90">    });</span></span><span class="line"></span><span class="line"><span class="ct-241f90">    </span><span class="ct-f50cca">batch</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">execute</span><span class="ct-241f90">();</span></span><span class="line"></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">return</span><span class="ct-241f90"> </span><span class="ct-6be8ce">Promise</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">all</span><span class="ct-241f90">(</span><span class="ct-f50cca">promises</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  } </span><span class="ct-903217">catch</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-903217">return</span><span class="ct-241f90"> </span><span class="ct-f4eb4f">null</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">  }</span></span><span class="line"><span class="ct-241f90">};</span></span><span class="line"></span><span class="line"><span class="ct-903217">export</span><span class="ct-792f31"> </span><span class="ct-903217">default</span><span class="ct-792f31"> </span><span class="ct-f50cca">makeBatchRequest</span><span class="ct-241f90">;</span></span></code></pre><!--]--></div><h2 id="subscribing-to-smart-contract-events"><a href="#subscribing-to-smart-contract-events"><!--[-->Subscribing to smart contract events<!--]--></a></h2><p><!--[-->There&#39;re different ways to subscribe for contract events. For all of them you will need following variables:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-241f90">  </span><span class="ct-903217">import</span><span class="ct-241f90"> </span><span class="ct-f50cca">Web3</span><span class="ct-241f90"> </span><span class="ct-903217">from</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;web3&#39;</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">web3</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">Web3</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;YOUR_RPC_ENDPOINT_HERE&#39;</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">ABI</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;YOUR ABI HERE&#39;</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-79e8f5">&#39;YOUR CONTRACT ADDRESS HERE&#39;</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">const</span><span class="ct-241f90"> </span><span class="ct-3a4cb4">myContract</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-903217">new</span><span class="ct-241f90"> </span><span class="ct-f50cca">Web3</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">Contract</span><span class="ct-241f90">(</span><span class="ct-3a4cb4">ABI</span><span class="ct-241f90">, </span><span class="ct-3a4cb4">CONTRACT_ADDRESS</span><span class="ct-241f90">);</span></span></code></pre><!--]--></div><h3 id="by-accessing-contractevents"><a href="#by-accessing-contractevents"><!--[-->By accessing contract.events<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-f50cca">referralProgramContract</span><span class="ct-241f90">.</span><span class="ct-f50cca">events</span></span><span class="line"><span class="ct-241f90">  .</span><span class="ct-1b2dd4">RegisterUser</span><span class="ct-241f90">()</span></span><span class="line"><span class="ct-c2cf18">  .</span><span class="ct-12b01c">on</span><span class="ct-c2cf18">(</span><span class="ct-88fe7c">&#39;connected&#39;</span><span class="ct-c2cf18">, (</span><span class="ct-4104ed">subscriptionId</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-19af27">string</span><span class="ct-c2cf18">) </span><span class="ct-bbc798">=&gt;</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-79e8f5">`| UserRegistered | events | ${</span><span class="ct-f50cca">subscriptionId</span><span class="ct-79e8f5">}`</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  })</span></span><span class="line"><span class="ct-241f90">  .</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-79e8f5">&#39;data&#39;</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-c2cf18">    </span><span class="ct-bbc798">async</span><span class="ct-c2cf18"> (</span><span class="ct-4104ed">event</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-c2cf18">      </span><span class="ct-4104ed">removed</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-19af27">boolean</span><span class="ct-c2cf18">;</span></span><span class="line"><span class="ct-c2cf18">      </span><span class="ct-4104ed">returnValues</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-0b7056">RegisterUserResponseInterface</span><span class="ct-c2cf18">;</span></span><span class="line"><span class="ct-241f90">    }) </span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">      </span><span class="ct-903217">try</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">        </span><span class="ct-903217">if</span><span class="ct-241f90"> (</span><span class="ct-f50cca">event</span><span class="ct-241f90">.</span><span class="ct-f50cca">removed</span><span class="ct-241f90">) {</span></span><span class="line"><span class="ct-241f90">          </span><span class="ct-903217">return</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">        }</span></span><span class="line"><span class="ct-241f90">        </span><span class="ct-050e10">const</span><span class="ct-241f90"> { </span><span class="ct-3a4cb4">user</span><span class="ct-241f90">, </span><span class="ct-3a4cb4">referrer</span><span class="ct-241f90"> } </span><span class="ct-903217">=</span><span class="ct-241f90"> </span><span class="ct-f50cca">event</span><span class="ct-241f90">.</span><span class="ct-f50cca">returnValues</span><span class="ct-241f90">;</span></span><span class="line"><span class="ct-241f90">        </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">user</span><span class="ct-241f90">, </span><span class="ct-f50cca">referrer</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">      } </span><span class="ct-903217">catch</span><span class="ct-241f90"> (</span><span class="ct-f50cca">e</span><span class="ct-241f90">) {</span></span><span class="line"><span class="ct-241f90">        </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-79e8f5">`| ONCE | ${</span><span class="ct-f50cca">e</span><span class="ct-79e8f5">}`</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">      }</span></span><span class="line"><span class="ct-241f90">    },</span></span><span class="line"><span class="ct-241f90">  )</span></span><span class="line"><span class="ct-c2cf18">  .</span><span class="ct-12b01c">on</span><span class="ct-c2cf18">(</span><span class="ct-88fe7c">&#39;error&#39;</span><span class="ct-c2cf18">, (</span><span class="ct-4104ed">error</span><span class="ct-db30a0">:</span><span class="ct-c2cf18"> </span><span class="ct-0b7056">ErrnoException</span><span class="ct-c2cf18">) </span><span class="ct-bbc798">=&gt;</span><span class="ct-c2cf18"> {</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">error</span><span class="ct-241f90">);</span></span><span class="line"><span class="ct-241f90">  });</span></span></code></pre><!--]--></div><h3 id="with-filtering"><a href="#with-filtering"><!--[-->With filtering<!--]--></a></h3><p><!--[-->We&#39;re listening to <code><!--[-->Transfer<!--]--></code> event here:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">let</span><span class="ct-241f90"> </span><span class="ct-f50cca">options</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    filter: {</span></span><span class="line"><span class="ct-241f90">        value: [],</span></span><span class="line"><span class="ct-241f90">    },</span></span><span class="line"><span class="ct-241f90">    fromBlock: </span><span class="ct-5d0b1c">0</span></span><span class="line"><span class="ct-241f90">  };</span></span><span class="line"></span><span class="line"><span class="ct-241f90">  </span><span class="ct-f50cca">myContract</span><span class="ct-241f90">.</span><span class="ct-f50cca">events</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">Transfer</span><span class="ct-241f90">(</span><span class="ct-f50cca">options</span><span class="ct-241f90">)</span></span><span class="line"><span class="ct-241f90">    .</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;data&#39;</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">event</span><span class="ct-241f90">))</span></span><span class="line"><span class="ct-241f90">    .</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;changed&#39;</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">changed</span><span class="ct-241f90">))</span></span><span class="line"><span class="ct-241f90">    .</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;error&#39;</span><span class="ct-241f90"> </span></span><span class="line"><span class="ct-241f90">    .</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;connected&#39;</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">str</span><span class="ct-241f90">))</span></span></code></pre><!--]--></div><h3 id="common-subscribe-method"><a href="#common-subscribe-method"><!--[-->Common Subscribe method<!--]--></a></h3><p><!--[-->Filtering options can also be specified:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">let</span><span class="ct-241f90"> </span><span class="ct-f50cca">options</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    fromBlock: </span><span class="ct-5d0b1c">0</span><span class="ct-241f90">,</span></span><span class="line"><span class="ct-241f90">    address: [</span><span class="ct-79e8f5">&#39;address-1&#39;</span><span class="ct-241f90">, </span><span class="ct-79e8f5">&#39;address-2&#39;</span><span class="ct-241f90">],    </span><span class="ct-5fbbf4">//Only get events from specific addresses</span></span><span class="line"><span class="ct-241f90">    topics: []                              </span><span class="ct-5fbbf4">//What topics to subscribe to</span></span><span class="line"><span class="ct-241f90">  };</span></span><span class="line"></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">let</span><span class="ct-241f90"> </span><span class="ct-f50cca">subscription</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> (</span><span class="ct-79e8f5">&#39;logs&#39;</span><span class="ct-241f90">, </span><span class="ct-f50cca">options</span></span><span class="line"><span class="ct-241f90">      </span><span class="ct-903217">if</span><span class="ct-241f90"> (</span><span class="ct-903217">!</span><span class="ct-f50cca">err</span><span class="ct-241f90">)</span></span><span class="line"><span class="ct-241f90">      </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">event</span><span class="ct-241f90">)</span></span><span class="line"><span class="ct-241f90">  });</span></span><span class="line"></span><span class="line"><span class="ct-241f90">  </span><span class="ct-f50cca">subscription</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;data&#39;</span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">event</span><span class="ct-241f90">))</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-f50cca">subscription</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;changed&#39;</span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">changed</span><span class="ct-241f90">))</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-f50cca">subscription</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;error&#39;</span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> { </span><span class="ct-903217">throw</span><span class="ct-241f90"> </span><span class="ct-f50cca">err</span><span class="ct-241f90"> })</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-f50cca">subscription</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">on</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;connected&#39;</span><span class="ct-050e10">=&gt;</span><span class="ct-241f90"> </span><span class="ct-f50cca">console</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">nr</span><span class="ct-241f90">))</span></span></code></pre><!--]--></div><h3 id="getting-event-history"><a href="#getting-event-history"><!--[-->Getting event history<!--]--></a></h3><p><!--[-->Getting history for <code><!--[-->Transfer<!--]--></code> events for specific values. More info can be found <a href="https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#" rel="nofollow" target="_blank"><!--[-->here<!--]--></a><!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-241f90">  </span><span class="ct-5fbbf4">//example options(optional)</span></span><span class="line"><span class="ct-241f90">  </span><span class="ct-050e10">let</span><span class="ct-241f90"> </span><span class="ct-f50cca">options</span><span class="ct-241f90"> </span><span class="ct-903217">=</span><span class="ct-241f90"> {</span></span><span class="line"><span class="ct-241f90">    filter: {</span></span><span class="line"><span class="ct-241f90">        </span><span class="ct-5fbbf4">// only get events where transfer value was 1000 or 1337</span></span><span class="line"><span class="ct-241f90">        value: [</span><span class="ct-79e8f5">&#39;1000&#39;</span><span class="ct-241f90">, </span><span class="ct-79e8f5">&#39;1337&#39;</span><span class="ct-241f90">]    </span></span><span class="line"><span class="ct-241f90">    },</span></span><span class="line"><span class="ct-241f90">    </span><span class="ct-5fbbf4">// number | &quot;earliest&quot; | &quot;pending&quot; | &quot;latest&quot;</span></span><span class="line"><span class="ct-241f90">    fromBlock: </span><span class="ct-5d0b1c">0</span><span class="ct-241f90">,                  </span></span><span class="line"><span class="ct-241f90">    toBlock: </span><span class="ct-79e8f5">&#39;latest&#39;</span></span><span class="line"><span class="ct-241f90">  };</span></span><span class="line"></span><span class="line"><span class="ct-241f90">  </span><span class="ct-f50cca">myContract</span><span class="ct-241f90">.</span><span class="ct-1b2dd4">getPastEvents</span><span class="ct-241f90">(</span><span class="ct-79e8f5">&#39;Transfer&#39;</span><span class="ct-241f90">, </span><span class="ct-f50cca">options</span><span class="ct-241f90">)</span></span><span class="line"><span class="ct-241f90">    .</span><span class="ct-1b2dd4">then</span><span class="ct-241f90"> </span><span class="ct-1b2dd4">log</span><span class="ct-241f90">(</span><span class="ct-f50cca">results</span><span class="ct-241f90">))</span></span><span class="line"><span class="ct-241f90">    .</span><span class="ct-1b2dd4">catch</span><span class="ct-241f90"> </span></span></code></pre><!--]--></div><style>.ct-0b7056{color:#FFA657}.ct-88fe7c{color:#A5D6FF}.ct-f4eb4f{color:#79C0FF}.ct-6be8ce{color:#79C0FF}.ct-5d0b1c{color:#79C0FF}.ct-3a4cb4{color:#79C0FF}.ct-050e10{color:#FF7B72}.ct-5fbbf4{color:#8B949E}.ct-792f31{color:#FFA657}.ct-1b2dd4{color:#D2A8FF}.ct-9a0108{color:#79C0FF}.ct-a88101{color:#79C0FF}.ct-19af27{color:#79C0FF}.ct-4104ed{color:#FFA657}.ct-db30a0{color:#FF7B72}.ct-12b01c{color:#D2A8FF}.ct-c2cf18{color:#C9D1D9}.ct-bbc798{color:#FF7B72}.ct-79e8f5{color:#A5D6FF}.ct-f50cca{color:#C9D1D9}.ct-241f90{color:#C9D1D9}.ct-903217{color:#FF7B72}.light .ct-903217{color:#859900}.light .ct-241f90{color:#657B83}.light .ct-f50cca{color:#268BD2}.light .ct-79e8f5{color:#2AA198}.light .ct-bbc798{color:#073642}.light .ct-c2cf18{color:#657B83}.light .ct-12b01c{color:#268BD2}.light .ct-db30a0{color:#859900}.light .ct-4104ed{color:#657B83}.light .ct-19af27{color:#859900}.light .ct-a88101{color:#268BD2}.light .ct-9a0108{color:#657B83}.light .ct-1b2dd4{color:#268BD2}.light .ct-792f31{color:#657B83}.light .ct-5fbbf4{color:#93A1A1}.light .ct-050e10{color:#073642}.light .ct-3a4cb4{color:#268BD2}.light .ct-5d0b1c{color:#D33682}.light .ct-6be8ce{color:#859900}.light .ct-f4eb4f{color:#B58900}.light .ct-88fe7c{color:#2AA198}.light .ct-0b7056{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/blockchain/smart-contracts/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359262}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseStrong.e221982f.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.af0f4af9.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/css/automatic-grid-like-masonry-with-pure-css/_payload.js b/css/automatic-grid-like-masonry-with-pure-css/_payload.js
index 1ca2ee2..3310580 100644
--- a/css/automatic-grid-like-masonry-with-pure-css/_payload.js
+++ b/css/automatic-grid-like-masonry-with-pure-css/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:Q,_path:R},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-yoYMujrz1O":{_path:R,_dir:"css",_draft:y,_partial:y,_locale:"en",_empty:y,title:Q,description:z,excerpt:{type:S,children:[{type:a,tag:T,props:{},children:[{type:c,value:z}]},{type:a,tag:g,props:{code:A,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:A}]}]}]},{type:a,tag:q,props:{id:B},children:[{type:c,value:C}]},{type:a,tag:g,props:{code:D,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:D}]}]}]},{type:a,tag:q,props:{id:E},children:[{type:c,value:F}]},{type:a,tag:g,props:{code:G,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:G}]}]}]},{type:a,tag:q,props:{id:H},children:[{type:c,value:I}]},{type:a,tag:g,props:{code:J,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:J}]}]}]}]},body:{type:S,children:[{type:a,tag:T,props:{},children:[{type:c,value:z}]},{type:a,tag:g,props:{code:A,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:U},children:[{type:c,value:"$cell: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"250"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:U},children:[{type:c,value:"$gap: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"20"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".grid"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"display"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"grid"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-template-columns"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:V},children:[{type:c,value:"repeat"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"auto-fit"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:V},children:[{type:c,value:"minmax"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"$cell"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:"ct-f42e6b"},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:"ct-4288f1"},children:[{type:c,value:"fr"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"));"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-auto-rows"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"256"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-auto-flow"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"row"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"dense"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-column-gap"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-row-gap"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:B},children:[{type:c,value:C}]},{type:a,tag:g,props:{code:D,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".h-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F takes 2 columns"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-column-end"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:b}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".v-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F takes 2 rows"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-row-end"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:b}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:E},children:[{type:c,value:F}]},{type:a,tag:g,props:{code:G,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".full-width"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F height: 1 row"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:H},children:[{type:c,value:I}]},{type:a,tag:g,props:{code:J,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".top-right"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"3"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F height here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F width here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-145210{color:#8B949E}.ct-43821f{color:#79C0FF}.ct-4288f1{color:#FF7B72}.ct-f42e6b{color:#79C0FF}.ct-4fac47{color:#FFA657}.ct-62ad3a{color:#79C0FF}.ct-93ab44{color:#79C0FF}.ct-a54cfd{color:#79C0FF}.ct-573002{color:#C9D1D9}.ct-74caba{color:#79C0FF}.ct-299fdc{color:#C9D1D9}.ct-28dcfd{color:#FF7B72}.ct-48e8e4{color:#79C0FF}.ct-a01e96{color:#FFA657}.light .ct-a01e96{color:#657B83}.light .ct-48e8e4{color:#D33682}.light .ct-28dcfd{color:#859900}.light .ct-299fdc{color:#657B83}.light .ct-74caba{color:#93A1A1}.light .ct-573002{color:#657B83}.light .ct-a54cfd{color:#859900}.light .ct-93ab44{color:#657B83}.light .ct-62ad3a{color:#268BD2}.light .ct-4fac47{color:#657B83}.light .ct-f42e6b{color:#D33682}.light .ct-4288f1{color:#859900}.light .ct-43821f{color:#859900}.light .ct-145210{color:#93A1A1}"}]}],toc:{title:l,searchDepth:ae,depth:ae,links:[{id:B,depth:P,text:C},{id:E,depth:P,text:F},{id:H,depth:P,text:I}]}},_type:"markdown",_id:"content:CSS:Automatic Grid like Masonry with pure CSS.md",_source:"content",_file:"CSS\u002FAutomatic Grid like Masonry with pure CSS.md",_extension:"md"}},prerenderedAt:1667812497168}}("element","span","text","ct-299fdc","line","ct-573002","code","ct-48e8e4",": ",";","  ","","ct-43821f","scss","pre"," ","h3","ct-28dcfd","ct-74caba","ct-a54cfd","}","ct-145210","ct-4fac47","1",false,"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows\u002Fcolumns.","$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","basic-elements-with-double-height-or-width","Basic elements with double height or width",".h-2 { \u002F\u002F takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { \u002F\u002F takes 2 rows\n    grid-row-end: span 2;\n}\n","header-that-fills-all-columns","Header, that fills all columns",".full-width {\n  grid-row: 1 \u002F 2; \u002F\u002F height: 1 row\n  grid-column: 1 \u002F -1;\n}\n","stamp-element-that-takes-3-rows-in-the-top-right-corner","Stamp element, that takes 3 rows in the top right corner",".top-right {\n  grid-row: 1 \u002F 3; \u002F\u002F height here\n  grid-column: -2 \u002F -1; \u002F\u002F width here\n}\n","px"," {","ct-93ab44","2","; ",3,"Automatic Grid Like Masonry With Pure CSS","\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css","root","p","ct-a01e96","ct-62ad3a","(",", ","$gap"," { ","    ","grid-row","\u002F","grid-column"," \u002F ","-1",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:Q,_path:R},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-yoYMujrz1O":{_path:R,_dir:"css",_draft:y,_partial:y,_locale:"en",_empty:y,title:Q,description:z,excerpt:{type:S,children:[{type:a,tag:T,props:{},children:[{type:c,value:z}]},{type:a,tag:g,props:{code:A,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:A}]}]}]},{type:a,tag:q,props:{id:B},children:[{type:c,value:C}]},{type:a,tag:g,props:{code:D,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:D}]}]}]},{type:a,tag:q,props:{id:E},children:[{type:c,value:F}]},{type:a,tag:g,props:{code:G,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:G}]}]}]},{type:a,tag:q,props:{id:H},children:[{type:c,value:I}]},{type:a,tag:g,props:{code:J,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:J}]}]}]}]},body:{type:S,children:[{type:a,tag:T,props:{},children:[{type:c,value:z}]},{type:a,tag:g,props:{code:A,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:U},children:[{type:c,value:"$cell: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"250"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:U},children:[{type:c,value:"$gap: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"20"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".grid"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"display"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"grid"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-template-columns"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:V},children:[{type:c,value:"repeat"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"auto-fit"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:V},children:[{type:c,value:"minmax"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"$cell"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:"ct-6d144f"},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:"ct-f3f734"},children:[{type:c,value:"fr"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"));"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-auto-rows"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"256"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-auto-flow"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"row"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"dense"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-column-gap"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-row-gap"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:B},children:[{type:c,value:C}]},{type:a,tag:g,props:{code:D,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".h-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F takes 2 columns"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-column-end"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:b}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".v-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F takes 2 rows"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-row-end"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:b}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:E},children:[{type:c,value:F}]},{type:a,tag:g,props:{code:G,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".full-width"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F height: 1 row"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:H},children:[{type:c,value:I}]},{type:a,tag:g,props:{code:J,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".top-right"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"3"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F height here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F width here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-ff566b{color:#8B949E}.ct-cabec8{color:#79C0FF}.ct-f3f734{color:#FF7B72}.ct-6d144f{color:#79C0FF}.ct-9985a3{color:#FFA657}.ct-468a72{color:#79C0FF}.ct-55848a{color:#79C0FF}.ct-19a0e1{color:#79C0FF}.ct-501742{color:#C9D1D9}.ct-e6dec3{color:#79C0FF}.ct-db3ba3{color:#C9D1D9}.ct-d0d996{color:#FF7B72}.ct-cf588b{color:#79C0FF}.ct-60df50{color:#FFA657}.light .ct-60df50{color:#657B83}.light .ct-cf588b{color:#D33682}.light .ct-d0d996{color:#859900}.light .ct-db3ba3{color:#657B83}.light .ct-e6dec3{color:#93A1A1}.light .ct-501742{color:#657B83}.light .ct-19a0e1{color:#859900}.light .ct-55848a{color:#657B83}.light .ct-468a72{color:#268BD2}.light .ct-9985a3{color:#657B83}.light .ct-6d144f{color:#D33682}.light .ct-f3f734{color:#859900}.light .ct-cabec8{color:#859900}.light .ct-ff566b{color:#93A1A1}"}]}],toc:{title:l,searchDepth:ae,depth:ae,links:[{id:B,depth:P,text:C},{id:E,depth:P,text:F},{id:H,depth:P,text:I}]}},_type:"markdown",_id:"content:CSS:Automatic Grid like Masonry with pure CSS.md",_source:"content",_file:"CSS\u002FAutomatic Grid like Masonry with pure CSS.md",_extension:"md"}},prerenderedAt:1667813359488}}("element","span","text","ct-db3ba3","line","ct-501742","code","ct-cf588b",": ",";","  ","","ct-cabec8","scss","pre"," ","h3","ct-d0d996","ct-e6dec3","ct-19a0e1","}","ct-ff566b","ct-9985a3","1",false,"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows\u002Fcolumns.","$cell: 250px;\n$gap: 20px;\n\n.grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n  grid-auto-rows: 256px;\n  grid-auto-flow: row dense;\n  grid-column-gap: $gap;\n  grid-row-gap: $gap;\n}\n","basic-elements-with-double-height-or-width","Basic elements with double height or width",".h-2 { \u002F\u002F takes 2 columns\n    grid-column-end: span 2;\n}\n\n.v-2 { \u002F\u002F takes 2 rows\n    grid-row-end: span 2;\n}\n","header-that-fills-all-columns","Header, that fills all columns",".full-width {\n  grid-row: 1 \u002F 2; \u002F\u002F height: 1 row\n  grid-column: 1 \u002F -1;\n}\n","stamp-element-that-takes-3-rows-in-the-top-right-corner","Stamp element, that takes 3 rows in the top right corner",".top-right {\n  grid-row: 1 \u002F 3; \u002F\u002F height here\n  grid-column: -2 \u002F -1; \u002F\u002F width here\n}\n","px"," {","ct-55848a","2","; ",3,"Automatic Grid Like Masonry With Pure CSS","\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css","root","p","ct-60df50","ct-468a72","(",", ","$gap"," { ","    ","grid-row","\u002F","grid-column"," \u002F ","-1",2))
\ No newline at end of file
diff --git a/css/automatic-grid-like-masonry-with-pure-css/index.html b/css/automatic-grid-like-masonry-with-pure-css/index.html
index 1fa459d..291d7e0 100644
--- a/css/automatic-grid-like-masonry-with-pure-css/index.html
+++ b/css/automatic-grid-like-masonry-with-pure-css/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Automatic Grid Like Masonry With Pure CSS • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."><meta name="head:count" content="3"><link rel="modulepreload" href="/css/automatic-grid-like-masonry-with-pure-css/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.ed0e0070.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Automatic Grid Like Masonry With Pure CSS • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."><meta name="head:count" content="3"><link rel="modulepreload" href="/css/automatic-grid-like-masonry-with-pure-css/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.af0f4af9.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/css/automatic-grid-like-masonry-with-pure-css" class="router-link-active _active_192pu_81 _link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Automatic Grid Like Masonry With Pure CSS</h1><article><div><p><!--[-->Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-a01e96">$cell: </span><span class="ct-48e8e4">250</span><span class="ct-28dcfd">px</span><span class="ct-299fdc">;</span></span><span class="line"><span class="ct-a01e96">$gap: </span><span class="ct-48e8e4">20</span><span class="ct-28dcfd">px</span><span class="ct-299fdc">;</span></span><span class="line"></span><span class="line"><span class="ct-74caba">.grid</span><span class="ct-299fdc"> {</span></span><span class="line"><span class="ct-573002">  </span><span class="ct-a54cfd">display</span><span class="ct-573002">: </span><span class="ct-93ab44">grid</span><span class="ct-573002">;</span></span><span class="line"><span class="ct-573002">  </span><span class="ct-a54cfd">grid-template-columns</span><span class="ct-573002">: </span><span class="ct-62ad3a">repeat</span><span class="ct-573002">(</span><span class="ct-4fac47">auto-fit</span><span class="ct-573002">, </span><span class="ct-62ad3a">minmax</span><span class="ct-573002">(</span><span class="ct-4fac47">$cell</span><span class="ct-573002">, </span><span class="ct-f42e6b">1</span><span class="ct-4288f1">fr</span><span class="ct-573002">));</span></span><span class="line"><span class="ct-299fdc">  </span><span class="ct-43821f">grid-auto-rows</span><span class="ct-299fdc">: </span><span class="ct-48e8e4">256</span><span class="ct-28dcfd">px</span><span class="ct-299fdc">;</span></span><span class="line"><span class="ct-573002">  </span><span class="ct-a54cfd">grid-auto-flow</span><span class="ct-573002">: </span><span class="ct-93ab44">row</span><span class="ct-573002"> </span><span class="ct-93ab44">dense</span><span class="ct-573002">;</span></span><span class="line"><span class="ct-573002">  </span><span class="ct-a54cfd">grid-column-gap</span><span class="ct-573002">: </span><span class="ct-4fac47">$gap</span><span class="ct-573002">;</span></span><span class="line"><span class="ct-573002">  </span><span class="ct-a54cfd">grid-row-gap</span><span class="ct-573002">: </span><span class="ct-4fac47">$gap</span><span class="ct-573002">;</span></span><span class="line"><span class="ct-299fdc">}</span></span></code></pre><!--]--></div><h3 id="basic-elements-with-double-height-or-width"><a href="#basic-elements-with-double-height-or-width"><!--[-->Basic elements with double height or width<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-74caba">.h-2</span><span class="ct-299fdc"> { </span><span class="ct-145210">// takes 2 columns</span></span><span class="line"><span class="ct-299fdc">    </span><span class="ct-43821f">grid-column-end</span><span class="ct-299fdc">: </span><span class="ct-43821f">span</span><span class="ct-299fdc"> </span><span class="ct-48e8e4">2</span><span class="ct-299fdc">;</span></span><span class="line"><span class="ct-299fdc">}</span></span><span class="line"></span><span class="line"><span class="ct-74caba">.v-2</span><span class="ct-299fdc"> { </span><span class="ct-145210">// takes 2 rows</span></span><span class="line"><span class="ct-299fdc">    </span><span class="ct-43821f">grid-row-end</span><span class="ct-299fdc">: </span><span class="ct-43821f">span</span><span class="ct-299fdc"> </span><span class="ct-48e8e4">2</span><span class="ct-299fdc">;</span></span><span class="line"><span class="ct-299fdc">}</span></span></code></pre><!--]--></div><h3 id="header-that-fills-all-columns"><a href="#header-that-fills-all-columns"><!--[-->Header, that fills all columns<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-74caba">.full-width</span><span class="ct-299fdc"> {</span></span><span class="line"><span class="ct-299fdc">  </span><span class="ct-43821f">grid-row</span><span class="ct-299fdc">: </span><span class="ct-48e8e4">1</span><span class="ct-299fdc"> </span><span class="ct-28dcfd">/</span><span class="ct-299fdc"> </span><span class="ct-48e8e4">2</span><span class="ct-299fdc">; </span><span class="ct-145210">// height: 1 row</span></span><span class="line"><span class="ct-299fdc">  </span><span class="ct-43821f">grid-column</span><span class="ct-299fdc">: </span><span class="ct-48e8e4">1</span><span class="ct-299fdc"> / </span><span class="ct-48e8e4">-1</span><span class="ct-299fdc">;</span></span><span class="line"><span class="ct-299fdc">}</span></span></code></pre><!--]--></div><h3 id="stamp-element-that-takes-3-rows-in-the-top-right-corner"><a href="#stamp-element-that-takes-3-rows-in-the-top-right-corner"><!--[-->Stamp element, that takes 3 rows in the top right corner<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-74caba">.top-right</span><span class="ct-299fdc"> {</span></span><span class="line"><span class="ct-299fdc">  </span><span class="ct-43821f">grid-row</span><span class="ct-299fdc">: </span><span class="ct-48e8e4">1</span><span class="ct-299fdc"> </span><span class="ct-28dcfd">/</span><span class="ct-299fdc"> </span><span class="ct-48e8e4">3</span><span class="ct-299fdc">; </span><span class="ct-145210">// height here</span></span><span class="line"><span class="ct-299fdc">  </span><span class="ct-43821f">grid-column</span><span class="ct-299fdc">: </span><span class="ct-48e8e4">-2</span><span class="ct-299fdc"> / </span><span class="ct-48e8e4">-1</span><span class="ct-299fdc">; </span><span class="ct-145210">// width here</span></span><span class="line"><span class="ct-299fdc">}</span></span></code></pre><!--]--></div><style>.ct-145210{color:#8B949E}.ct-43821f{color:#79C0FF}.ct-4288f1{color:#FF7B72}.ct-f42e6b{color:#79C0FF}.ct-4fac47{color:#FFA657}.ct-62ad3a{color:#79C0FF}.ct-93ab44{color:#79C0FF}.ct-a54cfd{color:#79C0FF}.ct-573002{color:#C9D1D9}.ct-74caba{color:#79C0FF}.ct-299fdc{color:#C9D1D9}.ct-28dcfd{color:#FF7B72}.ct-48e8e4{color:#79C0FF}.ct-a01e96{color:#FFA657}.light .ct-a01e96{color:#657B83}.light .ct-48e8e4{color:#D33682}.light .ct-28dcfd{color:#859900}.light .ct-299fdc{color:#657B83}.light .ct-74caba{color:#93A1A1}.light .ct-573002{color:#657B83}.light .ct-a54cfd{color:#859900}.light .ct-93ab44{color:#657B83}.light .ct-62ad3a{color:#268BD2}.light .ct-4fac47{color:#657B83}.light .ct-f42e6b{color:#D33682}.light .ct-4288f1{color:#859900}.light .ct-43821f{color:#859900}.light .ct-145210{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/css/automatic-grid-like-masonry-with-pure-css/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497168}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.ed0e0070.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/css/automatic-grid-like-masonry-with-pure-css" class="router-link-active _active_192pu_81 _link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Automatic Grid Like Masonry With Pure CSS</h1><article><div><p><!--[-->Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-60df50">$cell: </span><span class="ct-cf588b">250</span><span class="ct-d0d996">px</span><span class="ct-db3ba3">;</span></span><span class="line"><span class="ct-60df50">$gap: </span><span class="ct-cf588b">20</span><span class="ct-d0d996">px</span><span class="ct-db3ba3">;</span></span><span class="line"></span><span class="line"><span class="ct-e6dec3">.grid</span><span class="ct-db3ba3"> {</span></span><span class="line"><span class="ct-501742">  </span><span class="ct-19a0e1">display</span><span class="ct-501742">: </span><span class="ct-55848a">grid</span><span class="ct-501742">;</span></span><span class="line"><span class="ct-501742">  </span><span class="ct-19a0e1">grid-template-columns</span><span class="ct-501742">: </span><span class="ct-468a72">repeat</span><span class="ct-501742">(</span><span class="ct-9985a3">auto-fit</span><span class="ct-501742">, </span><span class="ct-468a72">minmax</span><span class="ct-501742">(</span><span class="ct-9985a3">$cell</span><span class="ct-501742">, </span><span class="ct-6d144f">1</span><span class="ct-f3f734">fr</span><span class="ct-501742">));</span></span><span class="line"><span class="ct-db3ba3">  </span><span class="ct-cabec8">grid-auto-rows</span><span class="ct-db3ba3">: </span><span class="ct-cf588b">256</span><span class="ct-d0d996">px</span><span class="ct-db3ba3">;</span></span><span class="line"><span class="ct-501742">  </span><span class="ct-19a0e1">grid-auto-flow</span><span class="ct-501742">: </span><span class="ct-55848a">row</span><span class="ct-501742"> </span><span class="ct-55848a">dense</span><span class="ct-501742">;</span></span><span class="line"><span class="ct-501742">  </span><span class="ct-19a0e1">grid-column-gap</span><span class="ct-501742">: </span><span class="ct-9985a3">$gap</span><span class="ct-501742">;</span></span><span class="line"><span class="ct-501742">  </span><span class="ct-19a0e1">grid-row-gap</span><span class="ct-501742">: </span><span class="ct-9985a3">$gap</span><span class="ct-501742">;</span></span><span class="line"><span class="ct-db3ba3">}</span></span></code></pre><!--]--></div><h3 id="basic-elements-with-double-height-or-width"><a href="#basic-elements-with-double-height-or-width"><!--[-->Basic elements with double height or width<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-e6dec3">.h-2</span><span class="ct-db3ba3"> { </span><span class="ct-ff566b">// takes 2 columns</span></span><span class="line"><span class="ct-db3ba3">    </span><span class="ct-cabec8">grid-column-end</span><span class="ct-db3ba3">: </span><span class="ct-cabec8">span</span><span class="ct-db3ba3"> </span><span class="ct-cf588b">2</span><span class="ct-db3ba3">;</span></span><span class="line"><span class="ct-db3ba3">}</span></span><span class="line"></span><span class="line"><span class="ct-e6dec3">.v-2</span><span class="ct-db3ba3"> { </span><span class="ct-ff566b">// takes 2 rows</span></span><span class="line"><span class="ct-db3ba3">    </span><span class="ct-cabec8">grid-row-end</span><span class="ct-db3ba3">: </span><span class="ct-cabec8">span</span><span class="ct-db3ba3"> </span><span class="ct-cf588b">2</span><span class="ct-db3ba3">;</span></span><span class="line"><span class="ct-db3ba3">}</span></span></code></pre><!--]--></div><h3 id="header-that-fills-all-columns"><a href="#header-that-fills-all-columns"><!--[-->Header, that fills all columns<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-e6dec3">.full-width</span><span class="ct-db3ba3"> {</span></span><span class="line"><span class="ct-db3ba3">  </span><span class="ct-cabec8">grid-row</span><span class="ct-db3ba3">: </span><span class="ct-cf588b">1</span><span class="ct-db3ba3"> </span><span class="ct-d0d996">/</span><span class="ct-db3ba3"> </span><span class="ct-cf588b">2</span><span class="ct-db3ba3">; </span><span class="ct-ff566b">// height: 1 row</span></span><span class="line"><span class="ct-db3ba3">  </span><span class="ct-cabec8">grid-column</span><span class="ct-db3ba3">: </span><span class="ct-cf588b">1</span><span class="ct-db3ba3"> / </span><span class="ct-cf588b">-1</span><span class="ct-db3ba3">;</span></span><span class="line"><span class="ct-db3ba3">}</span></span></code></pre><!--]--></div><h3 id="stamp-element-that-takes-3-rows-in-the-top-right-corner"><a href="#stamp-element-that-takes-3-rows-in-the-top-right-corner"><!--[-->Stamp element, that takes 3 rows in the top right corner<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-e6dec3">.top-right</span><span class="ct-db3ba3"> {</span></span><span class="line"><span class="ct-db3ba3">  </span><span class="ct-cabec8">grid-row</span><span class="ct-db3ba3">: </span><span class="ct-cf588b">1</span><span class="ct-db3ba3"> </span><span class="ct-d0d996">/</span><span class="ct-db3ba3"> </span><span class="ct-cf588b">3</span><span class="ct-db3ba3">; </span><span class="ct-ff566b">// height here</span></span><span class="line"><span class="ct-db3ba3">  </span><span class="ct-cabec8">grid-column</span><span class="ct-db3ba3">: </span><span class="ct-cf588b">-2</span><span class="ct-db3ba3"> / </span><span class="ct-cf588b">-1</span><span class="ct-db3ba3">; </span><span class="ct-ff566b">// width here</span></span><span class="line"><span class="ct-db3ba3">}</span></span></code></pre><!--]--></div><style>.ct-ff566b{color:#8B949E}.ct-cabec8{color:#79C0FF}.ct-f3f734{color:#FF7B72}.ct-6d144f{color:#79C0FF}.ct-9985a3{color:#FFA657}.ct-468a72{color:#79C0FF}.ct-55848a{color:#79C0FF}.ct-19a0e1{color:#79C0FF}.ct-501742{color:#C9D1D9}.ct-e6dec3{color:#79C0FF}.ct-db3ba3{color:#C9D1D9}.ct-d0d996{color:#FF7B72}.ct-cf588b{color:#79C0FF}.ct-60df50{color:#FFA657}.light .ct-60df50{color:#657B83}.light .ct-cf588b{color:#D33682}.light .ct-d0d996{color:#859900}.light .ct-db3ba3{color:#657B83}.light .ct-e6dec3{color:#93A1A1}.light .ct-501742{color:#657B83}.light .ct-19a0e1{color:#859900}.light .ct-55848a{color:#657B83}.light .ct-468a72{color:#268BD2}.light .ct-9985a3{color:#657B83}.light .ct-6d144f{color:#D33682}.light .ct-f3f734{color:#859900}.light .ct-cabec8{color:#859900}.light .ct-ff566b{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/css/automatic-grid-like-masonry-with-pure-css/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359488}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.af0f4af9.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/css/sass-nth-child-iterate-mixin/_payload.js b/css/sass-nth-child-iterate-mixin/_payload.js
index 972df7a..f8a240a 100644
--- a/css/sass-nth-child-iterate-mixin/_payload.js
+++ b/css/sass-nth-child-iterate-mixin/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:t,_path:u},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-ex7u9maCrE":{_path:u,_dir:"css",_draft:p,_partial:p,_locale:"en",_empty:p,title:t,description:"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:",excerpt:{type:v,children:[{type:a,tag:l,props:{},children:[{type:b,value:w},{type:a,tag:x,props:{},children:[{type:b,value:y}]},{type:b,value:z},{type:a,tag:A,props:{href:B,rel:[C]},children:[{type:b,value:D}]},{type:b,value:E}]},{type:a,tag:g,props:{code:q,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:b,value:q}]}]}]},{type:a,tag:l,props:{},children:[{type:b,value:F}]},{type:a,tag:g,props:{code:r,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:b,value:r}]}]}]}]},body:{type:v,children:[{type:a,tag:l,props:{},children:[{type:b,value:w},{type:a,tag:x,props:{},children:[{type:b,value:y}]},{type:b,value:z},{type:a,tag:A,props:{href:B,rel:[C]},children:[{type:b,value:D}]},{type:b,value:E}]},{type:a,tag:g,props:{code:q,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:s},children:[{type:b,value:"@mixin"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:"ct-bea120"},children:[{type:b,value:"color-per-child"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"@each"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"in"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:"ct-2afc97"},children:[{type:b,value:"&"}]},{type:a,tag:c,props:{class:"ct-ecf10f"},children:[{type:b,value:":nth-child"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"#{"}]},{type:a,tag:c,props:{class:"ct-628599"},children:[{type:b,value:"index"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"(($colors), ($color))}"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"      "}]},{type:a,tag:c,props:{class:"ct-0755e5"},children:[{type:b,value:"color"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": "}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:";"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"    }"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  }"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:M}]}]}]}]}]},{type:a,tag:l,props:{},children:[{type:b,value:F}]},{type:a,tag:g,props:{code:r,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:"ct-54686e"},children:[{type:b,value:".item"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:"ct-cec943"},children:[{type:b,value:"@include"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:"ct-0e527b"},children:[{type:b,value:"color_per_child"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:"(("}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#ded187"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#dbde87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#bade87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#9cde87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#87deaa"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:"));"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:M}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-58e517{color:#79C0FF}.ct-0e527b{color:#D2A8FF}.ct-cec943{color:#FF7B72}.ct-54686e{color:#79C0FF}.ct-0eb9c8{color:#C9D1D9}.ct-0755e5{color:#79C0FF}.ct-628599{color:#79C0FF}.ct-ecf10f{color:#79C0FF}.ct-2afc97{color:#7EE787}.ct-25f491{color:#FFA657}.ct-bea120{color:#D2A8FF}.ct-28aa2f{color:#C9D1D9}.ct-db034d{color:#FF7B72}.light .ct-db034d{color:#859900}.light .ct-28aa2f{color:#657B83}.light .ct-bea120{color:#268BD2}.light .ct-25f491{color:#657B83}.light .ct-2afc97{color:#268BD2}.light .ct-ecf10f{color:#93A1A1}.light .ct-628599{color:#268BD2}.light .ct-0755e5{color:#859900}.light .ct-0eb9c8{color:#657B83}.light .ct-54686e{color:#93A1A1}.light .ct-cec943{color:#859900}.light .ct-0e527b{color:#268BD2}.light .ct-58e517{color:#CB4B16}"}]}],toc:{title:i,searchDepth:N,depth:N,links:[]}},_type:"markdown",_id:"content:CSS:Sass nth-child iterate mixin.md",_source:"content",_file:"CSS\u002FSass nth-child iterate mixin.md",_extension:"md"}},prerenderedAt:1667812497220}}("element","text","span","ct-28aa2f","ct-0eb9c8","line","code","ct-25f491",""," ","ct-58e517","p","scss","pre",", ",false,"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n",".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","ct-db034d","Sass Nth Child Iterate Mixin","\u002Fcss\u002Fsass-nth-child-iterate-mixin","root","Say, we need to color ","code-inline","n"," items by specific colors, which depend on its position. #SCSS supports ","a","https:\u002F\u002Fsass-lang.com\u002Fdocumentation\u002Fat-rules\u002Fcontrol\u002Feach","nofollow","iteration over lists"," for that purposes:","Usage is simple:","(","$colors",") {","  ","$color"," {","}",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:t,_path:u},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-ex7u9maCrE":{_path:u,_dir:"css",_draft:p,_partial:p,_locale:"en",_empty:p,title:t,description:"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:",excerpt:{type:v,children:[{type:a,tag:l,props:{},children:[{type:b,value:w},{type:a,tag:x,props:{},children:[{type:b,value:y}]},{type:b,value:z},{type:a,tag:A,props:{href:B,rel:[C]},children:[{type:b,value:D}]},{type:b,value:E}]},{type:a,tag:g,props:{code:q,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:b,value:q}]}]}]},{type:a,tag:l,props:{},children:[{type:b,value:F}]},{type:a,tag:g,props:{code:r,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:b,value:r}]}]}]}]},body:{type:v,children:[{type:a,tag:l,props:{},children:[{type:b,value:w},{type:a,tag:x,props:{},children:[{type:b,value:y}]},{type:b,value:z},{type:a,tag:A,props:{href:B,rel:[C]},children:[{type:b,value:D}]},{type:b,value:E}]},{type:a,tag:g,props:{code:q,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:s},children:[{type:b,value:"@mixin"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:"ct-08c8db"},children:[{type:b,value:"color-per-child"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"@each"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"in"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:"ct-008a23"},children:[{type:b,value:"&"}]},{type:a,tag:c,props:{class:"ct-48488b"},children:[{type:b,value:":nth-child"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"#{"}]},{type:a,tag:c,props:{class:"ct-bf6575"},children:[{type:b,value:"index"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"(($colors), ($color))}"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"      "}]},{type:a,tag:c,props:{class:"ct-67dee1"},children:[{type:b,value:"color"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": "}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:";"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"    }"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  }"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:M}]}]}]}]}]},{type:a,tag:l,props:{},children:[{type:b,value:F}]},{type:a,tag:g,props:{code:r,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:"ct-15b6b2"},children:[{type:b,value:".item"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:"ct-f24731"},children:[{type:b,value:"@include"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:"ct-e5b384"},children:[{type:b,value:"color_per_child"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:"(("}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#ded187"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#dbde87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#bade87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#9cde87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#87deaa"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:"));"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:M}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-47d767{color:#79C0FF}.ct-e5b384{color:#D2A8FF}.ct-f24731{color:#FF7B72}.ct-15b6b2{color:#79C0FF}.ct-6df2db{color:#C9D1D9}.ct-67dee1{color:#79C0FF}.ct-bf6575{color:#79C0FF}.ct-48488b{color:#79C0FF}.ct-008a23{color:#7EE787}.ct-cbc8ea{color:#FFA657}.ct-08c8db{color:#D2A8FF}.ct-b3994d{color:#C9D1D9}.ct-45fe09{color:#FF7B72}.light .ct-45fe09{color:#859900}.light .ct-b3994d{color:#657B83}.light .ct-08c8db{color:#268BD2}.light .ct-cbc8ea{color:#657B83}.light .ct-008a23{color:#268BD2}.light .ct-48488b{color:#93A1A1}.light .ct-bf6575{color:#268BD2}.light .ct-67dee1{color:#859900}.light .ct-6df2db{color:#657B83}.light .ct-15b6b2{color:#93A1A1}.light .ct-f24731{color:#859900}.light .ct-e5b384{color:#268BD2}.light .ct-47d767{color:#CB4B16}"}]}],toc:{title:i,searchDepth:N,depth:N,links:[]}},_type:"markdown",_id:"content:CSS:Sass nth-child iterate mixin.md",_source:"content",_file:"CSS\u002FSass nth-child iterate mixin.md",_extension:"md"}},prerenderedAt:1667813359537}}("element","text","span","ct-b3994d","ct-6df2db","line","code","ct-cbc8ea",""," ","ct-47d767","p","scss","pre",", ",false,"@mixin color-per-child($colors) {\n  @each $color in $colors {\n    &:nth-child(#{index(($colors), ($color))}) {\n      color: $color;\n    }\n  }\n}\n",".item {\n  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","ct-45fe09","Sass Nth Child Iterate Mixin","\u002Fcss\u002Fsass-nth-child-iterate-mixin","root","Say, we need to color ","code-inline","n"," items by specific colors, which depend on its position. #SCSS supports ","a","https:\u002F\u002Fsass-lang.com\u002Fdocumentation\u002Fat-rules\u002Fcontrol\u002Feach","nofollow","iteration over lists"," for that purposes:","Usage is simple:","(","$colors",") {","  ","$color"," {","}",2))
\ No newline at end of file
diff --git a/css/sass-nth-child-iterate-mixin/index.html b/css/sass-nth-child-iterate-mixin/index.html
index 9e4fbb2..4e622f0 100644
--- a/css/sass-nth-child-iterate-mixin/index.html
+++ b/css/sass-nth-child-iterate-mixin/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Sass Nth Child Iterate Mixin • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:"><meta name="head:count" content="3"><link rel="modulepreload" href="/css/sass-nth-child-iterate-mixin/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Sass Nth Child Iterate Mixin • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:"><meta name="head:count" content="3"><link rel="modulepreload" href="/css/sass-nth-child-iterate-mixin/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a aria-current="page" href="/css/sass-nth-child-iterate-mixin" class="router-link-active _active_192pu_81 _link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Sass Nth Child Iterate Mixin</h1><article><div><p><!--[-->Say, we need to color <code><!--[-->n<!--]--></code> items by specific colors, which depend on its position. #SCSS supports <a href="https://sass-lang.com/documentation/at-rules/control/each" rel="nofollow" target="_blank"><!--[-->iteration over lists<!--]--></a> for that purposes:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-db034d">@mixin</span><span class="ct-28aa2f"> </span><span class="ct-bea120">color-per-child</span><span class="ct-28aa2f">(</span><span class="ct-25f491">$colors</span><span class="ct-28aa2f">) {</span></span><span class="line"><span class="ct-28aa2f">  </span><span class="ct-db034d">@each</span><span class="ct-28aa2f"> </span><span class="ct-25f491">$color</span><span class="ct-28aa2f"> </span><span class="ct-db034d">in</span><span class="ct-28aa2f"> </span><span class="ct-25f491">$colors</span><span class="ct-28aa2f"> {</span></span><span class="line"><span class="ct-28aa2f">    </span><span class="ct-2afc97">&amp;</span><span class="ct-ecf10f">:nth-child</span><span class="ct-28aa2f">(</span><span class="ct-25f491">#{</span><span class="ct-628599">index</span><span class="ct-25f491">(($colors), ($color))}</span><span class="ct-28aa2f">) {</span></span><span class="line"><span class="ct-28aa2f">      </span><span class="ct-0755e5">color</span><span class="ct-28aa2f">: </span><span class="ct-25f491">$color</span><span class="ct-28aa2f">;</span></span><span class="line"><span class="ct-0eb9c8">    }</span></span><span class="line"><span class="ct-0eb9c8">  }</span></span><span class="line"><span class="ct-0eb9c8">}</span></span></code></pre><!--]--></div><p><!--[-->Usage is simple:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-54686e">.item</span><span class="ct-0eb9c8"> {</span></span><span class="line"><span class="ct-0eb9c8">  </span><span class="ct-cec943">@include</span><span class="ct-0eb9c8"> </span><span class="ct-0e527b">color_per_child</span><span class="ct-0eb9c8">((</span><span class="ct-58e517">#ded187</span><span class="ct-0eb9c8">, </span><span class="ct-58e517">#dbde87</span><span class="ct-0eb9c8">, </span><span class="ct-58e517">#bade87</span><span class="ct-0eb9c8">, </span><span class="ct-58e517">#9cde87</span><span class="ct-0eb9c8">, </span><span class="ct-58e517">#87deaa</span><span class="ct-0eb9c8">));</span></span><span class="line"><span class="ct-0eb9c8">}</span></span></code></pre><!--]--></div><style>.ct-58e517{color:#79C0FF}.ct-0e527b{color:#D2A8FF}.ct-cec943{color:#FF7B72}.ct-54686e{color:#79C0FF}.ct-0eb9c8{color:#C9D1D9}.ct-0755e5{color:#79C0FF}.ct-628599{color:#79C0FF}.ct-ecf10f{color:#79C0FF}.ct-2afc97{color:#7EE787}.ct-25f491{color:#FFA657}.ct-bea120{color:#D2A8FF}.ct-28aa2f{color:#C9D1D9}.ct-db034d{color:#FF7B72}.light .ct-db034d{color:#859900}.light .ct-28aa2f{color:#657B83}.light .ct-bea120{color:#268BD2}.light .ct-25f491{color:#657B83}.light .ct-2afc97{color:#268BD2}.light .ct-ecf10f{color:#93A1A1}.light .ct-628599{color:#268BD2}.light .ct-0755e5{color:#859900}.light .ct-0eb9c8{color:#657B83}.light .ct-54686e{color:#93A1A1}.light .ct-cec943{color:#859900}.light .ct-0e527b{color:#268BD2}.light .ct-58e517{color:#CB4B16}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/css/sass-nth-child-iterate-mixin/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497220}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a aria-current="page" href="/css/sass-nth-child-iterate-mixin" class="router-link-active _active_192pu_81 _link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Sass Nth Child Iterate Mixin</h1><article><div><p><!--[-->Say, we need to color <code><!--[-->n<!--]--></code> items by specific colors, which depend on its position. #SCSS supports <a href="https://sass-lang.com/documentation/at-rules/control/each" rel="nofollow" target="_blank"><!--[-->iteration over lists<!--]--></a> for that purposes:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-45fe09">@mixin</span><span class="ct-b3994d"> </span><span class="ct-08c8db">color-per-child</span><span class="ct-b3994d">(</span><span class="ct-cbc8ea">$colors</span><span class="ct-b3994d">) {</span></span><span class="line"><span class="ct-b3994d">  </span><span class="ct-45fe09">@each</span><span class="ct-b3994d"> </span><span class="ct-cbc8ea">$color</span><span class="ct-b3994d"> </span><span class="ct-45fe09">in</span><span class="ct-b3994d"> </span><span class="ct-cbc8ea">$colors</span><span class="ct-b3994d"> {</span></span><span class="line"><span class="ct-b3994d">    </span><span class="ct-008a23">&amp;</span><span class="ct-48488b">:nth-child</span><span class="ct-b3994d">(</span><span class="ct-cbc8ea">#{</span><span class="ct-bf6575">index</span><span class="ct-cbc8ea">(($colors), ($color))}</span><span class="ct-b3994d">) {</span></span><span class="line"><span class="ct-b3994d">      </span><span class="ct-67dee1">color</span><span class="ct-b3994d">: </span><span class="ct-cbc8ea">$color</span><span class="ct-b3994d">;</span></span><span class="line"><span class="ct-6df2db">    }</span></span><span class="line"><span class="ct-6df2db">  }</span></span><span class="line"><span class="ct-6df2db">}</span></span></code></pre><!--]--></div><p><!--[-->Usage is simple:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-15b6b2">.item</span><span class="ct-6df2db"> {</span></span><span class="line"><span class="ct-6df2db">  </span><span class="ct-f24731">@include</span><span class="ct-6df2db"> </span><span class="ct-e5b384">color_per_child</span><span class="ct-6df2db">((</span><span class="ct-47d767">#ded187</span><span class="ct-6df2db">, </span><span class="ct-47d767">#dbde87</span><span class="ct-6df2db">, </span><span class="ct-47d767">#bade87</span><span class="ct-6df2db">, </span><span class="ct-47d767">#9cde87</span><span class="ct-6df2db">, </span><span class="ct-47d767">#87deaa</span><span class="ct-6df2db">));</span></span><span class="line"><span class="ct-6df2db">}</span></span></code></pre><!--]--></div><style>.ct-47d767{color:#79C0FF}.ct-e5b384{color:#D2A8FF}.ct-f24731{color:#FF7B72}.ct-15b6b2{color:#79C0FF}.ct-6df2db{color:#C9D1D9}.ct-67dee1{color:#79C0FF}.ct-bf6575{color:#79C0FF}.ct-48488b{color:#79C0FF}.ct-008a23{color:#7EE787}.ct-cbc8ea{color:#FFA657}.ct-08c8db{color:#D2A8FF}.ct-b3994d{color:#C9D1D9}.ct-45fe09{color:#FF7B72}.light .ct-45fe09{color:#859900}.light .ct-b3994d{color:#657B83}.light .ct-08c8db{color:#268BD2}.light .ct-cbc8ea{color:#657B83}.light .ct-008a23{color:#268BD2}.light .ct-48488b{color:#93A1A1}.light .ct-bf6575{color:#268BD2}.light .ct-67dee1{color:#859900}.light .ct-6df2db{color:#657B83}.light .ct-15b6b2{color:#93A1A1}.light .ct-f24731{color:#859900}.light .ct-e5b384{color:#268BD2}.light .ct-47d767{color:#CB4B16}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/css/sass-nth-child-iterate-mixin/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359537}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/css/test-if-browser-supports-css-rules/_payload.js b/css/test-if-browser-supports-css-rules/_payload.js
index 9f1a1f3..25c40f6 100644
--- a/css/test-if-browser-supports-css-rules/_payload.js
+++ b/css/test-if-browser-supports-css-rules/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:x,_path:y}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-OwjCJk80Rt":{_path:y,_dir:l,_draft:m,_partial:m,_locale:"en",_empty:m,title:x,description:n,excerpt:{type:z,children:[{type:a,tag:j,props:{},children:[{type:b,value:n}]},{type:a,tag:f,props:{code:o,language:l},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:b,value:o}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:A},{type:a,tag:B,props:{},children:[{type:b,value:p}]},{type:b,value:C}]},{type:a,tag:f,props:{code:q,language:D},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:b,value:q}]}]}]}]},body:{type:z,children:[{type:a,tag:j,props:{},children:[{type:b,value:n}]},{type:a,tag:f,props:{code:o,language:l},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:G},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:")) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:"ct-cfa359"},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": blur(5px);"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:A},{type:a,tag:B,props:{},children:[{type:b,value:p}]},{type:b,value:C}]},{type:a,tag:f,props:{code:q,language:D},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:"ct-673c15"},children:[{type:b,value:"can_backdrop"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:"ct-934fd2"},children:[{type:b,value:"-webkit-backdrop-filter"}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:"ct-a4496f"},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:"ct-185100"},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:"ct-620a55"},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:")) "}]},{type:a,tag:c,props:{class:"ct-f80d95"},children:[{type:b,value:"or"}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:G},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"))"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  ) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"@content"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:";"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-f80d95{color:#79C0FF}.ct-620a55{color:#FF7B72}.ct-185100{color:#79C0FF}.ct-a4496f{color:#79C0FF}.ct-934fd2{color:#79C0FF}.ct-bfa258{color:#C9D1D9}.ct-673c15{color:#D2A8FF}.ct-cfa359{color:#7EE787}.ct-643614{color:#79C0FF}.ct-57b956{color:#79C0FF}.ct-2be314{color:#79C0FF}.ct-1f3dfa{color:#C9D1D9}.ct-4c9724{color:#FF7B72}.light .ct-4c9724{color:#859900}.light .ct-1f3dfa{color:#657B83}.light .ct-2be314{color:#859900}.light .ct-57b956{color:#268BD2}.light .ct-643614{color:#D33682}.light .ct-cfa359{color:#268BD2}.light .ct-673c15{color:#268BD2}.light .ct-bfa258{color:#657B83}.light .ct-934fd2{color:#859900}.light .ct-a4496f{color:#268BD2}.light .ct-185100{color:#D33682}.light .ct-620a55{color:#859900}.light .ct-f80d95{color:#657B83}"}]}],toc:{title:h,searchDepth:N,depth:N,links:[]}},_type:"markdown",_id:"content:CSS:Test if browser supports CSS rules.md",_source:"content",_file:"CSS\u002FTest if browser supports CSS rules.md",_extension:"md"}},prerenderedAt:1667812497258}}("element","text","span","ct-1f3dfa","line","code","ct-4c9724","","ct-bfa258","p","pre","css",false,"To test if browser supports some #CSS rules, do following:","@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","@mixin","@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","backdrop-filter",": ","blur","(","5","px","Test If Browser Supports CSS Rules","\u002Fcss\u002Ftest-if-browser-supports-css-rules","root","This ","code-inline"," will only apply rule if browser support backdrop filtering:","scss","@supports"," (","ct-2be314","ct-57b956","ct-643614","    ","}"," ","    (",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:x,_path:y}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-OwjCJk80Rt":{_path:y,_dir:l,_draft:m,_partial:m,_locale:"en",_empty:m,title:x,description:n,excerpt:{type:z,children:[{type:a,tag:j,props:{},children:[{type:b,value:n}]},{type:a,tag:f,props:{code:o,language:l},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:b,value:o}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:A},{type:a,tag:B,props:{},children:[{type:b,value:p}]},{type:b,value:C}]},{type:a,tag:f,props:{code:q,language:D},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:b,value:q}]}]}]}]},body:{type:z,children:[{type:a,tag:j,props:{},children:[{type:b,value:n}]},{type:a,tag:f,props:{code:o,language:l},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:G},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:")) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:"ct-a2e8fa"},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": blur(5px);"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:A},{type:a,tag:B,props:{},children:[{type:b,value:p}]},{type:b,value:C}]},{type:a,tag:f,props:{code:q,language:D},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:"ct-d92fbb"},children:[{type:b,value:"can_backdrop"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:"ct-389c2d"},children:[{type:b,value:"-webkit-backdrop-filter"}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:"ct-852845"},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:"ct-c3ae60"},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:"ct-fde8f9"},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:")) "}]},{type:a,tag:c,props:{class:"ct-ecf355"},children:[{type:b,value:"or"}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:G},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"))"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  ) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"@content"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:";"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-ecf355{color:#79C0FF}.ct-fde8f9{color:#FF7B72}.ct-c3ae60{color:#79C0FF}.ct-852845{color:#79C0FF}.ct-389c2d{color:#79C0FF}.ct-4a352c{color:#C9D1D9}.ct-d92fbb{color:#D2A8FF}.ct-a2e8fa{color:#7EE787}.ct-846a54{color:#79C0FF}.ct-779814{color:#79C0FF}.ct-9b82ea{color:#79C0FF}.ct-924852{color:#C9D1D9}.ct-0285b8{color:#FF7B72}.light .ct-0285b8{color:#859900}.light .ct-924852{color:#657B83}.light .ct-9b82ea{color:#859900}.light .ct-779814{color:#268BD2}.light .ct-846a54{color:#D33682}.light .ct-a2e8fa{color:#268BD2}.light .ct-d92fbb{color:#268BD2}.light .ct-4a352c{color:#657B83}.light .ct-389c2d{color:#859900}.light .ct-852845{color:#268BD2}.light .ct-c3ae60{color:#D33682}.light .ct-fde8f9{color:#859900}.light .ct-ecf355{color:#657B83}"}]}],toc:{title:h,searchDepth:N,depth:N,links:[]}},_type:"markdown",_id:"content:CSS:Test if browser supports CSS rules.md",_source:"content",_file:"CSS\u002FTest if browser supports CSS rules.md",_extension:"md"}},prerenderedAt:1667813359572}}("element","text","span","ct-924852","line","code","ct-0285b8","","ct-4a352c","p","pre","css",false,"To test if browser supports some #CSS rules, do following:","@supports (backdrop-filter: blur(5px)) {\n    backdrop-filter: blur(5px);\n}\n","@mixin","@mixin can_backdrop {\n  @supports (\n    (-webkit-backdrop-filter: blur(5px)) or \n    (backdrop-filter: blur(5px))\n  ) {\n    @content;\n  }\n}\n","backdrop-filter",": ","blur","(","5","px","Test If Browser Supports CSS Rules","\u002Fcss\u002Ftest-if-browser-supports-css-rules","root","This ","code-inline"," will only apply rule if browser support backdrop filtering:","scss","@supports"," (","ct-9b82ea","ct-779814","ct-846a54","    ","}"," ","    (",2))
\ No newline at end of file
diff --git a/css/test-if-browser-supports-css-rules/index.html b/css/test-if-browser-supports-css-rules/index.html
index 1db40a4..ec5fbf1 100644
--- a/css/test-if-browser-supports-css-rules/index.html
+++ b/css/test-if-browser-supports-css-rules/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Test If Browser Supports CSS Rules • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="To test if browser supports some #CSS rules, do following:"><meta name="head:count" content="3"><link rel="modulepreload" href="/css/test-if-browser-supports-css-rules/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Test If Browser Supports CSS Rules • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="To test if browser supports some #CSS rules, do following:"><meta name="head:count" content="3"><link rel="modulepreload" href="/css/test-if-browser-supports-css-rules/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a aria-current="page" href="/css/test-if-browser-supports-css-rules" class="router-link-active _active_192pu_81 _link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Test If Browser Supports CSS Rules</h1><article><div><p><!--[-->To test if browser supports some #CSS rules, do following:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>css</span></button><!--[--><pre><code><span class="line"><span class="ct-4c9724">@supports</span><span class="ct-1f3dfa"> (</span><span class="ct-2be314">backdrop-filter</span><span class="ct-1f3dfa">: </span><span class="ct-57b956">blur</span><span class="ct-1f3dfa">(</span><span class="ct-643614">5</span><span class="ct-4c9724">px</span><span class="ct-1f3dfa">)) {</span></span><span class="line"><span class="ct-1f3dfa">    </span><span class="ct-cfa359">backdrop-filter</span><span class="ct-1f3dfa">: blur(5px);</span></span><span class="line"><span class="ct-1f3dfa">}</span></span></code></pre><!--]--></div><p><!--[-->This <code><!--[-->@mixin<!--]--></code> will only apply rule if browser support backdrop filtering:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-4c9724">@mixin</span><span class="ct-1f3dfa"> </span><span class="ct-673c15">can_backdrop</span><span class="ct-1f3dfa"> {</span></span><span class="line"><span class="ct-1f3dfa">  </span><span class="ct-4c9724">@supports</span><span class="ct-1f3dfa"> (</span></span><span class="line"><span class="ct-bfa258">    (</span><span class="ct-934fd2">-webkit-backdrop-filter</span><span class="ct-bfa258">: </span><span class="ct-a4496f">blur</span><span class="ct-bfa258">(</span><span class="ct-185100">5</span><span class="ct-620a55">px</span><span class="ct-bfa258">)) </span><span class="ct-f80d95">or</span><span class="ct-bfa258"> </span></span><span class="line"><span class="ct-1f3dfa">    (</span><span class="ct-2be314">backdrop-filter</span><span class="ct-1f3dfa">: </span><span class="ct-57b956">blur</span><span class="ct-1f3dfa">(</span><span class="ct-643614">5</span><span class="ct-4c9724">px</span><span class="ct-1f3dfa">))</span></span><span class="line"><span class="ct-1f3dfa">  ) {</span></span><span class="line"><span class="ct-1f3dfa">    </span><span class="ct-4c9724">@content</span><span class="ct-1f3dfa">;</span></span><span class="line"><span class="ct-1f3dfa">  }</span></span><span class="line"><span class="ct-1f3dfa">}</span></span></code></pre><!--]--></div><style>.ct-f80d95{color:#79C0FF}.ct-620a55{color:#FF7B72}.ct-185100{color:#79C0FF}.ct-a4496f{color:#79C0FF}.ct-934fd2{color:#79C0FF}.ct-bfa258{color:#C9D1D9}.ct-673c15{color:#D2A8FF}.ct-cfa359{color:#7EE787}.ct-643614{color:#79C0FF}.ct-57b956{color:#79C0FF}.ct-2be314{color:#79C0FF}.ct-1f3dfa{color:#C9D1D9}.ct-4c9724{color:#FF7B72}.light .ct-4c9724{color:#859900}.light .ct-1f3dfa{color:#657B83}.light .ct-2be314{color:#859900}.light .ct-57b956{color:#268BD2}.light .ct-643614{color:#D33682}.light .ct-cfa359{color:#268BD2}.light .ct-673c15{color:#268BD2}.light .ct-bfa258{color:#657B83}.light .ct-934fd2{color:#859900}.light .ct-a4496f{color:#268BD2}.light .ct-185100{color:#D33682}.light .ct-620a55{color:#859900}.light .ct-f80d95{color:#657B83}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/css/test-if-browser-supports-css-rules/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497258}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a aria-current="page" href="/css/test-if-browser-supports-css-rules" class="router-link-active _active_192pu_81 _link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Test If Browser Supports CSS Rules</h1><article><div><p><!--[-->To test if browser supports some #CSS rules, do following:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>css</span></button><!--[--><pre><code><span class="line"><span class="ct-0285b8">@supports</span><span class="ct-924852"> (</span><span class="ct-9b82ea">backdrop-filter</span><span class="ct-924852">: </span><span class="ct-779814">blur</span><span class="ct-924852">(</span><span class="ct-846a54">5</span><span class="ct-0285b8">px</span><span class="ct-924852">)) {</span></span><span class="line"><span class="ct-924852">    </span><span class="ct-a2e8fa">backdrop-filter</span><span class="ct-924852">: blur(5px);</span></span><span class="line"><span class="ct-924852">}</span></span></code></pre><!--]--></div><p><!--[-->This <code><!--[-->@mixin<!--]--></code> will only apply rule if browser support backdrop filtering:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>scss</span></button><!--[--><pre><code><span class="line"><span class="ct-0285b8">@mixin</span><span class="ct-924852"> </span><span class="ct-d92fbb">can_backdrop</span><span class="ct-924852"> {</span></span><span class="line"><span class="ct-924852">  </span><span class="ct-0285b8">@supports</span><span class="ct-924852"> (</span></span><span class="line"><span class="ct-4a352c">    (</span><span class="ct-389c2d">-webkit-backdrop-filter</span><span class="ct-4a352c">: </span><span class="ct-852845">blur</span><span class="ct-4a352c">(</span><span class="ct-c3ae60">5</span><span class="ct-fde8f9">px</span><span class="ct-4a352c">)) </span><span class="ct-ecf355">or</span><span class="ct-4a352c"> </span></span><span class="line"><span class="ct-924852">    (</span><span class="ct-9b82ea">backdrop-filter</span><span class="ct-924852">: </span><span class="ct-779814">blur</span><span class="ct-924852">(</span><span class="ct-846a54">5</span><span class="ct-0285b8">px</span><span class="ct-924852">))</span></span><span class="line"><span class="ct-924852">  ) {</span></span><span class="line"><span class="ct-924852">    </span><span class="ct-0285b8">@content</span><span class="ct-924852">;</span></span><span class="line"><span class="ct-924852">  }</span></span><span class="line"><span class="ct-924852">}</span></span></code></pre><!--]--></div><style>.ct-ecf355{color:#79C0FF}.ct-fde8f9{color:#FF7B72}.ct-c3ae60{color:#79C0FF}.ct-852845{color:#79C0FF}.ct-389c2d{color:#79C0FF}.ct-4a352c{color:#C9D1D9}.ct-d92fbb{color:#D2A8FF}.ct-a2e8fa{color:#7EE787}.ct-846a54{color:#79C0FF}.ct-779814{color:#79C0FF}.ct-9b82ea{color:#79C0FF}.ct-924852{color:#C9D1D9}.ct-0285b8{color:#FF7B72}.light .ct-0285b8{color:#859900}.light .ct-924852{color:#657B83}.light .ct-9b82ea{color:#859900}.light .ct-779814{color:#268BD2}.light .ct-846a54{color:#D33682}.light .ct-a2e8fa{color:#268BD2}.light .ct-d92fbb{color:#268BD2}.light .ct-4a352c{color:#657B83}.light .ct-389c2d{color:#859900}.light .ct-852845{color:#268BD2}.light .ct-c3ae60{color:#D33682}.light .ct-fde8f9{color:#859900}.light .ct-ecf355{color:#657B83}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/css/test-if-browser-supports-css-rules/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359572}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/building-static-pages-with-docker/_payload.js b/docker/building-static-pages-with-docker/_payload.js
index c2bb186..0ffec6b 100644
--- a/docker/building-static-pages-with-docker/_payload.js
+++ b/docker/building-static-pages-with-docker/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:h,_path:i},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-QKxL2z8jga":{_path:i,_dir:"docker",_draft:d,_partial:d,_locale:"en",_empty:d,title:h,description:e,excerpt:{type:j,children:[{type:a,tag:k,props:{},children:[{type:b,value:e}]},{type:a,tag:c,props:{code:f,language:l},children:[{type:a,tag:m,props:{},children:[{type:a,tag:c,props:{__ignoreMap:g},children:[{type:b,value:f}]}]}]}]},body:{type:j,children:[{type:a,tag:k,props:{},children:[{type:b,value:e}]},{type:a,tag:c,props:{code:f,language:l},children:[{type:a,tag:m,props:{},children:[{type:a,tag:c,props:{__ignoreMap:g},children:[{type:a,tag:n,props:{class:"line"},children:[{type:a,tag:n,props:{},children:[{type:b,value:"FROM node:16-alpine as builder\nWORKDIR \u002Fapp\nCOPY package.json yarn.lock .\u002F\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml"}]}]}]}]}]}],toc:{title:g,searchDepth:o,depth:o,links:[]}},_type:"markdown",_id:"content:Docker:Building static pages with Docker.md",_source:"content",_file:"Docker\u002FBuilding static pages with Docker.md",_extension:"md"}},prerenderedAt:1667812497306}}("element","text","code",false,"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","FROM node:16-alpine as builder\nWORKDIR \u002Fapp\nCOPY package.json yarn.lock .\u002F\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n","","Building Static Pages With Docker","\u002Fdocker\u002Fbuilding-static-pages-with-docker","root","p","Dockerfile","pre","span",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:h,_path:i},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-QKxL2z8jga":{_path:i,_dir:"docker",_draft:d,_partial:d,_locale:"en",_empty:d,title:h,description:e,excerpt:{type:j,children:[{type:a,tag:k,props:{},children:[{type:b,value:e}]},{type:a,tag:c,props:{code:f,language:l},children:[{type:a,tag:m,props:{},children:[{type:a,tag:c,props:{__ignoreMap:g},children:[{type:b,value:f}]}]}]}]},body:{type:j,children:[{type:a,tag:k,props:{},children:[{type:b,value:e}]},{type:a,tag:c,props:{code:f,language:l},children:[{type:a,tag:m,props:{},children:[{type:a,tag:c,props:{__ignoreMap:g},children:[{type:a,tag:n,props:{class:"line"},children:[{type:a,tag:n,props:{},children:[{type:b,value:"FROM node:16-alpine as builder\nWORKDIR \u002Fapp\nCOPY package.json yarn.lock .\u002F\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml"}]}]}]}]}]}],toc:{title:g,searchDepth:o,depth:o,links:[]}},_type:"markdown",_id:"content:Docker:Building static pages with Docker.md",_source:"content",_file:"Docker\u002FBuilding static pages with Docker.md",_extension:"md"}},prerenderedAt:1667813359615}}("element","text","code",false,"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","FROM node:16-alpine as builder\nWORKDIR \u002Fapp\nCOPY package.json yarn.lock .\u002F\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n","","Building Static Pages With Docker","\u002Fdocker\u002Fbuilding-static-pages-with-docker","root","p","Dockerfile","pre","span",2))
\ No newline at end of file
diff --git a/docker/building-static-pages-with-docker/index.html b/docker/building-static-pages-with-docker/index.html
index 7811a6d..cab0881 100644
--- a/docker/building-static-pages-with-docker/index.html
+++ b/docker/building-static-pages-with-docker/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Building Static Pages With Docker • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/building-static-pages-with-docker/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Building Static Pages With Docker • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/building-static-pages-with-docker/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
 <body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/docker/building-static-pages-with-docker" class="router-link-active _active_192pu_81 _link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Building Static Pages With Docker</h1><article><div><p><!--[-->Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>Dockerfile</span></button><!--[--><pre><code><span class="line"><span>FROM node:16-alpine as builder
 WORKDIR /app
@@ -12,5 +12,5 @@ COPY . .
 RUN yarn generate
 
 FROM nginx
-COPY --from=builder /app/dist /usr/share/nginx/html</span></span></code></pre><!--]--></div></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/building-static-pages-with-docker/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497306}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+COPY --from=builder /app/dist /usr/share/nginx/html</span></span></code></pre><!--]--></div></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/building-static-pages-with-docker/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359615}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/drone-ci/_payload.js b/docker/drone-ci/_payload.js
index 77a3320..c182f25 100644
--- a/docker/drone-ci/_payload.js
+++ b/docker/drone-ci/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:_,_path:$},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-uFdiCIitkN":{_path:$,_dir:aa,_draft:F,_partial:F,_locale:"en",_empty:F,title:_,description:"Can be used with Private docker registry to deploy things using #docker.",excerpt:{type:ab,children:[{type:a,tag:n,props:{},children:[{type:b,value:ac},{type:a,tag:q,props:{href:w},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:o,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:n,props:{},children:[{type:b,value:af},{type:a,tag:h,props:{},children:[{type:b,value:I}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:J}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:K}]},{type:b,value:ag},{type:a,tag:ah,props:{},children:[{type:b,value:v}]},{type:b,value:ai},{type:a,tag:h,props:{},children:[{type:b,value:L}]},{type:b,value:aj},{type:a,tag:h,props:{},children:[{type:b,value:ak}]},{type:b,value:x}]},{type:a,tag:n,props:{},children:[{type:b,value:al},{type:a,tag:h,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:q,props:{href:w},children:[{type:b,value:ao}]},{type:b,value:i}]},{type:a,tag:k,props:{code:M,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:M}]}]}]},{type:a,tag:o,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:n,props:{},children:[{type:b,value:ap},{type:a,tag:h,props:{},children:[{type:b,value:v}]},{type:b,value:aq},{type:a,tag:h,props:{},children:[{type:b,value:P}]},{type:b,value:ar}]},{type:a,tag:n,props:{},children:[{type:b,value:as},{type:a,tag:h,props:{},children:[{type:b,value:at}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:h,props:{},children:[{type:b,value:aw}]},{type:b,value:ax}]},{type:a,tag:k,props:{code:Q,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:Q}]}]}]},{type:a,tag:o,props:{id:R},children:[{type:b,value:S}]},{type:a,tag:n,props:{},children:[{type:b,value:ay},{type:a,tag:q,props:{href:az,rel:[z]},children:[{type:b,value:aA}]},{type:b,value:aB},{type:a,tag:q,props:{href:aC,rel:[z]},children:[{type:b,value:aD}]},{type:b,value:aE}]},{type:a,tag:o,props:{id:T},children:[{type:b,value:U}]},{type:a,tag:k,props:{code:V,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:V}]}]}]},{type:a,tag:o,props:{id:W},children:[{type:b,value:X}]},{type:a,tag:n,props:{},children:[{type:b,value:aF},{type:a,tag:h,props:{},children:[{type:b,value:B}]},{type:b,value:x}]},{type:a,tag:k,props:{code:Y,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:Y}]}]}]}]},body:{type:ab,children:[{type:a,tag:n,props:{},children:[{type:b,value:ac},{type:a,tag:q,props:{href:w},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:o,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:n,props:{},children:[{type:b,value:af},{type:a,tag:h,props:{},children:[{type:b,value:I}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:J}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:K}]},{type:b,value:ag},{type:a,tag:ah,props:{},children:[{type:b,value:v}]},{type:b,value:ai},{type:a,tag:h,props:{},children:[{type:b,value:L}]},{type:b,value:aj},{type:a,tag:h,props:{},children:[{type:b,value:ak}]},{type:b,value:x}]},{type:a,tag:n,props:{},children:[{type:b,value:al},{type:a,tag:h,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:q,props:{href:w},children:[{type:b,value:ao}]},{type:b,value:i}]},{type:a,tag:k,props:{code:M,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"kind"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"pipeline"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"build"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"type"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aa}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"platform"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"os"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"linux"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"arch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"amd64"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"steps"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  - "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"build-master"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"plugins\u002Fdocker"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"when"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"branch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"master"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"settings"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"dockerfile"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"Dockerfile"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"tag"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"${DRONE_BRANCH}"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"username"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"password"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"registry"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:K}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"repo"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:L}]}]}]}]}]},{type:a,tag:o,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:n,props:{},children:[{type:b,value:ap},{type:a,tag:h,props:{},children:[{type:b,value:v}]},{type:b,value:aq},{type:a,tag:h,props:{},children:[{type:b,value:P}]},{type:b,value:ar}]},{type:a,tag:n,props:{},children:[{type:b,value:as},{type:a,tag:h,props:{},children:[{type:b,value:at}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:h,props:{},children:[{type:b,value:aw}]},{type:b,value:ax}]},{type:a,tag:k,props:{code:Q,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"version"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"3\""}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"services"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:v}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone\u002Fdrone:latest"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aK}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_SERVER_HOST=drone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_SERVER_PROTO=https"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_TLS_AUTOCERT=false"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_LOGS_DEBUG=true"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_LOGS_TRACE=true"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aL}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aM}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aN}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:".\u002Fdata:\u002Fdata"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"ports"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"8090:80"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone__agent"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone\u002Fagent:latest"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"command"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"agent"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aL}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aM}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aN}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_RPC_SERVER=https:\u002F\u002Fdrone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aK}]}]}]}]}]},{type:a,tag:o,props:{id:R},children:[{type:b,value:S}]},{type:a,tag:n,props:{},children:[{type:b,value:ay},{type:a,tag:q,props:{href:az,rel:[z]},children:[{type:b,value:aA}]},{type:b,value:aB},{type:a,tag:q,props:{href:aC,rel:[z]},children:[{type:b,value:aD}]},{type:b,value:aE}]},{type:a,tag:o,props:{id:T},children:[{type:b,value:U}]},{type:a,tag:k,props:{code:V,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:aO},children:[{type:b,value:aP}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" DRONE_SERVER=https:\u002F\u002Fdrone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:aO},children:[{type:b,value:aP}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" DRONE_TOKEN=password"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"drone info"}]}]}]}]}]},{type:a,tag:o,props:{id:W},children:[{type:b,value:X}]},{type:a,tag:n,props:{},children:[{type:b,value:aF},{type:a,tag:h,props:{},children:[{type:b,value:B}]},{type:b,value:x}]},{type:a,tag:k,props:{code:Y,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"drone repo update "}]},{type:a,tag:c,props:{class:aQ},children:[{type:b,value:aR}]},{type:a,tag:c,props:{class:aS},children:[{type:b,value:B}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" --trusted=true "}]},{type:a,tag:c,props:{class:"ct-b08bd8"},children:[{type:b,value:"&&"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" drone repo info "}]},{type:a,tag:c,props:{class:aQ},children:[{type:b,value:aR}]},{type:a,tag:c,props:{class:aS},children:[{type:b,value:B}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-b08bd8{color:#FF7B72}.ct-edde8e{color:#C9D1D9}.ct-74bbe4{color:#C9D1D9}.ct-a33e40{color:#FF7B72}.ct-ec4a4f{color:#A5D6FF}.ct-16f205{color:#C9D1D9}.ct-341687{color:#7EE787}.light .ct-341687{color:#268BD2}.light .ct-16f205{color:#657B83}.light .ct-ec4a4f{color:#2AA198}.light .ct-a33e40{color:#073642}.light .ct-74bbe4{color:#859900}.light .ct-edde8e{color:#268BD2}.light .ct-b08bd8{color:#859900}"}]}],toc:{title:p,searchDepth:t,depth:t,links:[{id:G,depth:t,text:H},{id:N,depth:t,text:O},{id:R,depth:t,text:S},{id:T,depth:t,text:U},{id:W,depth:t,text:X}]}},_type:"markdown",_id:"content:Docker:Drone-ci.md",_source:"content",_file:"Docker\u002FDrone-ci.md",_extension:"md"}},prerenderedAt:1667812497341}}("element","text","span","ct-16f205","line","ct-341687","ct-ec4a4f","code-inline",":",": ","code","    ","      - ","p","h2","","a","pre","      ",2,", ","drone","Private%20docker%20registry",".","yaml","nofollow","shell","1","  ","        ","from_secret",false,"pushing-to-private-docker_registry","Pushing to private docker_registry","global_docker_login","global_docker_password","global_docker_registry","docker_repo","kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins\u002Fdocker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","docker-compose-file-for-drone-ci","Docker-compose file for drone-ci","drone-agent","version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone\u002Fdrone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - .\u002Fdata:\u002Fdata\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone\u002Fagent:latest\n    command: agent\n    restart: always\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n    environment:\n      - DRONE_RPC_SERVER=https:\u002F\u002Fdrone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","caching-builds","Caching builds","get-user-info","Get user info","export DRONE_SERVER=https:\u002F\u002Fdrone.url\nexport DRONE_TOKEN=password\ndrone info\n","mark-user-as-trusted","Mark user as trusted","drone repo update $1 --trusted=true && drone repo info $1\n","image","Drone Ci","\u002Fdocker\u002Fdrone-ci","docker","root","Can be used with ","Private docker registry"," to deploy things using #docker.","You should specify "," organizations variables in your ","strong",". And "," variable for your repo as ","docker.yourdomain.com\u002Fyour-image","This is example of  ",".droneci"," for ","private docker registry","The "," service is ui itself and "," is runner for builds, that can be started on different machine (or machines).","Change ","secret_id","rpc_secret"," and ","drone.url"," to something you like.","Haven't checked that yet, but there's a ","https:\u002F\u002Flaszlo.cloud\u002Fthe-ultimate-droneci-caching-guide","manual"," from ","https:\u002F\u002Flaszlo.cloud\u002F","Laszlo Fogas"," about that.","Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to ","name","        - ","container_name","environment","DRONE_RPC_SECRET=rpc_secret","restart","always","volumes","ct-a33e40","export","ct-74bbe4","$","ct-edde8e"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:_,_path:$},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-uFdiCIitkN":{_path:$,_dir:aa,_draft:F,_partial:F,_locale:"en",_empty:F,title:_,description:"Can be used with Private docker registry to deploy things using #docker.",excerpt:{type:ab,children:[{type:a,tag:n,props:{},children:[{type:b,value:ac},{type:a,tag:q,props:{href:w},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:o,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:n,props:{},children:[{type:b,value:af},{type:a,tag:h,props:{},children:[{type:b,value:I}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:J}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:K}]},{type:b,value:ag},{type:a,tag:ah,props:{},children:[{type:b,value:v}]},{type:b,value:ai},{type:a,tag:h,props:{},children:[{type:b,value:L}]},{type:b,value:aj},{type:a,tag:h,props:{},children:[{type:b,value:ak}]},{type:b,value:x}]},{type:a,tag:n,props:{},children:[{type:b,value:al},{type:a,tag:h,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:q,props:{href:w},children:[{type:b,value:ao}]},{type:b,value:i}]},{type:a,tag:k,props:{code:M,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:M}]}]}]},{type:a,tag:o,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:n,props:{},children:[{type:b,value:ap},{type:a,tag:h,props:{},children:[{type:b,value:v}]},{type:b,value:aq},{type:a,tag:h,props:{},children:[{type:b,value:P}]},{type:b,value:ar}]},{type:a,tag:n,props:{},children:[{type:b,value:as},{type:a,tag:h,props:{},children:[{type:b,value:at}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:h,props:{},children:[{type:b,value:aw}]},{type:b,value:ax}]},{type:a,tag:k,props:{code:Q,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:Q}]}]}]},{type:a,tag:o,props:{id:R},children:[{type:b,value:S}]},{type:a,tag:n,props:{},children:[{type:b,value:ay},{type:a,tag:q,props:{href:az,rel:[z]},children:[{type:b,value:aA}]},{type:b,value:aB},{type:a,tag:q,props:{href:aC,rel:[z]},children:[{type:b,value:aD}]},{type:b,value:aE}]},{type:a,tag:o,props:{id:T},children:[{type:b,value:U}]},{type:a,tag:k,props:{code:V,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:V}]}]}]},{type:a,tag:o,props:{id:W},children:[{type:b,value:X}]},{type:a,tag:n,props:{},children:[{type:b,value:aF},{type:a,tag:h,props:{},children:[{type:b,value:B}]},{type:b,value:x}]},{type:a,tag:k,props:{code:Y,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:Y}]}]}]}]},body:{type:ab,children:[{type:a,tag:n,props:{},children:[{type:b,value:ac},{type:a,tag:q,props:{href:w},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:o,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:n,props:{},children:[{type:b,value:af},{type:a,tag:h,props:{},children:[{type:b,value:I}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:J}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:K}]},{type:b,value:ag},{type:a,tag:ah,props:{},children:[{type:b,value:v}]},{type:b,value:ai},{type:a,tag:h,props:{},children:[{type:b,value:L}]},{type:b,value:aj},{type:a,tag:h,props:{},children:[{type:b,value:ak}]},{type:b,value:x}]},{type:a,tag:n,props:{},children:[{type:b,value:al},{type:a,tag:h,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:q,props:{href:w},children:[{type:b,value:ao}]},{type:b,value:i}]},{type:a,tag:k,props:{code:M,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"kind"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"pipeline"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"build"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"type"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aa}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"platform"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"os"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"linux"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"arch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"amd64"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"steps"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  - "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"build-master"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"plugins\u002Fdocker"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"when"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"branch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"master"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"settings"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"dockerfile"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"Dockerfile"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"tag"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"${DRONE_BRANCH}"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"username"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"password"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"registry"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:K}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"repo"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:L}]}]}]}]}]},{type:a,tag:o,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:n,props:{},children:[{type:b,value:ap},{type:a,tag:h,props:{},children:[{type:b,value:v}]},{type:b,value:aq},{type:a,tag:h,props:{},children:[{type:b,value:P}]},{type:b,value:ar}]},{type:a,tag:n,props:{},children:[{type:b,value:as},{type:a,tag:h,props:{},children:[{type:b,value:at}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:h,props:{},children:[{type:b,value:aw}]},{type:b,value:ax}]},{type:a,tag:k,props:{code:Q,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"version"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"3\""}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"services"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:v}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone\u002Fdrone:latest"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aK}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_SERVER_HOST=drone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_SERVER_PROTO=https"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_TLS_AUTOCERT=false"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_LOGS_DEBUG=true"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_LOGS_TRACE=true"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aL}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aM}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aN}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:".\u002Fdata:\u002Fdata"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"ports"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"8090:80"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone__agent"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone\u002Fagent:latest"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"command"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"agent"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aL}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aM}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aN}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_RPC_SERVER=https:\u002F\u002Fdrone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aK}]}]}]}]}]},{type:a,tag:o,props:{id:R},children:[{type:b,value:S}]},{type:a,tag:n,props:{},children:[{type:b,value:ay},{type:a,tag:q,props:{href:az,rel:[z]},children:[{type:b,value:aA}]},{type:b,value:aB},{type:a,tag:q,props:{href:aC,rel:[z]},children:[{type:b,value:aD}]},{type:b,value:aE}]},{type:a,tag:o,props:{id:T},children:[{type:b,value:U}]},{type:a,tag:k,props:{code:V,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:aO},children:[{type:b,value:aP}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" DRONE_SERVER=https:\u002F\u002Fdrone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:aO},children:[{type:b,value:aP}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" DRONE_TOKEN=password"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"drone info"}]}]}]}]}]},{type:a,tag:o,props:{id:W},children:[{type:b,value:X}]},{type:a,tag:n,props:{},children:[{type:b,value:aF},{type:a,tag:h,props:{},children:[{type:b,value:B}]},{type:b,value:x}]},{type:a,tag:k,props:{code:Y,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"drone repo update "}]},{type:a,tag:c,props:{class:aQ},children:[{type:b,value:aR}]},{type:a,tag:c,props:{class:aS},children:[{type:b,value:B}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" --trusted=true "}]},{type:a,tag:c,props:{class:"ct-d2e356"},children:[{type:b,value:"&&"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" drone repo info "}]},{type:a,tag:c,props:{class:aQ},children:[{type:b,value:aR}]},{type:a,tag:c,props:{class:aS},children:[{type:b,value:B}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-d2e356{color:#FF7B72}.ct-53bf39{color:#C9D1D9}.ct-e8532e{color:#C9D1D9}.ct-229b76{color:#FF7B72}.ct-b66a67{color:#A5D6FF}.ct-baa1fd{color:#C9D1D9}.ct-c02afb{color:#7EE787}.light .ct-c02afb{color:#268BD2}.light .ct-baa1fd{color:#657B83}.light .ct-b66a67{color:#2AA198}.light .ct-229b76{color:#073642}.light .ct-e8532e{color:#859900}.light .ct-53bf39{color:#268BD2}.light .ct-d2e356{color:#859900}"}]}],toc:{title:p,searchDepth:t,depth:t,links:[{id:G,depth:t,text:H},{id:N,depth:t,text:O},{id:R,depth:t,text:S},{id:T,depth:t,text:U},{id:W,depth:t,text:X}]}},_type:"markdown",_id:"content:Docker:Drone-ci.md",_source:"content",_file:"Docker\u002FDrone-ci.md",_extension:"md"}},prerenderedAt:1667813359650}}("element","text","span","ct-baa1fd","line","ct-c02afb","ct-b66a67","code-inline",":",": ","code","    ","      - ","p","h2","","a","pre","      ",2,", ","drone","Private%20docker%20registry",".","yaml","nofollow","shell","1","  ","        ","from_secret",false,"pushing-to-private-docker_registry","Pushing to private docker_registry","global_docker_login","global_docker_password","global_docker_registry","docker_repo","kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build-master\n    image: plugins\u002Fdocker\n    when:\n      branch:\n        - master\n    settings:\n      dockerfile: Dockerfile\n      tag:\n        - ${DRONE_BRANCH}\n      username:\n        from_secret: global_docker_login\n      password:\n        from_secret: global_docker_password\n      registry:\n        from_secret: global_docker_registry\n      repo:\n        from_secret: docker_repo\n","docker-compose-file-for-drone-ci","Docker-compose file for drone-ci","drone-agent","version: \"3\"\n\nservices:\n  drone:\n    container_name: drone\n    image: drone\u002Fdrone:latest\n    environment:\n      - DRONE_GITHUB_CLIENT_ID=secret_id\n      - DRONE_GITHUB_CLIENT_SECRET=client_secret\n      - DRONE_RPC_SECRET=rpc_secret\n      - DRONE_SERVER_HOST=drone.url\n      - DRONE_USER_CREATE=\"username:user,admin:true\"\n      - DRONE_SERVER_PROTO=https\n      - DRONE_TLS_AUTOCERT=false\n      - DRONE_GIT_ALWAYS_AUTH=false\n      - DRONE_LOGS_DEBUG=true\n      - DRONE_LOGS_TRACE=true\n    restart: always\n    volumes:\n      - .\u002Fdata:\u002Fdata\n    ports:\n      - 8090:80\n  drone-agent:\n    container_name: drone__agent\n    image: drone\u002Fagent:latest\n    command: agent\n    restart: always\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n    environment:\n      - DRONE_RPC_SERVER=https:\u002F\u002Fdrone.url\n      - DRONE_RPC_SECRET=rpc_secret\n","caching-builds","Caching builds","get-user-info","Get user info","export DRONE_SERVER=https:\u002F\u002Fdrone.url\nexport DRONE_TOKEN=password\ndrone info\n","mark-user-as-trusted","Mark user as trusted","drone repo update $1 --trusted=true && drone repo info $1\n","image","Drone Ci","\u002Fdocker\u002Fdrone-ci","docker","root","Can be used with ","Private docker registry"," to deploy things using #docker.","You should specify "," organizations variables in your ","strong",". And "," variable for your repo as ","docker.yourdomain.com\u002Fyour-image","This is example of  ",".droneci"," for ","private docker registry","The "," service is ui itself and "," is runner for builds, that can be started on different machine (or machines).","Change ","secret_id","rpc_secret"," and ","drone.url"," to something you like.","Haven't checked that yet, but there's a ","https:\u002F\u002Flaszlo.cloud\u002Fthe-ultimate-droneci-caching-guide","manual"," from ","https:\u002F\u002Flaszlo.cloud\u002F","Laszlo Fogas"," about that.","Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to ","name","        - ","container_name","environment","DRONE_RPC_SECRET=rpc_secret","restart","always","volumes","ct-229b76","export","ct-e8532e","$","ct-53bf39"))
\ No newline at end of file
diff --git a/docker/drone-ci/index.html b/docker/drone-ci/index.html
index aedfc9e..a1edb1d 100644
--- a/docker/drone-ci/index.html
+++ b/docker/drone-ci/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Drone Ci • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Can be used with Private docker registry to deploy things using #docker."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/drone-ci/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseStrong.f3ca6279.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Drone Ci • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Can be used with Private docker registry to deploy things using #docker."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/drone-ci/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseStrong.e221982f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/drone-ci" class="router-link-active _active_192pu_81 _link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Drone Ci</h1><article><div><p><!--[-->Can be used with <a href="/docker/private-docker-registry" class=""><!--[-->Private docker registry<!--]--></a> to deploy things using #docker.<!--]--></p><h2 id="pushing-to-private-docker_registry"><a href="#pushing-to-private-docker_registry"><!--[-->Pushing to private docker_registry<!--]--></a></h2><p><!--[-->You should specify <code><!--[-->global_docker_login<!--]--></code>, <code><!--[-->global_docker_password<!--]--></code>, <code><!--[-->global_docker_registry<!--]--></code> organizations variables in your <strong><!--[-->drone<!--]--></strong>. And <code><!--[-->docker_repo<!--]--></code> variable for your repo as <code><!--[-->docker.yourdomain.com/your-image<!--]--></code>.<!--]--></p><p><!--[-->This is example of  <code><!--[-->.droneci<!--]--></code> for <a href="/docker/private-docker-registry" class=""><!--[-->private docker registry<!--]--></a>:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-341687">kind</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">pipeline</span></span><span class="line"><span class="ct-341687">name</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">build</span></span><span class="line"><span class="ct-341687">type</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">docker</span></span><span class="line"></span><span class="line"><span class="ct-341687">platform</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">  </span><span class="ct-341687">os</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">linux</span></span><span class="line"><span class="ct-16f205">  </span><span class="ct-341687">arch</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">amd64</span></span><span class="line"></span><span class="line"><span class="ct-341687">steps</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">  - </span><span class="ct-341687">name</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">build-master</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">image</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">plugins/docker</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">when</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">branch</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">        - </span><span class="ct-ec4a4f">master</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">settings</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">dockerfile</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">Dockerfile</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">tag</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">        - </span><span class="ct-ec4a4f">${DRONE_BRANCH}</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">username</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">        </span><span class="ct-341687">from_secret</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">global_docker_login</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">password</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">        </span><span class="ct-341687">from_secret</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">global_docker_password</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">registry</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">        </span><span class="ct-341687">from_secret</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">global_docker_registry</span></span><span class="line"><span class="ct-16f205">      </span><span class="ct-341687">repo</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">        </span><span class="ct-341687">from_secret</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">docker_repo</span></span></code></pre><!--]--></div><h2 id="docker-compose-file-for-drone-ci"><a href="#docker-compose-file-for-drone-ci"><!--[-->Docker-compose file for drone-ci<!--]--></a></h2><p><!--[-->The <code><!--[-->drone<!--]--></code> service is ui itself and <code><!--[-->drone-agent<!--]--></code> is runner for builds, that can be started on different machine (or machines).<!--]--></p><p><!--[-->Change <code><!--[-->secret_id<!--]--></code>, <code><!--[-->rpc_secret<!--]--></code> and <code><!--[-->drone.url<!--]--></code> to something you like.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-341687">version</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">&quot;3&quot;</span></span><span class="line"></span><span class="line"><span class="ct-341687">services</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">  </span><span class="ct-341687">drone</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">container_name</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">drone</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">image</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">drone/drone:latest</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">environment</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_GITHUB_CLIENT_ID=secret_id</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_GITHUB_CLIENT_SECRET=client_secret</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_RPC_SECRET=rpc_secret</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_SERVER_HOST=drone.url</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_USER_CREATE=&quot;username:user,admin:true&quot;</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_SERVER_PROTO=https</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_TLS_AUTOCERT=false</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_GIT_ALWAYS_AUTH=false</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_LOGS_DEBUG=true</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_LOGS_TRACE=true</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">restart</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">always</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">volumes</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">./data:/data</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">ports</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">8090:80</span></span><span class="line"><span class="ct-16f205">  </span><span class="ct-341687">drone-agent</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">container_name</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">drone__agent</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">image</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">drone/agent:latest</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">command</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">agent</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">restart</span><span class="ct-16f205">: </span><span class="ct-ec4a4f">always</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">volumes</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">/var/run/docker.sock:/var/run/docker.sock</span></span><span class="line"><span class="ct-16f205">    </span><span class="ct-341687">environment</span><span class="ct-16f205">:</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_RPC_SERVER=https://drone.url</span></span><span class="line"><span class="ct-16f205">      - </span><span class="ct-ec4a4f">DRONE_RPC_SECRET=rpc_secret</span></span></code></pre><!--]--></div><h2 id="caching-builds"><a href="#caching-builds"><!--[-->Caching builds<!--]--></a></h2><p><!--[-->Haven&#39;t checked that yet, but there&#39;s a <a href="https://laszlo.cloud/the-ultimate-droneci-caching-guide" rel="nofollow" target="_blank"><!--[-->manual<!--]--></a> from <a href="https://laszlo.cloud/" rel="nofollow" target="_blank"><!--[-->Laszlo Fogas<!--]--></a> about that.<!--]--></p><h2 id="get-user-info"><a href="#get-user-info"><!--[-->Get user info<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-a33e40">export</span><span class="ct-16f205"> DRONE_SERVER=https://drone.url</span></span><span class="line"><span class="ct-a33e40">export</span><span class="ct-16f205"> DRONE_TOKEN=password</span></span><span class="line"><span class="ct-16f205">drone info</span></span></code></pre><!--]--></div><h2 id="mark-user-as-trusted"><a href="#mark-user-as-trusted"><!--[-->Mark user as trusted<!--]--></a></h2><p><!--[-->Sometimes it won&#39;t help, then connect to drone database with sqlite and change user&#39;s trusted flag to <code><!--[-->1<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-16f205">drone repo update </span><span class="ct-74bbe4">$</span><span class="ct-edde8e">1</span><span class="ct-16f205"> --trusted=true </span><span class="ct-b08bd8">&amp;&amp;</span><span class="ct-16f205"> drone repo info </span><span class="ct-74bbe4">$</span><span class="ct-edde8e">1</span></span></code></pre><!--]--></div><style>.ct-b08bd8{color:#FF7B72}.ct-edde8e{color:#C9D1D9}.ct-74bbe4{color:#C9D1D9}.ct-a33e40{color:#FF7B72}.ct-ec4a4f{color:#A5D6FF}.ct-16f205{color:#C9D1D9}.ct-341687{color:#7EE787}.light .ct-341687{color:#268BD2}.light .ct-16f205{color:#657B83}.light .ct-ec4a4f{color:#2AA198}.light .ct-a33e40{color:#073642}.light .ct-74bbe4{color:#859900}.light .ct-edde8e{color:#268BD2}.light .ct-b08bd8{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/drone-ci/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497341}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseStrong.f3ca6279.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/drone-ci" class="router-link-active _active_192pu_81 _link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Drone Ci</h1><article><div><p><!--[-->Can be used with <a href="/docker/private-docker-registry" class=""><!--[-->Private docker registry<!--]--></a> to deploy things using #docker.<!--]--></p><h2 id="pushing-to-private-docker_registry"><a href="#pushing-to-private-docker_registry"><!--[-->Pushing to private docker_registry<!--]--></a></h2><p><!--[-->You should specify <code><!--[-->global_docker_login<!--]--></code>, <code><!--[-->global_docker_password<!--]--></code>, <code><!--[-->global_docker_registry<!--]--></code> organizations variables in your <strong><!--[-->drone<!--]--></strong>. And <code><!--[-->docker_repo<!--]--></code> variable for your repo as <code><!--[-->docker.yourdomain.com/your-image<!--]--></code>.<!--]--></p><p><!--[-->This is example of  <code><!--[-->.droneci<!--]--></code> for <a href="/docker/private-docker-registry" class=""><!--[-->private docker registry<!--]--></a>:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-c02afb">kind</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">pipeline</span></span><span class="line"><span class="ct-c02afb">name</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">build</span></span><span class="line"><span class="ct-c02afb">type</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">docker</span></span><span class="line"></span><span class="line"><span class="ct-c02afb">platform</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">  </span><span class="ct-c02afb">os</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">linux</span></span><span class="line"><span class="ct-baa1fd">  </span><span class="ct-c02afb">arch</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">amd64</span></span><span class="line"></span><span class="line"><span class="ct-c02afb">steps</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">  - </span><span class="ct-c02afb">name</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">build-master</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">image</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">plugins/docker</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">when</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">branch</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">        - </span><span class="ct-b66a67">master</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">settings</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">dockerfile</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">Dockerfile</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">tag</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">        - </span><span class="ct-b66a67">${DRONE_BRANCH}</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">username</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">        </span><span class="ct-c02afb">from_secret</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">global_docker_login</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">password</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">        </span><span class="ct-c02afb">from_secret</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">global_docker_password</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">registry</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">        </span><span class="ct-c02afb">from_secret</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">global_docker_registry</span></span><span class="line"><span class="ct-baa1fd">      </span><span class="ct-c02afb">repo</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">        </span><span class="ct-c02afb">from_secret</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">docker_repo</span></span></code></pre><!--]--></div><h2 id="docker-compose-file-for-drone-ci"><a href="#docker-compose-file-for-drone-ci"><!--[-->Docker-compose file for drone-ci<!--]--></a></h2><p><!--[-->The <code><!--[-->drone<!--]--></code> service is ui itself and <code><!--[-->drone-agent<!--]--></code> is runner for builds, that can be started on different machine (or machines).<!--]--></p><p><!--[-->Change <code><!--[-->secret_id<!--]--></code>, <code><!--[-->rpc_secret<!--]--></code> and <code><!--[-->drone.url<!--]--></code> to something you like.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-c02afb">version</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">&quot;3&quot;</span></span><span class="line"></span><span class="line"><span class="ct-c02afb">services</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">  </span><span class="ct-c02afb">drone</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">container_name</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">drone</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">image</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">drone/drone:latest</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">environment</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_GITHUB_CLIENT_ID=secret_id</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_GITHUB_CLIENT_SECRET=client_secret</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_RPC_SECRET=rpc_secret</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_SERVER_HOST=drone.url</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_USER_CREATE=&quot;username:user,admin:true&quot;</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_SERVER_PROTO=https</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_TLS_AUTOCERT=false</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_GIT_ALWAYS_AUTH=false</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_LOGS_DEBUG=true</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_LOGS_TRACE=true</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">restart</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">always</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">volumes</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">./data:/data</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">ports</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">8090:80</span></span><span class="line"><span class="ct-baa1fd">  </span><span class="ct-c02afb">drone-agent</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">container_name</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">drone__agent</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">image</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">drone/agent:latest</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">command</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">agent</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">restart</span><span class="ct-baa1fd">: </span><span class="ct-b66a67">always</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">volumes</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">/var/run/docker.sock:/var/run/docker.sock</span></span><span class="line"><span class="ct-baa1fd">    </span><span class="ct-c02afb">environment</span><span class="ct-baa1fd">:</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_RPC_SERVER=https://drone.url</span></span><span class="line"><span class="ct-baa1fd">      - </span><span class="ct-b66a67">DRONE_RPC_SECRET=rpc_secret</span></span></code></pre><!--]--></div><h2 id="caching-builds"><a href="#caching-builds"><!--[-->Caching builds<!--]--></a></h2><p><!--[-->Haven&#39;t checked that yet, but there&#39;s a <a href="https://laszlo.cloud/the-ultimate-droneci-caching-guide" rel="nofollow" target="_blank"><!--[-->manual<!--]--></a> from <a href="https://laszlo.cloud/" rel="nofollow" target="_blank"><!--[-->Laszlo Fogas<!--]--></a> about that.<!--]--></p><h2 id="get-user-info"><a href="#get-user-info"><!--[-->Get user info<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-229b76">export</span><span class="ct-baa1fd"> DRONE_SERVER=https://drone.url</span></span><span class="line"><span class="ct-229b76">export</span><span class="ct-baa1fd"> DRONE_TOKEN=password</span></span><span class="line"><span class="ct-baa1fd">drone info</span></span></code></pre><!--]--></div><h2 id="mark-user-as-trusted"><a href="#mark-user-as-trusted"><!--[-->Mark user as trusted<!--]--></a></h2><p><!--[-->Sometimes it won&#39;t help, then connect to drone database with sqlite and change user&#39;s trusted flag to <code><!--[-->1<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-baa1fd">drone repo update </span><span class="ct-e8532e">$</span><span class="ct-53bf39">1</span><span class="ct-baa1fd"> --trusted=true </span><span class="ct-d2e356">&amp;&amp;</span><span class="ct-baa1fd"> drone repo info </span><span class="ct-e8532e">$</span><span class="ct-53bf39">1</span></span></code></pre><!--]--></div><style>.ct-d2e356{color:#FF7B72}.ct-53bf39{color:#C9D1D9}.ct-e8532e{color:#C9D1D9}.ct-229b76{color:#FF7B72}.ct-b66a67{color:#A5D6FF}.ct-baa1fd{color:#C9D1D9}.ct-c02afb{color:#7EE787}.light .ct-c02afb{color:#268BD2}.light .ct-baa1fd{color:#657B83}.light .ct-b66a67{color:#2AA198}.light .ct-229b76{color:#073642}.light .ct-e8532e{color:#859900}.light .ct-53bf39{color:#268BD2}.light .ct-d2e356{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/drone-ci/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359650}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseStrong.e221982f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/github-pages-with-drone-ci/_payload.js b/docker/github-pages-with-drone-ci/_payload.js
index 251d542..30be95a 100644
--- a/docker/github-pages-with-drone-ci/_payload.js
+++ b/docker/github-pages-with-drone-ci/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:H,_path:I},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-ZOfNnzEGMw":{_path:I,_dir:J,_draft:x,_partial:x,_locale:"en",_empty:x,title:H,description:"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup.",excerpt:{type:K,children:[{type:a,tag:j,props:{},children:[{type:b,value:L},{type:a,tag:i,props:{href:p},children:[{type:b,value:p}]},{type:b,value:M},{type:a,tag:f,props:{},children:[{type:b,value:N}]},{type:b,value:O},{type:a,tag:f,props:{},children:[{type:b,value:y}]},{type:b,value:P},{type:a,tag:f,props:{},children:[{type:b,value:z}]},{type:b,value:Q},{type:a,tag:i,props:{href:R,rel:[k]},children:[{type:b,value:S}]},{type:b,value:T}]},{type:a,tag:j,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:i,props:{href:q,rel:[k]},children:[{type:b,value:q}]},{type:b,value:X},{type:a,tag:i,props:{href:r,rel:[k]},children:[{type:b,value:r}]},{type:b,value:Y}]},{type:a,tag:j,props:{},children:[{type:b,value:Z},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:s}]},{type:a,tag:j,props:{},children:[{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:ab}]},{type:a,tag:t,props:{code:A,language:ac},children:[{type:a,tag:ad,props:{},children:[{type:a,tag:t,props:{__ignoreMap:B},children:[{type:b,value:A}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:ae},{type:a,tag:f,props:{},children:[{type:b,value:af}]},{type:b,value:ag},{type:a,tag:f,props:{},children:[{type:b,value:ah}]},{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:aj}]},{type:b,value:ak}]},{type:a,tag:j,props:{},children:[{type:b,value:al},{type:a,tag:f,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:ao}]},{type:b,value:s}]},{type:a,tag:ap,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:aq,props:{},children:[{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:ar,rel:[k]},children:[{type:b,value:as}]}]},{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:at}]}]}]}]},body:{type:K,children:[{type:a,tag:j,props:{},children:[{type:b,value:L},{type:a,tag:i,props:{href:p},children:[{type:b,value:p}]},{type:b,value:M},{type:a,tag:f,props:{},children:[{type:b,value:N}]},{type:b,value:O},{type:a,tag:f,props:{},children:[{type:b,value:y}]},{type:b,value:P},{type:a,tag:f,props:{},children:[{type:b,value:z}]},{type:b,value:Q},{type:a,tag:i,props:{href:R,rel:[k]},children:[{type:b,value:S}]},{type:b,value:T}]},{type:a,tag:j,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:i,props:{href:q,rel:[k]},children:[{type:b,value:q}]},{type:b,value:X},{type:a,tag:i,props:{href:r,rel:[k]},children:[{type:b,value:r}]},{type:b,value:Y}]},{type:a,tag:j,props:{},children:[{type:b,value:Z},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:s}]},{type:a,tag:j,props:{},children:[{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:ab}]},{type:a,tag:t,props:{code:A,language:ac},children:[{type:a,tag:ad,props:{},children:[{type:a,tag:t,props:{__ignoreMap:B},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"kind"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"pipeline"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:au}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"type"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"platform"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:av}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"os"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"linux"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:av}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"arch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"amd64"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"steps"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aw}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:au}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"node:16"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"commands"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"yarn"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"yarn generate"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"rm -rf .\u002Fdocs"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"mv .\u002F.output\u002Fpublic .\u002Fdocs"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"touch .\u002Fdocs\u002F.nojekyll"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aw}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"publish"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"plugins\u002Fgh-pages"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"settings"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"target_branch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:n}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"username"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"password"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:z}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:ae},{type:a,tag:f,props:{},children:[{type:b,value:af}]},{type:b,value:ag},{type:a,tag:f,props:{},children:[{type:b,value:ah}]},{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:aj}]},{type:b,value:ak}]},{type:a,tag:j,props:{},children:[{type:b,value:al},{type:a,tag:f,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:ao}]},{type:b,value:s}]},{type:a,tag:ap,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:aq,props:{},children:[{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:ar,rel:[k]},children:[{type:b,value:as}]}]},{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:at}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-4e8a40{color:#A5D6FF}.ct-2f72e3{color:#C9D1D9}.ct-6d5714{color:#7EE787}.light .ct-6d5714{color:#268BD2}.light .ct-2f72e3{color:#657B83}.light .ct-4e8a40{color:#2AA198}"}]}],toc:{title:B,searchDepth:G,depth:G,links:[{id:C,depth:G,text:D}]}},_type:"markdown",_id:"content:Docker:Github pages with drone-ci.md",_source:"content",_file:"Docker\u002FGithub pages with drone-ci.md",_extension:"md"}},prerenderedAt:1667812497448}}("element","text","span","ct-2f72e3","line","code-inline","ct-6d5714","ct-4e8a40","a","p","nofollow",": ",":","gh-pages","      - ","Drone-ci","https:\u002F\u002Fyourname.github.io\u002F","https:\u002F\u002Fyourname.github.io\u002Frepo-name\u002F",".","code","https:\u002F\u002Fgithub.blog\u002F2009-12-29-bypassing-jekyll-on-github-pages\u002F","li","    ",false,"github_username","github_token","kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf .\u002Fdocs\n      - mv .\u002F.output\u002Fpublic .\u002Fdocs\n      - touch .\u002Fdocs\u002F.nojekyll\n  - name: publish\n    image: plugins\u002Fgh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","","additional-reading","Additional reading","name","      ",2,"Github Pages With Drone Ci","\u002Fdocker\u002Fgithub-pages-with-drone-ci","docker","root","To deploy github pages with "," you will need ",".drone.yml"," as specified below. You also should define secrets  "," and "," (get it ","https:\u002F\u002Fgithub.com\u002Fsettings\u002Ftokens","here",") in your drone's repository setup.","Github repository should be named as ","yourname.github.io"," and it could be accessed at ",". Otherwise it'll be available at ",", what you might not like.","You should create branch named "," in that repo and setup GH Pages at ","https:\u002F\u002Fgithub.com\u002F\u003Cyourusername\u003E\u002F\u003Cyourusername\u003E.github.io\u002Fsettings\u002Fpages","This config will update "," branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins.","yaml","pre","Here we're moving ",".\u002F.output\u002Fpublic"," to ",".\u002Fdocs",", because #nuxt creates symlink for ","docs"," and git can't work with that.","Also we create ",".nojekyll"," at the root of repo, so github's internal engine won't ","ignore files that start with underscore","h2","ul","https:\u002F\u002Fplugins.drone.io\u002Fplugins\u002Fgh-pages","Drone Github Pages Documentation","Bypassing Jekyll on GitHub Pages","build","  ","  - ","image","        ","from_secret"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:H,_path:I},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-ZOfNnzEGMw":{_path:I,_dir:J,_draft:x,_partial:x,_locale:"en",_empty:x,title:H,description:"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup.",excerpt:{type:K,children:[{type:a,tag:j,props:{},children:[{type:b,value:L},{type:a,tag:i,props:{href:p},children:[{type:b,value:p}]},{type:b,value:M},{type:a,tag:f,props:{},children:[{type:b,value:N}]},{type:b,value:O},{type:a,tag:f,props:{},children:[{type:b,value:y}]},{type:b,value:P},{type:a,tag:f,props:{},children:[{type:b,value:z}]},{type:b,value:Q},{type:a,tag:i,props:{href:R,rel:[k]},children:[{type:b,value:S}]},{type:b,value:T}]},{type:a,tag:j,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:i,props:{href:q,rel:[k]},children:[{type:b,value:q}]},{type:b,value:X},{type:a,tag:i,props:{href:r,rel:[k]},children:[{type:b,value:r}]},{type:b,value:Y}]},{type:a,tag:j,props:{},children:[{type:b,value:Z},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:s}]},{type:a,tag:j,props:{},children:[{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:ab}]},{type:a,tag:t,props:{code:A,language:ac},children:[{type:a,tag:ad,props:{},children:[{type:a,tag:t,props:{__ignoreMap:B},children:[{type:b,value:A}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:ae},{type:a,tag:f,props:{},children:[{type:b,value:af}]},{type:b,value:ag},{type:a,tag:f,props:{},children:[{type:b,value:ah}]},{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:aj}]},{type:b,value:ak}]},{type:a,tag:j,props:{},children:[{type:b,value:al},{type:a,tag:f,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:ao}]},{type:b,value:s}]},{type:a,tag:ap,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:aq,props:{},children:[{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:ar,rel:[k]},children:[{type:b,value:as}]}]},{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:at}]}]}]}]},body:{type:K,children:[{type:a,tag:j,props:{},children:[{type:b,value:L},{type:a,tag:i,props:{href:p},children:[{type:b,value:p}]},{type:b,value:M},{type:a,tag:f,props:{},children:[{type:b,value:N}]},{type:b,value:O},{type:a,tag:f,props:{},children:[{type:b,value:y}]},{type:b,value:P},{type:a,tag:f,props:{},children:[{type:b,value:z}]},{type:b,value:Q},{type:a,tag:i,props:{href:R,rel:[k]},children:[{type:b,value:S}]},{type:b,value:T}]},{type:a,tag:j,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:i,props:{href:q,rel:[k]},children:[{type:b,value:q}]},{type:b,value:X},{type:a,tag:i,props:{href:r,rel:[k]},children:[{type:b,value:r}]},{type:b,value:Y}]},{type:a,tag:j,props:{},children:[{type:b,value:Z},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:s}]},{type:a,tag:j,props:{},children:[{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:ab}]},{type:a,tag:t,props:{code:A,language:ac},children:[{type:a,tag:ad,props:{},children:[{type:a,tag:t,props:{__ignoreMap:B},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"kind"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"pipeline"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:au}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"type"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"platform"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:av}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"os"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"linux"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:av}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"arch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"amd64"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"steps"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aw}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:au}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"node:16"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"commands"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"yarn"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"yarn generate"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"rm -rf .\u002Fdocs"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"mv .\u002F.output\u002Fpublic .\u002Fdocs"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"touch .\u002Fdocs\u002F.nojekyll"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aw}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"publish"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"plugins\u002Fgh-pages"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"settings"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"target_branch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:n}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"username"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"password"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:z}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:ae},{type:a,tag:f,props:{},children:[{type:b,value:af}]},{type:b,value:ag},{type:a,tag:f,props:{},children:[{type:b,value:ah}]},{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:aj}]},{type:b,value:ak}]},{type:a,tag:j,props:{},children:[{type:b,value:al},{type:a,tag:f,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:ao}]},{type:b,value:s}]},{type:a,tag:ap,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:aq,props:{},children:[{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:ar,rel:[k]},children:[{type:b,value:as}]}]},{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:at}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-0342ff{color:#A5D6FF}.ct-a732cc{color:#C9D1D9}.ct-0386c3{color:#7EE787}.light .ct-0386c3{color:#268BD2}.light .ct-a732cc{color:#657B83}.light .ct-0342ff{color:#2AA198}"}]}],toc:{title:B,searchDepth:G,depth:G,links:[{id:C,depth:G,text:D}]}},_type:"markdown",_id:"content:Docker:Github pages with drone-ci.md",_source:"content",_file:"Docker\u002FGithub pages with drone-ci.md",_extension:"md"}},prerenderedAt:1667813359749}}("element","text","span","ct-a732cc","line","code-inline","ct-0386c3","ct-0342ff","a","p","nofollow",": ",":","gh-pages","      - ","Drone-ci","https:\u002F\u002Fyourname.github.io\u002F","https:\u002F\u002Fyourname.github.io\u002Frepo-name\u002F",".","code","https:\u002F\u002Fgithub.blog\u002F2009-12-29-bypassing-jekyll-on-github-pages\u002F","li","    ",false,"github_username","github_token","kind: pipeline\nname: build\ntype: docker\n\nplatform:\n  os: linux\n  arch: amd64\n\nsteps:\n  - name: build\n    image: node:16\n    commands:\n      - yarn\n      - yarn generate\n      - rm -rf .\u002Fdocs\n      - mv .\u002F.output\u002Fpublic .\u002Fdocs\n      - touch .\u002Fdocs\u002F.nojekyll\n  - name: publish\n    image: plugins\u002Fgh-pages\n    settings:\n      target_branch: gh-pages\n      username:\n        from_secret: github_username\n      password:\n        from_secret: github_token\n","","additional-reading","Additional reading","name","      ",2,"Github Pages With Drone Ci","\u002Fdocker\u002Fgithub-pages-with-drone-ci","docker","root","To deploy github pages with "," you will need ",".drone.yml"," as specified below. You also should define secrets  "," and "," (get it ","https:\u002F\u002Fgithub.com\u002Fsettings\u002Ftokens","here",") in your drone's repository setup.","Github repository should be named as ","yourname.github.io"," and it could be accessed at ",". Otherwise it'll be available at ",", what you might not like.","You should create branch named "," in that repo and setup GH Pages at ","https:\u002F\u002Fgithub.com\u002F\u003Cyourusername\u003E\u002F\u003Cyourusername\u003E.github.io\u002Fsettings\u002Fpages","This config will update "," branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins.","yaml","pre","Here we're moving ",".\u002F.output\u002Fpublic"," to ",".\u002Fdocs",", because #nuxt creates symlink for ","docs"," and git can't work with that.","Also we create ",".nojekyll"," at the root of repo, so github's internal engine won't ","ignore files that start with underscore","h2","ul","https:\u002F\u002Fplugins.drone.io\u002Fplugins\u002Fgh-pages","Drone Github Pages Documentation","Bypassing Jekyll on GitHub Pages","build","  ","  - ","image","        ","from_secret"))
\ No newline at end of file
diff --git a/docker/github-pages-with-drone-ci/index.html b/docker/github-pages-with-drone-ci/index.html
index 0f1d0df..2e784e4 100644
--- a/docker/github-pages-with-drone-ci/index.html
+++ b/docker/github-pages-with-drone-ci/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Github Pages With Drone Ci • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/github-pages-with-drone-ci/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseUl.7c14583d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.f5f48b70.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Github Pages With Drone Ci • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets  github_username and github_token (get it here) in your drone's repository setup."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/github-pages-with-drone-ci/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseUl.85dc1033.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.94808e98.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/github-pages-with-drone-ci" class="router-link-active _active_192pu_81 _link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Github Pages With Drone Ci</h1><article><div><p><!--[-->To deploy github pages with <a href="/docker/drone-ci" class=""><!--[-->Drone-ci<!--]--></a> you will need <code><!--[-->.drone.yml<!--]--></code> as specified below. You also should define secrets  <code><!--[-->github_username<!--]--></code> and <code><!--[-->github_token<!--]--></code> (get it <a href="https://github.com/settings/tokens" rel="nofollow" target="_blank"><!--[-->here<!--]--></a>) in your drone&#39;s repository setup.<!--]--></p><p><!--[-->Github repository should be named as <code><!--[-->yourname.github.io<!--]--></code> and it could be accessed at <a href="https://yourname.github.io/" rel="nofollow" target="_blank"><!--[-->https://yourname.github.io/<!--]--></a>. Otherwise it&#39;ll be available at <a href="https://yourname.github.io/repo-name/" rel="nofollow" target="_blank"><!--[-->https://yourname.github.io/repo-name/<!--]--></a>, what you might not like.<!--]--></p><p><!--[-->You should create branch named <code><!--[-->gh-pages<!--]--></code> in that repo and setup GH Pages at <code><!--[-->https://github.com/&lt;yourusername&gt;/&lt;yourusername&gt;.github.io/settings/pages<!--]--></code>.<!--]--></p><p><!--[-->This config will update <code><!--[-->gh-pages<!--]--></code> branch in your project, which will contain only generated content. I know, that&#39;s bad, but there&#39;s no better way to do that with generic drone plugins.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-6d5714">kind</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">pipeline</span></span><span class="line"><span class="ct-6d5714">name</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">build</span></span><span class="line"><span class="ct-6d5714">type</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">docker</span></span><span class="line"></span><span class="line"><span class="ct-6d5714">platform</span><span class="ct-2f72e3">:</span></span><span class="line"><span class="ct-2f72e3">  </span><span class="ct-6d5714">os</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">linux</span></span><span class="line"><span class="ct-2f72e3">  </span><span class="ct-6d5714">arch</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">amd64</span></span><span class="line"></span><span class="line"><span class="ct-6d5714">steps</span><span class="ct-2f72e3">:</span></span><span class="line"><span class="ct-2f72e3">  - </span><span class="ct-6d5714">name</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">build</span></span><span class="line"><span class="ct-2f72e3">    </span><span class="ct-6d5714">image</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">node:16</span></span><span class="line"><span class="ct-2f72e3">    </span><span class="ct-6d5714">commands</span><span class="ct-2f72e3">:</span></span><span class="line"><span class="ct-2f72e3">      - </span><span class="ct-4e8a40">yarn</span></span><span class="line"><span class="ct-2f72e3">      - </span><span class="ct-4e8a40">yarn generate</span></span><span class="line"><span class="ct-2f72e3">      - </span><span class="ct-4e8a40">rm -rf ./docs</span></span><span class="line"><span class="ct-2f72e3">      - </span><span class="ct-4e8a40">mv ./.output/public ./docs</span></span><span class="line"><span class="ct-2f72e3">      - </span><span class="ct-4e8a40">touch ./docs/.nojekyll</span></span><span class="line"><span class="ct-2f72e3">  - </span><span class="ct-6d5714">name</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">publish</span></span><span class="line"><span class="ct-2f72e3">    </span><span class="ct-6d5714">image</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">plugins/gh-pages</span></span><span class="line"><span class="ct-2f72e3">    </span><span class="ct-6d5714">settings</span><span class="ct-2f72e3">:</span></span><span class="line"><span class="ct-2f72e3">      </span><span class="ct-6d5714">target_branch</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">gh-pages</span></span><span class="line"><span class="ct-2f72e3">      </span><span class="ct-6d5714">username</span><span class="ct-2f72e3">:</span></span><span class="line"><span class="ct-2f72e3">        </span><span class="ct-6d5714">from_secret</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">github_username</span></span><span class="line"><span class="ct-2f72e3">      </span><span class="ct-6d5714">password</span><span class="ct-2f72e3">:</span></span><span class="line"><span class="ct-2f72e3">        </span><span class="ct-6d5714">from_secret</span><span class="ct-2f72e3">: </span><span class="ct-4e8a40">github_token</span></span></code></pre><!--]--></div><p><!--[-->Here we&#39;re moving <code><!--[-->./.output/public<!--]--></code> to <code><!--[-->./docs<!--]--></code>, because #nuxt creates symlink for <code><!--[-->docs<!--]--></code> and git can&#39;t work with that.<!--]--></p><p><!--[-->Also we create <code><!--[-->.nojekyll<!--]--></code> at the root of repo, so github&#39;s internal engine won&#39;t <a href="https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/" rel="nofollow" target="_blank"><!--[-->ignore files that start with underscore<!--]--></a>.<!--]--></p><h2 id="additional-reading"><a href="#additional-reading"><!--[-->Additional reading<!--]--></a></h2><ul><!--[--><li><!--[--><a href="https://plugins.drone.io/plugins/gh-pages" rel="nofollow" target="_blank"><!--[-->Drone Github Pages Documentation<!--]--></a><!--]--></li><li><!--[--><a href="https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/" rel="nofollow" target="_blank"><!--[-->Bypassing Jekyll on GitHub Pages<!--]--></a><!--]--></li><!--]--></ul><style>.ct-4e8a40{color:#A5D6FF}.ct-2f72e3{color:#C9D1D9}.ct-6d5714{color:#7EE787}.light .ct-6d5714{color:#268BD2}.light .ct-2f72e3{color:#657B83}.light .ct-4e8a40{color:#2AA198}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/github-pages-with-drone-ci/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497448}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseUl.7c14583d.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.f5f48b70.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/github-pages-with-drone-ci" class="router-link-active _active_192pu_81 _link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Github Pages With Drone Ci</h1><article><div><p><!--[-->To deploy github pages with <a href="/docker/drone-ci" class=""><!--[-->Drone-ci<!--]--></a> you will need <code><!--[-->.drone.yml<!--]--></code> as specified below. You also should define secrets  <code><!--[-->github_username<!--]--></code> and <code><!--[-->github_token<!--]--></code> (get it <a href="https://github.com/settings/tokens" rel="nofollow" target="_blank"><!--[-->here<!--]--></a>) in your drone&#39;s repository setup.<!--]--></p><p><!--[-->Github repository should be named as <code><!--[-->yourname.github.io<!--]--></code> and it could be accessed at <a href="https://yourname.github.io/" rel="nofollow" target="_blank"><!--[-->https://yourname.github.io/<!--]--></a>. Otherwise it&#39;ll be available at <a href="https://yourname.github.io/repo-name/" rel="nofollow" target="_blank"><!--[-->https://yourname.github.io/repo-name/<!--]--></a>, what you might not like.<!--]--></p><p><!--[-->You should create branch named <code><!--[-->gh-pages<!--]--></code> in that repo and setup GH Pages at <code><!--[-->https://github.com/&lt;yourusername&gt;/&lt;yourusername&gt;.github.io/settings/pages<!--]--></code>.<!--]--></p><p><!--[-->This config will update <code><!--[-->gh-pages<!--]--></code> branch in your project, which will contain only generated content. I know, that&#39;s bad, but there&#39;s no better way to do that with generic drone plugins.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-0386c3">kind</span><span class="ct-a732cc">: </span><span class="ct-0342ff">pipeline</span></span><span class="line"><span class="ct-0386c3">name</span><span class="ct-a732cc">: </span><span class="ct-0342ff">build</span></span><span class="line"><span class="ct-0386c3">type</span><span class="ct-a732cc">: </span><span class="ct-0342ff">docker</span></span><span class="line"></span><span class="line"><span class="ct-0386c3">platform</span><span class="ct-a732cc">:</span></span><span class="line"><span class="ct-a732cc">  </span><span class="ct-0386c3">os</span><span class="ct-a732cc">: </span><span class="ct-0342ff">linux</span></span><span class="line"><span class="ct-a732cc">  </span><span class="ct-0386c3">arch</span><span class="ct-a732cc">: </span><span class="ct-0342ff">amd64</span></span><span class="line"></span><span class="line"><span class="ct-0386c3">steps</span><span class="ct-a732cc">:</span></span><span class="line"><span class="ct-a732cc">  - </span><span class="ct-0386c3">name</span><span class="ct-a732cc">: </span><span class="ct-0342ff">build</span></span><span class="line"><span class="ct-a732cc">    </span><span class="ct-0386c3">image</span><span class="ct-a732cc">: </span><span class="ct-0342ff">node:16</span></span><span class="line"><span class="ct-a732cc">    </span><span class="ct-0386c3">commands</span><span class="ct-a732cc">:</span></span><span class="line"><span class="ct-a732cc">      - </span><span class="ct-0342ff">yarn</span></span><span class="line"><span class="ct-a732cc">      - </span><span class="ct-0342ff">yarn generate</span></span><span class="line"><span class="ct-a732cc">      - </span><span class="ct-0342ff">rm -rf ./docs</span></span><span class="line"><span class="ct-a732cc">      - </span><span class="ct-0342ff">mv ./.output/public ./docs</span></span><span class="line"><span class="ct-a732cc">      - </span><span class="ct-0342ff">touch ./docs/.nojekyll</span></span><span class="line"><span class="ct-a732cc">  - </span><span class="ct-0386c3">name</span><span class="ct-a732cc">: </span><span class="ct-0342ff">publish</span></span><span class="line"><span class="ct-a732cc">    </span><span class="ct-0386c3">image</span><span class="ct-a732cc">: </span><span class="ct-0342ff">plugins/gh-pages</span></span><span class="line"><span class="ct-a732cc">    </span><span class="ct-0386c3">settings</span><span class="ct-a732cc">:</span></span><span class="line"><span class="ct-a732cc">      </span><span class="ct-0386c3">target_branch</span><span class="ct-a732cc">: </span><span class="ct-0342ff">gh-pages</span></span><span class="line"><span class="ct-a732cc">      </span><span class="ct-0386c3">username</span><span class="ct-a732cc">:</span></span><span class="line"><span class="ct-a732cc">        </span><span class="ct-0386c3">from_secret</span><span class="ct-a732cc">: </span><span class="ct-0342ff">github_username</span></span><span class="line"><span class="ct-a732cc">      </span><span class="ct-0386c3">password</span><span class="ct-a732cc">:</span></span><span class="line"><span class="ct-a732cc">        </span><span class="ct-0386c3">from_secret</span><span class="ct-a732cc">: </span><span class="ct-0342ff">github_token</span></span></code></pre><!--]--></div><p><!--[-->Here we&#39;re moving <code><!--[-->./.output/public<!--]--></code> to <code><!--[-->./docs<!--]--></code>, because #nuxt creates symlink for <code><!--[-->docs<!--]--></code> and git can&#39;t work with that.<!--]--></p><p><!--[-->Also we create <code><!--[-->.nojekyll<!--]--></code> at the root of repo, so github&#39;s internal engine won&#39;t <a href="https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/" rel="nofollow" target="_blank"><!--[-->ignore files that start with underscore<!--]--></a>.<!--]--></p><h2 id="additional-reading"><a href="#additional-reading"><!--[-->Additional reading<!--]--></a></h2><ul><!--[--><li><!--[--><a href="https://plugins.drone.io/plugins/gh-pages" rel="nofollow" target="_blank"><!--[-->Drone Github Pages Documentation<!--]--></a><!--]--></li><li><!--[--><a href="https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/" rel="nofollow" target="_blank"><!--[-->Bypassing Jekyll on GitHub Pages<!--]--></a><!--]--></li><!--]--></ul><style>.ct-0342ff{color:#A5D6FF}.ct-a732cc{color:#C9D1D9}.ct-0386c3{color:#7EE787}.light .ct-0386c3{color:#268BD2}.light .ct-a732cc{color:#657B83}.light .ct-0342ff{color:#2AA198}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/github-pages-with-drone-ci/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359749}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseUl.85dc1033.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.94808e98.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/private-docker-registry/_payload.js b/docker/private-docker-registry/_payload.js
index 9956958..8de525e 100644
--- a/docker/private-docker-registry/_payload.js
+++ b/docker/private-docker-registry/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:B,_path:C},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3LsByI0Qek":{_path:C,_dir:"docker",_draft:t,_partial:t,_locale:"en",_empty:t,title:B,description:"Suitable to work with Drone-ci for hosting private #docker images.",excerpt:{type:D,children:[{type:a,tag:n,props:{},children:[{type:c,value:E},{type:a,tag:F,props:{href:p},children:[{type:c,value:p}]},{type:c,value:G}]},{type:a,tag:q,props:{id:u},children:[{type:c,value:v}]},{type:a,tag:n,props:{},children:[{type:c,value:H}]},{type:a,tag:i,props:{code:w,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:w}]}]}]},{type:a,tag:i,props:{code:x,language:I},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:x}]}]}]},{type:a,tag:q,props:{id:y},children:[{type:c,value:z}]},{type:a,tag:n,props:{},children:[{type:c,value:J}]},{type:a,tag:K,props:{},children:[{type:a,tag:L,props:{},children:[{type:c,value:M}]}]},{type:a,tag:i,props:{code:A,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:A}]}]}]}]},body:{type:D,children:[{type:a,tag:n,props:{},children:[{type:c,value:E},{type:a,tag:F,props:{href:p},children:[{type:c,value:p}]},{type:c,value:G}]},{type:a,tag:q,props:{id:u},children:[{type:c,value:v}]},{type:a,tag:n,props:{},children:[{type:c,value:H}]},{type:a,tag:i,props:{code:w,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --entrypoint htpasswd registry:2 \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  -Bbn user mypassword "}]},{type:a,tag:b,props:{class:"ct-5f875a"},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" auth\u002Fregistry.password"}]}]}]}]}]},{type:a,tag:i,props:{code:x,language:I},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"3\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"registry"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"docker__registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"registry:2"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"5000:5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH=htpasswd"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH_HTPASSWD_PATH=\u002Fauth\u002Fregistry.password"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_HTTP_SECRET=password"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"volumes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:".\u002Fregistry\u002Fauth:\u002Fauth"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:".\u002Fregistry\u002Fdata:\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"ui"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"docker__ui"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"parabuzzle\u002Fcraneoperator:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"80:80"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_HOST=registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_PORT=5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_PROTOCOL=http"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ALLOW_REGISTRY_LOGIN=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_ALLOW_DELETE=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"USERNAME=registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PASSWORD=password"}]}]}]}]}]},{type:a,tag:q,props:{id:y},children:[{type:c,value:z}]},{type:a,tag:n,props:{},children:[{type:c,value:J}]},{type:a,tag:K,props:{},children:[{type:a,tag:L,props:{},children:[{type:c,value:M}]}]},{type:a,tag:i,props:{code:A,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:W},children:[{type:c,value:"# Try this first"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --rm anoxis\u002Fregistry-cli \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  -r https:\u002F\u002Fregistry.url \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  -l user:password \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --delete \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --num 2"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:W},children:[{type:c,value:"# Then this "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"docker run -it \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -v \u002Fpath\u002Fto\u002Fregistry\u002Fdata:\u002Fregistry \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -e REGISTRY_URL=https:\u002F\u002Fregistry.url \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -e DRY_RUN="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"false\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -e REGISTRY_AUTH="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"user:password\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    mortensrasmussen\u002Fdocker-registry-manifest-cleanup"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-db26b7{color:#8B949E}.ct-f3cf32{color:#A5D6FF}.ct-95058f{color:#7EE787}.ct-5f875a{color:#FF7B72}.ct-47d708{color:#C9D1D9}.light .ct-47d708{color:#657B83}.light .ct-5f875a{color:#859900}.light .ct-95058f{color:#268BD2}.light .ct-f3cf32{color:#2AA198}.light .ct-db26b7{color:#93A1A1}"}]}],toc:{title:l,searchDepth:s,depth:s,links:[{id:u,depth:s,text:v},{id:y,depth:s,text:z}]}},_type:"markdown",_id:"content:Docker:Private docker registry.md",_source:"content",_file:"Docker\u002FPrivate docker registry.md",_extension:"md"}},prerenderedAt:1667812497505}}("element","span","text","ct-47d708","line","ct-f3cf32","ct-95058f","      - ","code","    ",":","",": ","p","pre","Drone-ci","h2","shell",2,false,"sample-docker-compose-for-custom-docker-registry","Sample docker-compose for custom docker registry","docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword \u003E auth\u002Fregistry.password\n","version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=\u002Fdata\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=\u002Fauth\u002Fregistry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - .\u002Fregistry\u002Fauth:\u002Fauth\n      - .\u002Fregistry\u002Fdata:\u002Fdata\n  ui:\n    container_name: docker__ui\n    image: parabuzzle\u002Fcraneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","squash-layers-on-registry","Squash layers on registry","# Try this first\ndocker run \\\n  --rm anoxis\u002Fregistry-cli \\\n  -r https:\u002F\u002Fregistry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v \u002Fpath\u002Fto\u002Fregistry\u002Fdata:\u002Fregistry \\\n    -e REGISTRY_URL=https:\u002F\u002Fregistry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen\u002Fdocker-registry-manifest-cleanup\n","Private Docker Registry","\u002Fdocker\u002Fprivate-docker-registry","root","Suitable to work with ","a"," for hosting private #docker images.","This one brings up private docker registry with ui. First you'll need to generate password for it:","yaml","Sometimes you need to squash all layers in docker registry to free up disk space.","ol","li","Run this command to mark oldest layers","docker run \\","  ","container_name","image","ports","    - ","restart","always","environment","ct-db26b7"," \\"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:B,_path:C},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3LsByI0Qek":{_path:C,_dir:"docker",_draft:t,_partial:t,_locale:"en",_empty:t,title:B,description:"Suitable to work with Drone-ci for hosting private #docker images.",excerpt:{type:D,children:[{type:a,tag:n,props:{},children:[{type:c,value:E},{type:a,tag:F,props:{href:p},children:[{type:c,value:p}]},{type:c,value:G}]},{type:a,tag:q,props:{id:u},children:[{type:c,value:v}]},{type:a,tag:n,props:{},children:[{type:c,value:H}]},{type:a,tag:i,props:{code:w,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:w}]}]}]},{type:a,tag:i,props:{code:x,language:I},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:x}]}]}]},{type:a,tag:q,props:{id:y},children:[{type:c,value:z}]},{type:a,tag:n,props:{},children:[{type:c,value:J}]},{type:a,tag:K,props:{},children:[{type:a,tag:L,props:{},children:[{type:c,value:M}]}]},{type:a,tag:i,props:{code:A,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:A}]}]}]}]},body:{type:D,children:[{type:a,tag:n,props:{},children:[{type:c,value:E},{type:a,tag:F,props:{href:p},children:[{type:c,value:p}]},{type:c,value:G}]},{type:a,tag:q,props:{id:u},children:[{type:c,value:v}]},{type:a,tag:n,props:{},children:[{type:c,value:H}]},{type:a,tag:i,props:{code:w,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --entrypoint htpasswd registry:2 \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  -Bbn user mypassword "}]},{type:a,tag:b,props:{class:"ct-fdaae7"},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" auth\u002Fregistry.password"}]}]}]}]}]},{type:a,tag:i,props:{code:x,language:I},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"3\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"registry"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"docker__registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"registry:2"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"5000:5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH=htpasswd"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH_HTPASSWD_PATH=\u002Fauth\u002Fregistry.password"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_HTTP_SECRET=password"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"volumes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:".\u002Fregistry\u002Fauth:\u002Fauth"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:".\u002Fregistry\u002Fdata:\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"ui"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"docker__ui"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"parabuzzle\u002Fcraneoperator:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"80:80"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_HOST=registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_PORT=5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_PROTOCOL=http"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ALLOW_REGISTRY_LOGIN=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_ALLOW_DELETE=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"USERNAME=registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PASSWORD=password"}]}]}]}]}]},{type:a,tag:q,props:{id:y},children:[{type:c,value:z}]},{type:a,tag:n,props:{},children:[{type:c,value:J}]},{type:a,tag:K,props:{},children:[{type:a,tag:L,props:{},children:[{type:c,value:M}]}]},{type:a,tag:i,props:{code:A,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:W},children:[{type:c,value:"# Try this first"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --rm anoxis\u002Fregistry-cli \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  -r https:\u002F\u002Fregistry.url \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  -l user:password \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --delete \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  --num 2"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:W},children:[{type:c,value:"# Then this "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"docker run -it \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -v \u002Fpath\u002Fto\u002Fregistry\u002Fdata:\u002Fregistry \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -e REGISTRY_URL=https:\u002F\u002Fregistry.url \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -e DRY_RUN="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"false\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    -e REGISTRY_AUTH="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"user:password\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    mortensrasmussen\u002Fdocker-registry-manifest-cleanup"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-03b34e{color:#8B949E}.ct-1825ed{color:#A5D6FF}.ct-21d1c7{color:#7EE787}.ct-fdaae7{color:#FF7B72}.ct-47328b{color:#C9D1D9}.light .ct-47328b{color:#657B83}.light .ct-fdaae7{color:#859900}.light .ct-21d1c7{color:#268BD2}.light .ct-1825ed{color:#2AA198}.light .ct-03b34e{color:#93A1A1}"}]}],toc:{title:l,searchDepth:s,depth:s,links:[{id:u,depth:s,text:v},{id:y,depth:s,text:z}]}},_type:"markdown",_id:"content:Docker:Private docker registry.md",_source:"content",_file:"Docker\u002FPrivate docker registry.md",_extension:"md"}},prerenderedAt:1667813359804}}("element","span","text","ct-47328b","line","ct-1825ed","ct-21d1c7","      - ","code","    ",":","",": ","p","pre","Drone-ci","h2","shell",2,false,"sample-docker-compose-for-custom-docker-registry","Sample docker-compose for custom docker registry","docker run \\\n  --entrypoint htpasswd registry:2 \\\n  -Bbn user mypassword \u003E auth\u002Fregistry.password\n","version: \"3\"\nservices:\n  registry:\n    container_name: docker__registry\n    image: registry:2\n    ports:\n    - 5000:5000\n    restart: always\n    environment:\n      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=\u002Fdata\n      - REGISTRY_AUTH=htpasswd\n      - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n      - REGISTRY_AUTH_HTPASSWD_PATH=\u002Fauth\u002Fregistry.password\n      - REGISTRY_HTTP_SECRET=password\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    volumes:\n      - .\u002Fregistry\u002Fauth:\u002Fauth\n      - .\u002Fregistry\u002Fdata:\u002Fdata\n  ui:\n    container_name: docker__ui\n    image: parabuzzle\u002Fcraneoperator:latest\n    ports:\n    - 80:80\n    restart: always\n    environment:\n      - REGISTRY_HOST=registry\n      - REGISTRY_PORT=5000\n      - REGISTRY_PROTOCOL=http\n      - ALLOW_REGISTRY_LOGIN=true\n      - REGISTRY_ALLOW_DELETE=true\n      - USERNAME=registry\n      - PASSWORD=password\n","squash-layers-on-registry","Squash layers on registry","# Try this first\ndocker run \\\n  --rm anoxis\u002Fregistry-cli \\\n  -r https:\u002F\u002Fregistry.url \\\n  -l user:password \\\n  --delete \\\n  --num 2\n\n# Then this \ndocker run -it \\\n    -v \u002Fpath\u002Fto\u002Fregistry\u002Fdata:\u002Fregistry \\\n    -e REGISTRY_URL=https:\u002F\u002Fregistry.url \\\n    -e DRY_RUN=\"false\" \\\n    -e REGISTRY_AUTH=\"user:password\" \\\n    mortensrasmussen\u002Fdocker-registry-manifest-cleanup\n","Private Docker Registry","\u002Fdocker\u002Fprivate-docker-registry","root","Suitable to work with ","a"," for hosting private #docker images.","This one brings up private docker registry with ui. First you'll need to generate password for it:","yaml","Sometimes you need to squash all layers in docker registry to free up disk space.","ol","li","Run this command to mark oldest layers","docker run \\","  ","container_name","image","ports","    - ","restart","always","environment","ct-03b34e"," \\"))
\ No newline at end of file
diff --git a/docker/private-docker-registry/index.html b/docker/private-docker-registry/index.html
index d2e2ea2..0a1bc47 100644
--- a/docker/private-docker-registry/index.html
+++ b/docker/private-docker-registry/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Private Docker Registry • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Suitable to work with Drone-ci for hosting private #docker images."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/private-docker-registry/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseOl.8ecd42ef.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.f5f48b70.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Private Docker Registry • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Suitable to work with Drone-ci for hosting private #docker images."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/private-docker-registry/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseOl.79cf88eb.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.94808e98.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/private-docker-registry" class="router-link-active _active_192pu_81 _link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Private Docker Registry</h1><article><div><p><!--[-->Suitable to work with <a href="/docker/drone-ci" class=""><!--[-->Drone-ci<!--]--></a> for hosting private #docker images.<!--]--></p><h2 id="sample-docker-compose-for-custom-docker-registry"><a href="#sample-docker-compose-for-custom-docker-registry"><!--[-->Sample docker-compose for custom docker registry<!--]--></a></h2><p><!--[-->This one brings up private docker registry with ui. First you&#39;ll need to generate password for it:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-47d708">docker run \</span></span><span class="line"><span class="ct-47d708">  --entrypoint htpasswd registry:2 \</span></span><span class="line"><span class="ct-47d708">  -Bbn user mypassword </span><span class="ct-5f875a">&gt;</span><span class="ct-47d708"> auth/registry.password</span></span></code></pre><!--]--></div><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-95058f">version</span><span class="ct-47d708">: </span><span class="ct-f3cf32">&quot;3&quot;</span></span><span class="line"><span class="ct-95058f">services</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">  </span><span class="ct-95058f">registry</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">container_name</span><span class="ct-47d708">: </span><span class="ct-f3cf32">docker__registry</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">image</span><span class="ct-47d708">: </span><span class="ct-f3cf32">registry:2</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">ports</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">    - </span><span class="ct-f3cf32">5000:5000</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">restart</span><span class="ct-47d708">: </span><span class="ct-f3cf32">always</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">environment</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_AUTH=htpasswd</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_AUTH_HTPASSWD_REALM=Registry</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_HTTP_SECRET=password</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_STORAGE_DELETE_ENABLED=true</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">volumes</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">./registry/auth:/auth</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">./registry/data:/data</span></span><span class="line"><span class="ct-47d708">  </span><span class="ct-95058f">ui</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">container_name</span><span class="ct-47d708">: </span><span class="ct-f3cf32">docker__ui</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">image</span><span class="ct-47d708">: </span><span class="ct-f3cf32">parabuzzle/craneoperator:latest</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">ports</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">    - </span><span class="ct-f3cf32">80:80</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">restart</span><span class="ct-47d708">: </span><span class="ct-f3cf32">always</span></span><span class="line"><span class="ct-47d708">    </span><span class="ct-95058f">environment</span><span class="ct-47d708">:</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_HOST=registry</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_PORT=5000</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_PROTOCOL=http</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">ALLOW_REGISTRY_LOGIN=true</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">REGISTRY_ALLOW_DELETE=true</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">USERNAME=registry</span></span><span class="line"><span class="ct-47d708">      - </span><span class="ct-f3cf32">PASSWORD=password</span></span></code></pre><!--]--></div><h2 id="squash-layers-on-registry"><a href="#squash-layers-on-registry"><!--[-->Squash layers on registry<!--]--></a></h2><p><!--[-->Sometimes you need to squash all layers in docker registry to free up disk space.<!--]--></p><ol><!--[--><li><!--[-->Run this command to mark oldest layers<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-db26b7"># Try this first</span></span><span class="line"><span class="ct-47d708">docker run \</span></span><span class="line"><span class="ct-47d708">  --rm anoxis/registry-cli \</span></span><span class="line"><span class="ct-47d708">  -r https://registry.url \</span></span><span class="line"><span class="ct-47d708">  -l user:password \</span></span><span class="line"><span class="ct-47d708">  --delete \</span></span><span class="line"><span class="ct-47d708">  --num 2</span></span><span class="line"></span><span class="line"><span class="ct-db26b7"># Then this </span></span><span class="line"><span class="ct-47d708">docker run -it \</span></span><span class="line"><span class="ct-47d708">    -v /path/to/registry/data:/registry \</span></span><span class="line"><span class="ct-47d708">    -e REGISTRY_URL=https://registry.url \</span></span><span class="line"><span class="ct-47d708">    -e DRY_RUN=</span><span class="ct-f3cf32">&quot;false&quot;</span><span class="ct-47d708"> \</span></span><span class="line"><span class="ct-47d708">    -e REGISTRY_AUTH=</span><span class="ct-f3cf32">&quot;user:password&quot;</span><span class="ct-47d708"> \</span></span><span class="line"><span class="ct-47d708">    mortensrasmussen/docker-registry-manifest-cleanup</span></span></code></pre><!--]--></div><style>.ct-db26b7{color:#8B949E}.ct-f3cf32{color:#A5D6FF}.ct-95058f{color:#7EE787}.ct-5f875a{color:#FF7B72}.ct-47d708{color:#C9D1D9}.light .ct-47d708{color:#657B83}.light .ct-5f875a{color:#859900}.light .ct-95058f{color:#268BD2}.light .ct-f3cf32{color:#2AA198}.light .ct-db26b7{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/private-docker-registry/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497505}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseOl.8ecd42ef.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.f5f48b70.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/private-docker-registry" class="router-link-active _active_192pu_81 _link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Private Docker Registry</h1><article><div><p><!--[-->Suitable to work with <a href="/docker/drone-ci" class=""><!--[-->Drone-ci<!--]--></a> for hosting private #docker images.<!--]--></p><h2 id="sample-docker-compose-for-custom-docker-registry"><a href="#sample-docker-compose-for-custom-docker-registry"><!--[-->Sample docker-compose for custom docker registry<!--]--></a></h2><p><!--[-->This one brings up private docker registry with ui. First you&#39;ll need to generate password for it:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-47328b">docker run \</span></span><span class="line"><span class="ct-47328b">  --entrypoint htpasswd registry:2 \</span></span><span class="line"><span class="ct-47328b">  -Bbn user mypassword </span><span class="ct-fdaae7">&gt;</span><span class="ct-47328b"> auth/registry.password</span></span></code></pre><!--]--></div><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-21d1c7">version</span><span class="ct-47328b">: </span><span class="ct-1825ed">&quot;3&quot;</span></span><span class="line"><span class="ct-21d1c7">services</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">  </span><span class="ct-21d1c7">registry</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">container_name</span><span class="ct-47328b">: </span><span class="ct-1825ed">docker__registry</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">image</span><span class="ct-47328b">: </span><span class="ct-1825ed">registry:2</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">ports</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">    - </span><span class="ct-1825ed">5000:5000</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">restart</span><span class="ct-47328b">: </span><span class="ct-1825ed">always</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">environment</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_AUTH=htpasswd</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_AUTH_HTPASSWD_REALM=Registry</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_HTTP_SECRET=password</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_STORAGE_DELETE_ENABLED=true</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">volumes</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">./registry/auth:/auth</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">./registry/data:/data</span></span><span class="line"><span class="ct-47328b">  </span><span class="ct-21d1c7">ui</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">container_name</span><span class="ct-47328b">: </span><span class="ct-1825ed">docker__ui</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">image</span><span class="ct-47328b">: </span><span class="ct-1825ed">parabuzzle/craneoperator:latest</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">ports</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">    - </span><span class="ct-1825ed">80:80</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">restart</span><span class="ct-47328b">: </span><span class="ct-1825ed">always</span></span><span class="line"><span class="ct-47328b">    </span><span class="ct-21d1c7">environment</span><span class="ct-47328b">:</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_HOST=registry</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_PORT=5000</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_PROTOCOL=http</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">ALLOW_REGISTRY_LOGIN=true</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">REGISTRY_ALLOW_DELETE=true</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">USERNAME=registry</span></span><span class="line"><span class="ct-47328b">      - </span><span class="ct-1825ed">PASSWORD=password</span></span></code></pre><!--]--></div><h2 id="squash-layers-on-registry"><a href="#squash-layers-on-registry"><!--[-->Squash layers on registry<!--]--></a></h2><p><!--[-->Sometimes you need to squash all layers in docker registry to free up disk space.<!--]--></p><ol><!--[--><li><!--[-->Run this command to mark oldest layers<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-03b34e"># Try this first</span></span><span class="line"><span class="ct-47328b">docker run \</span></span><span class="line"><span class="ct-47328b">  --rm anoxis/registry-cli \</span></span><span class="line"><span class="ct-47328b">  -r https://registry.url \</span></span><span class="line"><span class="ct-47328b">  -l user:password \</span></span><span class="line"><span class="ct-47328b">  --delete \</span></span><span class="line"><span class="ct-47328b">  --num 2</span></span><span class="line"></span><span class="line"><span class="ct-03b34e"># Then this </span></span><span class="line"><span class="ct-47328b">docker run -it \</span></span><span class="line"><span class="ct-47328b">    -v /path/to/registry/data:/registry \</span></span><span class="line"><span class="ct-47328b">    -e REGISTRY_URL=https://registry.url \</span></span><span class="line"><span class="ct-47328b">    -e DRY_RUN=</span><span class="ct-1825ed">&quot;false&quot;</span><span class="ct-47328b"> \</span></span><span class="line"><span class="ct-47328b">    -e REGISTRY_AUTH=</span><span class="ct-1825ed">&quot;user:password&quot;</span><span class="ct-47328b"> \</span></span><span class="line"><span class="ct-47328b">    mortensrasmussen/docker-registry-manifest-cleanup</span></span></code></pre><!--]--></div><style>.ct-03b34e{color:#8B949E}.ct-1825ed{color:#A5D6FF}.ct-21d1c7{color:#7EE787}.ct-fdaae7{color:#FF7B72}.ct-47328b{color:#C9D1D9}.light .ct-47328b{color:#657B83}.light .ct-fdaae7{color:#859900}.light .ct-21d1c7{color:#268BD2}.light .ct-1825ed{color:#2AA198}.light .ct-03b34e{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/private-docker-registry/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359804}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseOl.79cf88eb.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.94808e98.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/refresh-containers-on-pull/_payload.js b/docker/refresh-containers-on-pull/_payload.js
index 240c7f3..b74745c 100644
--- a/docker/refresh-containers-on-pull/_payload.js
+++ b/docker/refresh-containers-on-pull/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:t,_path:u},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-8eno4meLw0":{_path:u,_dir:"docker",_draft:n,_partial:n,_locale:"en",_empty:n,title:t,description:k,excerpt:{type:v,children:[{type:a,tag:w,props:{id:o},children:[{type:b,value:p}]},{type:a,tag:x,props:{},children:[{type:a,tag:h,props:{href:y,rel:[z]},children:[{type:b,value:A}]},{type:b,value:B},{type:a,tag:h,props:{href:C},children:[{type:b,value:D}]},{type:b,value:E},{type:a,tag:h,props:{href:l},children:[{type:b,value:l}]},{type:b,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:k},children:[{type:b,value:q}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{id:o},children:[{type:b,value:p}]},{type:a,tag:x,props:{},children:[{type:a,tag:h,props:{href:y,rel:[z]},children:[{type:b,value:A}]},{type:b,value:B},{type:a,tag:h,props:{href:C},children:[{type:b,value:D}]},{type:b,value:E},{type:a,tag:h,props:{href:l},children:[{type:b,value:l}]},{type:b,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:k},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"version"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"3\""}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"services"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"watchtower"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"container_name"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"docker__watchtower"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"image"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"v2tec\u002Fwatchtower"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"restart"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"always"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"volumes"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fhome\u002Fuser\u002F.docker\u002Fconfig.json:\u002Fconfig.json"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"command"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"--interval 60 image_1 image_2"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-427dcf{color:#A5D6FF}.ct-9a7ff4{color:#C9D1D9}.ct-675a2e{color:#7EE787}.light .ct-675a2e{color:#268BD2}.light .ct-9a7ff4{color:#657B83}.light .ct-427dcf{color:#2AA198}"}]}],toc:{title:k,searchDepth:s,depth:s,links:[{id:o,depth:s,text:p}]}},_type:"markdown",_id:"content:Docker:Refresh containers on pull.md",_source:"content",_file:"Docker\u002FRefresh containers on pull.md",_extension:"md"}},prerenderedAt:1667812497568}}("element","text","span","ct-9a7ff4","line","ct-675a2e","ct-427dcf","a",": ","    ","","Drone-ci","code",false,"setting-up-watchtower","Setting up watchtower","version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec\u002Fwatchtower\n    restart: always\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n      - \u002Fhome\u002Fuser\u002F.docker\u002Fconfig.json:\u002Fconfig.json\n    command: --interval 60 image_1 image_2\n",":",2,"Refresh Containers On Pull","\u002Fdocker\u002Frefresh-containers-on-pull","root","h2","p","https:\u002F\u002Fcontainrrr.dev\u002Fwatchtower\u002F","nofollow","Watchtower"," will automatically pull updated #docker containers. Can be used with ","Private%20docker%20registry","Private docker registry"," and ",".","yaml","pre","      - "))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:t,_path:u},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-8eno4meLw0":{_path:u,_dir:"docker",_draft:n,_partial:n,_locale:"en",_empty:n,title:t,description:k,excerpt:{type:v,children:[{type:a,tag:w,props:{id:o},children:[{type:b,value:p}]},{type:a,tag:x,props:{},children:[{type:a,tag:h,props:{href:y,rel:[z]},children:[{type:b,value:A}]},{type:b,value:B},{type:a,tag:h,props:{href:C},children:[{type:b,value:D}]},{type:b,value:E},{type:a,tag:h,props:{href:l},children:[{type:b,value:l}]},{type:b,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:k},children:[{type:b,value:q}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{id:o},children:[{type:b,value:p}]},{type:a,tag:x,props:{},children:[{type:a,tag:h,props:{href:y,rel:[z]},children:[{type:b,value:A}]},{type:b,value:B},{type:a,tag:h,props:{href:C},children:[{type:b,value:D}]},{type:b,value:E},{type:a,tag:h,props:{href:l},children:[{type:b,value:l}]},{type:b,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:k},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"version"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"3\""}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"services"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"watchtower"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"container_name"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"docker__watchtower"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"image"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"v2tec\u002Fwatchtower"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"restart"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"always"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"volumes"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fhome\u002Fuser\u002F.docker\u002Fconfig.json:\u002Fconfig.json"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"command"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"--interval 60 image_1 image_2"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-4ffe1b{color:#A5D6FF}.ct-66e287{color:#C9D1D9}.ct-f168d1{color:#7EE787}.light .ct-f168d1{color:#268BD2}.light .ct-66e287{color:#657B83}.light .ct-4ffe1b{color:#2AA198}"}]}],toc:{title:k,searchDepth:s,depth:s,links:[{id:o,depth:s,text:p}]}},_type:"markdown",_id:"content:Docker:Refresh containers on pull.md",_source:"content",_file:"Docker\u002FRefresh containers on pull.md",_extension:"md"}},prerenderedAt:1667813359869}}("element","text","span","ct-66e287","line","ct-f168d1","ct-4ffe1b","a",": ","    ","","Drone-ci","code",false,"setting-up-watchtower","Setting up watchtower","version: \"3\"\n\nservices:\n  watchtower:\n    container_name: docker__watchtower\n    image: v2tec\u002Fwatchtower\n    restart: always\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n      - \u002Fhome\u002Fuser\u002F.docker\u002Fconfig.json:\u002Fconfig.json\n    command: --interval 60 image_1 image_2\n",":",2,"Refresh Containers On Pull","\u002Fdocker\u002Frefresh-containers-on-pull","root","h2","p","https:\u002F\u002Fcontainrrr.dev\u002Fwatchtower\u002F","nofollow","Watchtower"," will automatically pull updated #docker containers. Can be used with ","Private%20docker%20registry","Private docker registry"," and ",".","yaml","pre","      - "))
\ No newline at end of file
diff --git a/docker/refresh-containers-on-pull/index.html b/docker/refresh-containers-on-pull/index.html
index b5c6e5e..b704d23 100644
--- a/docker/refresh-containers-on-pull/index.html
+++ b/docker/refresh-containers-on-pull/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Refresh Containers On Pull • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/docker/refresh-containers-on-pull/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Refresh Containers On Pull • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/docker/refresh-containers-on-pull/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/refresh-containers-on-pull" class="router-link-active _active_192pu_81 _link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Refresh Containers On Pull</h1><article><div><h2 id="setting-up-watchtower"><a href="#setting-up-watchtower"><!--[-->Setting up watchtower<!--]--></a></h2><p><!--[--><a href="https://containrrr.dev/watchtower/" rel="nofollow" target="_blank"><!--[-->Watchtower<!--]--></a> will automatically pull updated #docker containers. Can be used with <a href="/docker/private-docker-registry" class=""><!--[-->Private docker registry<!--]--></a> and <a href="/docker/drone-ci" class=""><!--[-->Drone-ci<!--]--></a>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-675a2e">version</span><span class="ct-9a7ff4">: </span><span class="ct-427dcf">&quot;3&quot;</span></span><span class="line"></span><span class="line"><span class="ct-675a2e">services</span><span class="ct-9a7ff4">:</span></span><span class="line"><span class="ct-9a7ff4">  </span><span class="ct-675a2e">watchtower</span><span class="ct-9a7ff4">:</span></span><span class="line"><span class="ct-9a7ff4">    </span><span class="ct-675a2e">container_name</span><span class="ct-9a7ff4">: </span><span class="ct-427dcf">docker__watchtower</span></span><span class="line"><span class="ct-9a7ff4">    </span><span class="ct-675a2e">image</span><span class="ct-9a7ff4">: </span><span class="ct-427dcf">v2tec/watchtower</span></span><span class="line"><span class="ct-9a7ff4">    </span><span class="ct-675a2e">restart</span><span class="ct-9a7ff4">: </span><span class="ct-427dcf">always</span></span><span class="line"><span class="ct-9a7ff4">    </span><span class="ct-675a2e">volumes</span><span class="ct-9a7ff4">:</span></span><span class="line"><span class="ct-9a7ff4">      - </span><span class="ct-427dcf">/var/run/docker.sock:/var/run/docker.sock</span></span><span class="line"><span class="ct-9a7ff4">      - </span><span class="ct-427dcf">/home/user/.docker/config.json:/config.json</span></span><span class="line"><span class="ct-9a7ff4">    </span><span class="ct-675a2e">command</span><span class="ct-9a7ff4">: </span><span class="ct-427dcf">--interval 60 image_1 image_2</span></span></code></pre><!--]--></div><style>.ct-427dcf{color:#A5D6FF}.ct-9a7ff4{color:#C9D1D9}.ct-675a2e{color:#7EE787}.light .ct-675a2e{color:#268BD2}.light .ct-9a7ff4{color:#657B83}.light .ct-427dcf{color:#2AA198}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/refresh-containers-on-pull/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497568}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/refresh-containers-on-pull" class="router-link-active _active_192pu_81 _link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Refresh Containers On Pull</h1><article><div><h2 id="setting-up-watchtower"><a href="#setting-up-watchtower"><!--[-->Setting up watchtower<!--]--></a></h2><p><!--[--><a href="https://containrrr.dev/watchtower/" rel="nofollow" target="_blank"><!--[-->Watchtower<!--]--></a> will automatically pull updated #docker containers. Can be used with <a href="/docker/private-docker-registry" class=""><!--[-->Private docker registry<!--]--></a> and <a href="/docker/drone-ci" class=""><!--[-->Drone-ci<!--]--></a>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-f168d1">version</span><span class="ct-66e287">: </span><span class="ct-4ffe1b">&quot;3&quot;</span></span><span class="line"></span><span class="line"><span class="ct-f168d1">services</span><span class="ct-66e287">:</span></span><span class="line"><span class="ct-66e287">  </span><span class="ct-f168d1">watchtower</span><span class="ct-66e287">:</span></span><span class="line"><span class="ct-66e287">    </span><span class="ct-f168d1">container_name</span><span class="ct-66e287">: </span><span class="ct-4ffe1b">docker__watchtower</span></span><span class="line"><span class="ct-66e287">    </span><span class="ct-f168d1">image</span><span class="ct-66e287">: </span><span class="ct-4ffe1b">v2tec/watchtower</span></span><span class="line"><span class="ct-66e287">    </span><span class="ct-f168d1">restart</span><span class="ct-66e287">: </span><span class="ct-4ffe1b">always</span></span><span class="line"><span class="ct-66e287">    </span><span class="ct-f168d1">volumes</span><span class="ct-66e287">:</span></span><span class="line"><span class="ct-66e287">      - </span><span class="ct-4ffe1b">/var/run/docker.sock:/var/run/docker.sock</span></span><span class="line"><span class="ct-66e287">      - </span><span class="ct-4ffe1b">/home/user/.docker/config.json:/config.json</span></span><span class="line"><span class="ct-66e287">    </span><span class="ct-f168d1">command</span><span class="ct-66e287">: </span><span class="ct-4ffe1b">--interval 60 image_1 image_2</span></span></code></pre><!--]--></div><style>.ct-4ffe1b{color:#A5D6FF}.ct-66e287{color:#C9D1D9}.ct-f168d1{color:#7EE787}.light .ct-f168d1{color:#268BD2}.light .ct-66e287{color:#657B83}.light .ct-4ffe1b{color:#2AA198}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/refresh-containers-on-pull/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359869}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/seed-dump-inside-docker/_payload.js b/docker/seed-dump-inside-docker/_payload.js
index 43d308d..e4e5614 100644
--- a/docker/seed-dump-inside-docker/_payload.js
+++ b/docker/seed-dump-inside-docker/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:o,_path:p},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-TQfPEagSjQ":{_path:p,_dir:"docker",_draft:j,_partial:j,_locale:"en",_empty:j,title:o,description:"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.",excerpt:{type:q,children:[{type:a,tag:r,props:{},children:[{type:b,value:s},{type:a,tag:t,props:{},children:[{type:b,value:u}]},{type:b,value:v},{type:a,tag:w,props:{href:x},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:i,props:{code:k,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:b,value:k}]}]}]}]},body:{type:q,children:[{type:a,tag:r,props:{},children:[{type:b,value:s},{type:a,tag:t,props:{},children:[{type:b,value:u}]},{type:b,value:v},{type:a,tag:w,props:{href:x},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:i,props:{code:k,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:C}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:"# usage: .\u002Fscript.sh \"\u002Fpath\u002Fto\u002Fdump.sql\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:C}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"DUMP_PATH="}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"1"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"CONTAINER="}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:"\"db\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"USER=root"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"PASSWORD=password"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"DB=database"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"cat "}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"DUMP_PATH"}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:"ct-99e5e1"},children:[{type:b,value:"|"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" docker "}]},{type:a,tag:c,props:{class:"ct-211c1b"},children:[{type:b,value:"exec"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" -i "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"CONTAINER"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" mysql -u"}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"USER"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" -p"}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"PASSWORD"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"DB"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-211c1b{color:#79C0FF}.ct-99e5e1{color:#FF7B72}.ct-7a6d34{color:#A5D6FF}.ct-5f8edc{color:#C9D1D9}.ct-14932b{color:#C9D1D9}.ct-5cfde0{color:#C9D1D9}.ct-fef622{color:#8B949E}.light .ct-fef622{color:#93A1A1}.light .ct-5cfde0{color:#657B83}.light .ct-14932b{color:#859900}.light .ct-5f8edc{color:#268BD2}.light .ct-7a6d34{color:#2AA198}.light .ct-99e5e1{color:#859900}.light .ct-211c1b{color:#268BD2}"}]}],toc:{title:l,searchDepth:F,depth:F,links:[]}},_type:"markdown",_id:"content:Docker:Seed dump inside docker.md",_source:"content",_file:"Docker\u002FSeed dump inside docker.md",_extension:"md"}},prerenderedAt:1667812497616}}("element","text","span","ct-5cfde0","line","ct-14932b","$","ct-5f8edc","code",false,"#####\n# usage: .\u002Fscript.sh \"\u002Fpath\u002Fto\u002Fdump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","","ct-fef622","ct-7a6d34","Seed Dump Inside Docker","\u002Fdocker\u002Fseed-dump-inside-docker","root","p","If you need to seed ","code-inline",".sql"," dump in #docker container, just run this command. Also you can try to ","a","\u002Flinux\u002FRsync%20file%20with%20SSH","rsync file with SSH"," to get it from remote host.","shell","pre","#####","\""," ",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:o,_path:p},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-TQfPEagSjQ":{_path:p,_dir:"docker",_draft:j,_partial:j,_locale:"en",_empty:j,title:o,description:"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.",excerpt:{type:q,children:[{type:a,tag:r,props:{},children:[{type:b,value:s},{type:a,tag:t,props:{},children:[{type:b,value:u}]},{type:b,value:v},{type:a,tag:w,props:{href:x},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:i,props:{code:k,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:b,value:k}]}]}]}]},body:{type:q,children:[{type:a,tag:r,props:{},children:[{type:b,value:s},{type:a,tag:t,props:{},children:[{type:b,value:u}]},{type:b,value:v},{type:a,tag:w,props:{href:x},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:i,props:{code:k,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:C}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:"# usage: .\u002Fscript.sh \"\u002Fpath\u002Fto\u002Fdump.sql\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:C}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"DUMP_PATH="}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"1"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"CONTAINER="}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:"\"db\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"USER=root"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"PASSWORD=password"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"DB=database"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"cat "}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"DUMP_PATH"}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:"ct-6ea43c"},children:[{type:b,value:"|"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" docker "}]},{type:a,tag:c,props:{class:"ct-216f2b"},children:[{type:b,value:"exec"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" -i "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"CONTAINER"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" mysql -u"}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"USER"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" -p"}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"PASSWORD"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"DB"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-216f2b{color:#79C0FF}.ct-6ea43c{color:#FF7B72}.ct-c1bb7b{color:#A5D6FF}.ct-a3bf04{color:#C9D1D9}.ct-99cdf2{color:#C9D1D9}.ct-38509b{color:#C9D1D9}.ct-90172d{color:#8B949E}.light .ct-90172d{color:#93A1A1}.light .ct-38509b{color:#657B83}.light .ct-99cdf2{color:#859900}.light .ct-a3bf04{color:#268BD2}.light .ct-c1bb7b{color:#2AA198}.light .ct-6ea43c{color:#859900}.light .ct-216f2b{color:#268BD2}"}]}],toc:{title:l,searchDepth:F,depth:F,links:[]}},_type:"markdown",_id:"content:Docker:Seed dump inside docker.md",_source:"content",_file:"Docker\u002FSeed dump inside docker.md",_extension:"md"}},prerenderedAt:1667813359912}}("element","text","span","ct-38509b","line","ct-99cdf2","$","ct-a3bf04","code",false,"#####\n# usage: .\u002Fscript.sh \"\u002Fpath\u002Fto\u002Fdump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","","ct-90172d","ct-c1bb7b","Seed Dump Inside Docker","\u002Fdocker\u002Fseed-dump-inside-docker","root","p","If you need to seed ","code-inline",".sql"," dump in #docker container, just run this command. Also you can try to ","a","\u002Flinux\u002FRsync%20file%20with%20SSH","rsync file with SSH"," to get it from remote host.","shell","pre","#####","\""," ",2))
\ No newline at end of file
diff --git a/docker/seed-dump-inside-docker/index.html b/docker/seed-dump-inside-docker/index.html
index 3c531ee..e79d8c2 100644
--- a/docker/seed-dump-inside-docker/index.html
+++ b/docker/seed-dump-inside-docker/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Seed Dump Inside Docker • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/seed-dump-inside-docker/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Seed Dump Inside Docker • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host."><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/seed-dump-inside-docker/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/seed-dump-inside-docker" class="router-link-active _active_192pu_81 _link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Seed Dump Inside Docker</h1><article><div><p><!--[-->If you need to seed <code><!--[-->.sql<!--]--></code> dump in #docker container, just run this command. Also you can try to <a href="/linux/rsync-file-with-ssh" class=""><!--[-->rsync file with SSH<!--]--></a> to get it from remote host.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-fef622">#####</span></span><span class="line"><span class="ct-fef622"># usage: ./script.sh &quot;/path/to/dump.sql&quot;</span></span><span class="line"><span class="ct-fef622">#####</span></span><span class="line"></span><span class="line"><span class="ct-5cfde0">DUMP_PATH=</span><span class="ct-14932b">$</span><span class="ct-5f8edc">1</span></span><span class="line"><span class="ct-5cfde0">CONTAINER=</span><span class="ct-7a6d34">&quot;db&quot;</span></span><span class="line"><span class="ct-5cfde0">USER=root</span></span><span class="line"><span class="ct-5cfde0">PASSWORD=password</span></span><span class="line"><span class="ct-5cfde0">DB=database</span></span><span class="line"></span><span class="line"><span class="ct-5cfde0">cat </span><span class="ct-7a6d34">&quot;</span><span class="ct-14932b">$</span><span class="ct-5f8edc">DUMP_PATH</span><span class="ct-7a6d34">&quot;</span><span class="ct-5cfde0"> </span><span class="ct-99e5e1">|</span><span class="ct-5cfde0"> docker </span><span class="ct-211c1b">exec</span><span class="ct-5cfde0"> -i </span><span class="ct-14932b">$</span><span class="ct-5f8edc">CONTAINER</span><span class="ct-5cfde0"> mysql -u</span><span class="ct-14932b">$</span><span class="ct-5f8edc">USER</span><span class="ct-5cfde0"> -p</span><span class="ct-14932b">$</span><span class="ct-5f8edc">PASSWORD</span><span class="ct-5cfde0"> </span><span class="ct-14932b">$</span><span class="ct-5f8edc">DB</span></span></code></pre><!--]--></div><style>.ct-211c1b{color:#79C0FF}.ct-99e5e1{color:#FF7B72}.ct-7a6d34{color:#A5D6FF}.ct-5f8edc{color:#C9D1D9}.ct-14932b{color:#C9D1D9}.ct-5cfde0{color:#C9D1D9}.ct-fef622{color:#8B949E}.light .ct-fef622{color:#93A1A1}.light .ct-5cfde0{color:#657B83}.light .ct-14932b{color:#859900}.light .ct-5f8edc{color:#268BD2}.light .ct-7a6d34{color:#2AA198}.light .ct-99e5e1{color:#859900}.light .ct-211c1b{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/seed-dump-inside-docker/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497616}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/seed-dump-inside-docker" class="router-link-active _active_192pu_81 _link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Seed Dump Inside Docker</h1><article><div><p><!--[-->If you need to seed <code><!--[-->.sql<!--]--></code> dump in #docker container, just run this command. Also you can try to <a href="/linux/rsync-file-with-ssh" class=""><!--[-->rsync file with SSH<!--]--></a> to get it from remote host.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-90172d">#####</span></span><span class="line"><span class="ct-90172d"># usage: ./script.sh &quot;/path/to/dump.sql&quot;</span></span><span class="line"><span class="ct-90172d">#####</span></span><span class="line"></span><span class="line"><span class="ct-38509b">DUMP_PATH=</span><span class="ct-99cdf2">$</span><span class="ct-a3bf04">1</span></span><span class="line"><span class="ct-38509b">CONTAINER=</span><span class="ct-c1bb7b">&quot;db&quot;</span></span><span class="line"><span class="ct-38509b">USER=root</span></span><span class="line"><span class="ct-38509b">PASSWORD=password</span></span><span class="line"><span class="ct-38509b">DB=database</span></span><span class="line"></span><span class="line"><span class="ct-38509b">cat </span><span class="ct-c1bb7b">&quot;</span><span class="ct-99cdf2">$</span><span class="ct-a3bf04">DUMP_PATH</span><span class="ct-c1bb7b">&quot;</span><span class="ct-38509b"> </span><span class="ct-6ea43c">|</span><span class="ct-38509b"> docker </span><span class="ct-216f2b">exec</span><span class="ct-38509b"> -i </span><span class="ct-99cdf2">$</span><span class="ct-a3bf04">CONTAINER</span><span class="ct-38509b"> mysql -u</span><span class="ct-99cdf2">$</span><span class="ct-a3bf04">USER</span><span class="ct-38509b"> -p</span><span class="ct-99cdf2">$</span><span class="ct-a3bf04">PASSWORD</span><span class="ct-38509b"> </span><span class="ct-99cdf2">$</span><span class="ct-a3bf04">DB</span></span></code></pre><!--]--></div><style>.ct-216f2b{color:#79C0FF}.ct-6ea43c{color:#FF7B72}.ct-c1bb7b{color:#A5D6FF}.ct-a3bf04{color:#C9D1D9}.ct-99cdf2{color:#C9D1D9}.ct-38509b{color:#C9D1D9}.ct-90172d{color:#8B949E}.light .ct-90172d{color:#93A1A1}.light .ct-38509b{color:#657B83}.light .ct-99cdf2{color:#859900}.light .ct-a3bf04{color:#268BD2}.light .ct-c1bb7b{color:#2AA198}.light .ct-6ea43c{color:#859900}.light .ct-216f2b{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/seed-dump-inside-docker/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359912}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/wait-for-mysql/_payload.js b/docker/wait-for-mysql/_payload.js
index 56bc759..dd0186e 100644
--- a/docker/wait-for-mysql/_payload.js
+++ b/docker/wait-for-mysql/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:z,_path:A},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-LRHpXC9dvS":{_path:A,_dir:"docker",_draft:r,_partial:r,_locale:"en",_empty:r,title:z,description:"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections",excerpt:{type:B,children:[{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:C,rel:[D]},children:[{type:c,value:E}]},{type:c,value:F}]},{type:a,tag:i,props:{},children:[{type:c,value:G}]},{type:a,tag:i,props:{},children:[{type:c,value:H},{type:a,tag:I,props:{},children:[{type:c,value:J}]},{type:c,value:K}]},{type:a,tag:n,props:{code:s,language:L},children:[{type:a,tag:M,props:{},children:[{type:a,tag:n,props:{__ignoreMap:t},children:[{type:c,value:s}]}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:N},children:[{type:c,value:O}]}]}]},body:{type:B,children:[{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:C,rel:[D]},children:[{type:c,value:E}]},{type:c,value:F}]},{type:a,tag:i,props:{},children:[{type:c,value:G}]},{type:a,tag:i,props:{},children:[{type:c,value:H},{type:a,tag:I,props:{},children:[{type:c,value:J}]},{type:c,value:K}]},{type:a,tag:n,props:{code:s,language:L},children:[{type:a,tag:M,props:{},children:[{type:a,tag:n,props:{__ignoreMap:t},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"# Waits for mysql to become actually available"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:"ct-10f0a2"},children:[{type:c,value:"wait_for_mysql"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"() {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  query="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"SELECT count(*) FROM users\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  timeout=180 "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"# 3 minutes limit"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  i=0"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"while"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" docker "}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"exec"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -it "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" mysql --user="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -e "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"query"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"do"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    sleep 1"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    i="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"$(("}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:"ct-13d7bb"},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" [[ "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"-ge"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"timeout"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]]"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"echo"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"[Error] can't properly query MySQL after "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" secs\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"exit"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" 1"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"fi"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"done"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:N},children:[{type:c,value:O}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-13d7bb{color:#79C0FF}.ct-d7d1a7{color:#C9D1D9}.ct-484fb2{color:#C9D1D9}.ct-6d1c8e{color:#79C0FF}.ct-69e703{color:#FF7B72}.ct-243af1{color:#A5D6FF}.ct-b616f9{color:#C9D1D9}.ct-10f0a2{color:#D2A8FF}.ct-2180e3{color:#8B949E}.light .ct-2180e3{color:#93A1A1}.light .ct-10f0a2{color:#268BD2}.light .ct-b616f9{color:#657B83}.light .ct-243af1{color:#2AA198}.light .ct-69e703{color:#859900}.light .ct-6d1c8e{color:#268BD2}.light .ct-484fb2{color:#859900}.light .ct-d7d1a7{color:#268BD2}.light .ct-13d7bb{color:#D33682}"}]}],toc:{title:t,searchDepth:S,depth:S,links:[]}},_type:"markdown",_id:"content:Docker:Wait for mysql.md",_source:"content",_file:"Docker\u002FWait for mysql.md",_extension:"md"}},prerenderedAt:1667812497650}}("element","span","text","ct-b616f9","line","ct-243af1","ct-69e703","ct-484fb2","p","\"","ct-d7d1a7"," ","a","code","  ","$","}",false,"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 \u003E\u002Fdev\u002Fnull 2\u003E&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","","ct-2180e3","ct-6d1c8e",";","i","${","Wait For Mysql","\u002Fdocker\u002Fwait-for-mysql","root","https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it","nofollow","wait-for-it.sh"," doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","This script waits for first successful query from database or exits with non-zero status after timeout.","Don't forget to change ","code-inline","$query"," for the actually working one.","shell","pre","Wait%20for%20redis","Wait for redis","1","    ","      ",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:z,_path:A},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-LRHpXC9dvS":{_path:A,_dir:"docker",_draft:r,_partial:r,_locale:"en",_empty:r,title:z,description:"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections",excerpt:{type:B,children:[{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:C,rel:[D]},children:[{type:c,value:E}]},{type:c,value:F}]},{type:a,tag:i,props:{},children:[{type:c,value:G}]},{type:a,tag:i,props:{},children:[{type:c,value:H},{type:a,tag:I,props:{},children:[{type:c,value:J}]},{type:c,value:K}]},{type:a,tag:n,props:{code:s,language:L},children:[{type:a,tag:M,props:{},children:[{type:a,tag:n,props:{__ignoreMap:t},children:[{type:c,value:s}]}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:N},children:[{type:c,value:O}]}]}]},body:{type:B,children:[{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:C,rel:[D]},children:[{type:c,value:E}]},{type:c,value:F}]},{type:a,tag:i,props:{},children:[{type:c,value:G}]},{type:a,tag:i,props:{},children:[{type:c,value:H},{type:a,tag:I,props:{},children:[{type:c,value:J}]},{type:c,value:K}]},{type:a,tag:n,props:{code:s,language:L},children:[{type:a,tag:M,props:{},children:[{type:a,tag:n,props:{__ignoreMap:t},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"# Waits for mysql to become actually available"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:"ct-234572"},children:[{type:c,value:"wait_for_mysql"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"() {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  query="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"SELECT count(*) FROM users\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  timeout=180 "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"# 3 minutes limit"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  i=0"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"while"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" docker "}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"exec"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -it "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" mysql --user="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -e "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"query"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"do"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    sleep 1"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    i="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"$(("}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:"ct-d4f923"},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" [[ "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"-ge"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"timeout"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]]"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"echo"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"[Error] can't properly query MySQL after "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" secs\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"exit"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" 1"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"fi"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"done"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:N},children:[{type:c,value:O}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-d4f923{color:#79C0FF}.ct-90daab{color:#C9D1D9}.ct-961af7{color:#C9D1D9}.ct-87dfaf{color:#79C0FF}.ct-d8cd50{color:#FF7B72}.ct-9844eb{color:#A5D6FF}.ct-789078{color:#C9D1D9}.ct-234572{color:#D2A8FF}.ct-593766{color:#8B949E}.light .ct-593766{color:#93A1A1}.light .ct-234572{color:#268BD2}.light .ct-789078{color:#657B83}.light .ct-9844eb{color:#2AA198}.light .ct-d8cd50{color:#859900}.light .ct-87dfaf{color:#268BD2}.light .ct-961af7{color:#859900}.light .ct-90daab{color:#268BD2}.light .ct-d4f923{color:#D33682}"}]}],toc:{title:t,searchDepth:S,depth:S,links:[]}},_type:"markdown",_id:"content:Docker:Wait for mysql.md",_source:"content",_file:"Docker\u002FWait for mysql.md",_extension:"md"}},prerenderedAt:1667813359941}}("element","span","text","ct-789078","line","ct-9844eb","ct-d8cd50","ct-961af7","p","\"","ct-90daab"," ","a","code","  ","$","}",false,"# Waits for mysql to become actually available\nwait_for_mysql() {\n  query=\"SELECT count(*) FROM users\"\n  \n  timeout=180 # 3 minutes limit\n  i=0\n  \n  while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 \u003E\u002Fdev\u002Fnull 2\u003E&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly query MySQL after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","","ct-593766","ct-87dfaf",";","i","${","Wait For Mysql","\u002Fdocker\u002Fwait-for-mysql","root","https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it","nofollow","wait-for-it.sh"," doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","This script waits for first successful query from database or exits with non-zero status after timeout.","Don't forget to change ","code-inline","$query"," for the actually working one.","shell","pre","Wait%20for%20redis","Wait for redis","1","    ","      ",2))
\ No newline at end of file
diff --git a/docker/wait-for-mysql/index.html b/docker/wait-for-mysql/index.html
index 15fa278..d594bca 100644
--- a/docker/wait-for-mysql/index.html
+++ b/docker/wait-for-mysql/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Wait For Mysql • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/wait-for-mysql/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Wait For Mysql • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/wait-for-mysql/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/wait-for-mysql" class="router-link-active _active_192pu_81 _link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Wait For Mysql</h1><article><div><p><!--[--><a href="https://github.com/vishnubob/wait-for-it" rel="nofollow" target="_blank"><!--[-->wait-for-it.sh<!--]--></a> doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections<!--]--></p><p><!--[-->This script waits for first successful query from database or exits with non-zero status after timeout.<!--]--></p><p><!--[-->Don&#39;t forget to change <code><!--[-->$query<!--]--></code> for the actually working one.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-2180e3"># Waits for mysql to become actually available</span></span><span class="line"><span class="ct-10f0a2">wait_for_mysql</span><span class="ct-b616f9">() {</span></span><span class="line"><span class="ct-b616f9">  query=</span><span class="ct-243af1">&quot;SELECT count(*) FROM users&quot;</span></span><span class="line"><span class="ct-b616f9">  </span></span><span class="line"><span class="ct-b616f9">  timeout=180 </span><span class="ct-2180e3"># 3 minutes limit</span></span><span class="line"><span class="ct-b616f9">  i=0</span></span><span class="line"><span class="ct-b616f9">  </span></span><span class="line"><span class="ct-b616f9">  </span><span class="ct-69e703">while</span><span class="ct-b616f9"> </span><span class="ct-69e703">!</span><span class="ct-b616f9"> docker </span><span class="ct-6d1c8e">exec</span><span class="ct-b616f9"> -it </span><span class="ct-243af1">&quot;</span><span class="ct-484fb2">$</span><span class="ct-d7d1a7">1</span><span class="ct-243af1">&quot;</span><span class="ct-b616f9"> mysql --user=</span><span class="ct-243af1">&quot;</span><span class="ct-484fb2">$</span><span class="ct-d7d1a7">2</span><span class="ct-243af1">&quot;</span><span class="ct-243af1">&quot;</span><span class="ct-b616f9"> -e </span><span class="ct-243af1">&quot;</span><span class="ct-484fb2">$</span><span class="ct-d7d1a7">query</span><span class="ct-243af1">&quot;</span><span class="ct-b616f9"> </span><span class="ct-69e703">do</span></span><span class="line"><span class="ct-b616f9">    sleep 1</span><span class="ct-69e703">;</span></span><span class="line"></span><span class="line"><span class="ct-b616f9">    i=</span><span class="ct-243af1">$((</span><span class="ct-484fb2">$</span><span class="ct-d7d1a7">i</span><span class="ct-69e703">+</span><span class="ct-13d7bb">1</span><span class="ct-243af1">))</span></span><span class="line"><span class="ct-b616f9">    </span><span class="ct-69e703">if</span><span class="ct-b616f9"> [[ </span><span class="ct-484fb2">${</span><span class="ct-d7d1a7">i</span><span class="ct-484fb2">}</span><span class="ct-b616f9"> </span><span class="ct-69e703">-ge</span><span class="ct-b616f9"> </span><span class="ct-484fb2">${</span><span class="ct-d7d1a7">timeout</span><span class="ct-484fb2">}</span><span class="ct-b616f9"> ]]</span><span class="ct-69e703">;</span><span class="ct-b616f9"> </span><span class="ct-69e703">then</span></span><span class="line"><span class="ct-b616f9">      </span><span class="ct-6d1c8e">echo</span><span class="ct-b616f9"> </span><span class="ct-243af1">&quot;[Error] can&#39;t properly query MySQL after </span><span class="ct-484fb2">${</span><span class="ct-d7d1a7">i</span><span class="ct-484fb2">}</span><span class="ct-243af1"> secs&quot;</span></span><span class="line"><span class="ct-b616f9">      </span><span class="ct-6d1c8e">exit</span><span class="ct-b616f9"> 1</span><span class="ct-69e703">;</span></span><span class="line"><span class="ct-b616f9">    </span><span class="ct-69e703">fi</span></span><span class="line"><span class="ct-b616f9">  </span><span class="ct-69e703">done</span></span><span class="line"><span class="ct-b616f9">}</span></span><span class="line"></span><span class="line"><span class="ct-2180e3"># usage: wait_for_mysql miin-mysql-dev root password database</span></span></code></pre><!--]--></div><p><!--[--><a href="/docker/wait-for-redis" class=""><!--[-->Wait for redis<!--]--></a><!--]--></p><style>.ct-13d7bb{color:#79C0FF}.ct-d7d1a7{color:#C9D1D9}.ct-484fb2{color:#C9D1D9}.ct-6d1c8e{color:#79C0FF}.ct-69e703{color:#FF7B72}.ct-243af1{color:#A5D6FF}.ct-b616f9{color:#C9D1D9}.ct-10f0a2{color:#D2A8FF}.ct-2180e3{color:#8B949E}.light .ct-2180e3{color:#93A1A1}.light .ct-10f0a2{color:#268BD2}.light .ct-b616f9{color:#657B83}.light .ct-243af1{color:#2AA198}.light .ct-69e703{color:#859900}.light .ct-6d1c8e{color:#268BD2}.light .ct-484fb2{color:#859900}.light .ct-d7d1a7{color:#268BD2}.light .ct-13d7bb{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/wait-for-mysql/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497650}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/wait-for-mysql" class="router-link-active _active_192pu_81 _link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Wait For Mysql</h1><article><div><p><!--[--><a href="https://github.com/vishnubob/wait-for-it" rel="nofollow" target="_blank"><!--[-->wait-for-it.sh<!--]--></a> doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections<!--]--></p><p><!--[-->This script waits for first successful query from database or exits with non-zero status after timeout.<!--]--></p><p><!--[-->Don&#39;t forget to change <code><!--[-->$query<!--]--></code> for the actually working one.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-593766"># Waits for mysql to become actually available</span></span><span class="line"><span class="ct-234572">wait_for_mysql</span><span class="ct-789078">() {</span></span><span class="line"><span class="ct-789078">  query=</span><span class="ct-9844eb">&quot;SELECT count(*) FROM users&quot;</span></span><span class="line"><span class="ct-789078">  </span></span><span class="line"><span class="ct-789078">  timeout=180 </span><span class="ct-593766"># 3 minutes limit</span></span><span class="line"><span class="ct-789078">  i=0</span></span><span class="line"><span class="ct-789078">  </span></span><span class="line"><span class="ct-789078">  </span><span class="ct-d8cd50">while</span><span class="ct-789078"> </span><span class="ct-d8cd50">!</span><span class="ct-789078"> docker </span><span class="ct-87dfaf">exec</span><span class="ct-789078"> -it </span><span class="ct-9844eb">&quot;</span><span class="ct-961af7">$</span><span class="ct-90daab">1</span><span class="ct-9844eb">&quot;</span><span class="ct-789078"> mysql --user=</span><span class="ct-9844eb">&quot;</span><span class="ct-961af7">$</span><span class="ct-90daab">2</span><span class="ct-9844eb">&quot;</span><span class="ct-9844eb">&quot;</span><span class="ct-789078"> -e </span><span class="ct-9844eb">&quot;</span><span class="ct-961af7">$</span><span class="ct-90daab">query</span><span class="ct-9844eb">&quot;</span><span class="ct-789078"> </span><span class="ct-d8cd50">do</span></span><span class="line"><span class="ct-789078">    sleep 1</span><span class="ct-d8cd50">;</span></span><span class="line"></span><span class="line"><span class="ct-789078">    i=</span><span class="ct-9844eb">$((</span><span class="ct-961af7">$</span><span class="ct-90daab">i</span><span class="ct-d8cd50">+</span><span class="ct-d4f923">1</span><span class="ct-9844eb">))</span></span><span class="line"><span class="ct-789078">    </span><span class="ct-d8cd50">if</span><span class="ct-789078"> [[ </span><span class="ct-961af7">${</span><span class="ct-90daab">i</span><span class="ct-961af7">}</span><span class="ct-789078"> </span><span class="ct-d8cd50">-ge</span><span class="ct-789078"> </span><span class="ct-961af7">${</span><span class="ct-90daab">timeout</span><span class="ct-961af7">}</span><span class="ct-789078"> ]]</span><span class="ct-d8cd50">;</span><span class="ct-789078"> </span><span class="ct-d8cd50">then</span></span><span class="line"><span class="ct-789078">      </span><span class="ct-87dfaf">echo</span><span class="ct-789078"> </span><span class="ct-9844eb">&quot;[Error] can&#39;t properly query MySQL after </span><span class="ct-961af7">${</span><span class="ct-90daab">i</span><span class="ct-961af7">}</span><span class="ct-9844eb"> secs&quot;</span></span><span class="line"><span class="ct-789078">      </span><span class="ct-87dfaf">exit</span><span class="ct-789078"> 1</span><span class="ct-d8cd50">;</span></span><span class="line"><span class="ct-789078">    </span><span class="ct-d8cd50">fi</span></span><span class="line"><span class="ct-789078">  </span><span class="ct-d8cd50">done</span></span><span class="line"><span class="ct-789078">}</span></span><span class="line"></span><span class="line"><span class="ct-593766"># usage: wait_for_mysql miin-mysql-dev root password database</span></span></code></pre><!--]--></div><p><!--[--><a href="/docker/wait-for-redis" class=""><!--[-->Wait for redis<!--]--></a><!--]--></p><style>.ct-d4f923{color:#79C0FF}.ct-90daab{color:#C9D1D9}.ct-961af7{color:#C9D1D9}.ct-87dfaf{color:#79C0FF}.ct-d8cd50{color:#FF7B72}.ct-9844eb{color:#A5D6FF}.ct-789078{color:#C9D1D9}.ct-234572{color:#D2A8FF}.ct-593766{color:#8B949E}.light .ct-593766{color:#93A1A1}.light .ct-234572{color:#268BD2}.light .ct-789078{color:#657B83}.light .ct-9844eb{color:#2AA198}.light .ct-d8cd50{color:#859900}.light .ct-87dfaf{color:#268BD2}.light .ct-961af7{color:#859900}.light .ct-90daab{color:#268BD2}.light .ct-d4f923{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/wait-for-mysql/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359941}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/docker/wait-for-redis/_payload.js b/docker/wait-for-redis/_payload.js
index bf935a7..209a36d 100644
--- a/docker/wait-for-redis/_payload.js
+++ b/docker/wait-for-redis/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:y,_path:z}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Wzyty7vOmU":{_path:z,_dir:"docker",_draft:p,_partial:p,_locale:"en",_empty:p,title:y,description:"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections",excerpt:{type:A,children:[{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:B,rel:[C]},children:[{type:c,value:D}]},{type:c,value:E}]},{type:a,tag:j,props:{},children:[{type:c,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:c,value:q}]}]}]},{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:I},children:[{type:c,value:J}]}]}]},body:{type:A,children:[{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:B,rel:[C]},children:[{type:c,value:D}]},{type:c,value:E}]},{type:a,tag:j,props:{},children:[{type:c,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:"# Waits for redis to become actually available"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:"ct-88f37d"},children:[{type:c,value:"wait_for_redis"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"() {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  timeout=180 "}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:"# 3 minutes"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  i=0"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"while"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" docker "}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"exec"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -it "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" redis-cli -h localhost -p 6379 -a "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ping "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"|"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" grep "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"PONG\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fdev\u002Fnull "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"2\u003E&1;"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"do"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    sleep 1"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    i="}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"$(("}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:"ct-f879cc"},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" [[ "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"-ge"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"timeout"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]]"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"echo"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"[Error] can't properly ping Redis container after "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" secs\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"exit"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" 1"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"fi"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"done"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:I},children:[{type:c,value:J}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-f879cc{color:#79C0FF}.ct-2d0cd3{color:#C9D1D9}.ct-f87068{color:#C9D1D9}.ct-75e354{color:#A5D6FF}.ct-d454d3{color:#79C0FF}.ct-d81cf7{color:#FF7B72}.ct-fde2e0{color:#C9D1D9}.ct-88f37d{color:#D2A8FF}.ct-4f0f5f{color:#8B949E}.light .ct-4f0f5f{color:#93A1A1}.light .ct-88f37d{color:#268BD2}.light .ct-fde2e0{color:#657B83}.light .ct-d81cf7{color:#859900}.light .ct-d454d3{color:#268BD2}.light .ct-75e354{color:#2AA198}.light .ct-f87068{color:#859900}.light .ct-2d0cd3{color:#268BD2}.light .ct-f879cc{color:#D33682}"}]}],toc:{title:r,searchDepth:O,depth:O,links:[]}},_type:"markdown",_id:"content:Docker:Wait for redis.md",_source:"content",_file:"Docker\u002FWait for redis.md",_extension:"md"}},prerenderedAt:1667812497688}}("element","span","text","ct-fde2e0","line","ct-d81cf7","ct-75e354","ct-f87068"," ","p","ct-2d0cd3","a","code","\"","}",false,"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" \u003E\u002Fdev\u002Fnull 2\u003E&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","","ct-4f0f5f","ct-d454d3","$",";","i","${","Wait For Redis","\u002Fdocker\u002Fwait-for-redis","root","https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it","nofollow","wait-for-it.sh"," doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","This script waits for first successful ping or exits with non-zero status after 3 minutes.","shell","pre","Wait%20for%20mysql","Wait for mysql","  ","1","    ","      ",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:y,_path:z}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Wzyty7vOmU":{_path:z,_dir:"docker",_draft:p,_partial:p,_locale:"en",_empty:p,title:y,description:"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections",excerpt:{type:A,children:[{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:B,rel:[C]},children:[{type:c,value:D}]},{type:c,value:E}]},{type:a,tag:j,props:{},children:[{type:c,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:c,value:q}]}]}]},{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:I},children:[{type:c,value:J}]}]}]},body:{type:A,children:[{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:B,rel:[C]},children:[{type:c,value:D}]},{type:c,value:E}]},{type:a,tag:j,props:{},children:[{type:c,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:"# Waits for redis to become actually available"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:"ct-a7219d"},children:[{type:c,value:"wait_for_redis"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"() {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  timeout=180 "}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:"# 3 minutes"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  i=0"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"while"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" docker "}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"exec"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -it "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" redis-cli -h localhost -p 6379 -a "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ping "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"|"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" grep "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"PONG\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fdev\u002Fnull "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"2\u003E&1;"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"do"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    sleep 1"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    i="}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"$(("}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:"ct-9e4889"},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" [[ "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"-ge"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"timeout"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]]"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"echo"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"[Error] can't properly ping Redis container after "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" secs\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"exit"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" 1"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"fi"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"done"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:I},children:[{type:c,value:J}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-9e4889{color:#79C0FF}.ct-33c468{color:#C9D1D9}.ct-59ad82{color:#C9D1D9}.ct-47dd3f{color:#A5D6FF}.ct-54f348{color:#79C0FF}.ct-8482ac{color:#FF7B72}.ct-ed020c{color:#C9D1D9}.ct-a7219d{color:#D2A8FF}.ct-bf03e9{color:#8B949E}.light .ct-bf03e9{color:#93A1A1}.light .ct-a7219d{color:#268BD2}.light .ct-ed020c{color:#657B83}.light .ct-8482ac{color:#859900}.light .ct-54f348{color:#268BD2}.light .ct-47dd3f{color:#2AA198}.light .ct-59ad82{color:#859900}.light .ct-33c468{color:#268BD2}.light .ct-9e4889{color:#D33682}"}]}],toc:{title:r,searchDepth:O,depth:O,links:[]}},_type:"markdown",_id:"content:Docker:Wait for redis.md",_source:"content",_file:"Docker\u002FWait for redis.md",_extension:"md"}},prerenderedAt:1667813359978}}("element","span","text","ct-ed020c","line","ct-8482ac","ct-47dd3f","ct-59ad82"," ","p","ct-33c468","a","code","\"","}",false,"# Waits for redis to become actually available\nwait_for_redis() {\n  timeout=180 # 3 minutes\n  i=0\n  while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" \u003E\u002Fdev\u002Fnull 2\u003E&1; do\n    sleep 1;\n\n    i=$(($i+1))\n    if [[ ${i} -ge ${timeout} ]]; then\n      echo \"[Error] can't properly ping Redis container after ${i} secs\"\n      exit 1;\n    fi\n  done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","","ct-bf03e9","ct-54f348","$",";","i","${","Wait For Redis","\u002Fdocker\u002Fwait-for-redis","root","https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it","nofollow","wait-for-it.sh"," doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","This script waits for first successful ping or exits with non-zero status after 3 minutes.","shell","pre","Wait%20for%20mysql","Wait for mysql","  ","1","    ","      ",2))
\ No newline at end of file
diff --git a/docker/wait-for-redis/index.html b/docker/wait-for-redis/index.html
index f93786c..e509cc6 100644
--- a/docker/wait-for-redis/index.html
+++ b/docker/wait-for-redis/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Wait For Redis • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/wait-for-redis/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Wait For Redis • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"><meta name="head:count" content="3"><link rel="modulepreload" href="/docker/wait-for-redis/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/wait-for-redis" class="router-link-active _active_192pu_81 _link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Wait For Redis</h1><article><div><p><!--[--><a href="https://github.com/vishnubob/wait-for-it" rel="nofollow" target="_blank"><!--[-->wait-for-it.sh<!--]--></a> doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections<!--]--></p><p><!--[-->This script waits for first successful ping or exits with non-zero status after 3 minutes.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-4f0f5f"># Waits for redis to become actually available</span></span><span class="line"><span class="ct-88f37d">wait_for_redis</span><span class="ct-fde2e0">() {</span></span><span class="line"><span class="ct-fde2e0">  timeout=180 </span><span class="ct-4f0f5f"># 3 minutes</span></span><span class="line"><span class="ct-fde2e0">  i=0</span></span><span class="line"><span class="ct-fde2e0">  </span><span class="ct-d81cf7">while</span><span class="ct-fde2e0"> </span><span class="ct-d81cf7">!</span><span class="ct-fde2e0"> docker </span><span class="ct-d454d3">exec</span><span class="ct-fde2e0"> -it </span><span class="ct-75e354">&quot;</span><span class="ct-f87068">$</span><span class="ct-2d0cd3">1</span><span class="ct-75e354">&quot;</span><span class="ct-fde2e0"> redis-cli -h localhost -p 6379 -a </span><span class="ct-75e354">&quot;</span><span class="ct-f87068">$</span><span class="ct-2d0cd3">2</span><span class="ct-75e354">&quot;</span><span class="ct-fde2e0"> ping </span><span class="ct-d81cf7">|</span><span class="ct-fde2e0"> grep </span><span class="ct-75e354">&quot;PONG&quot;</span><span class="ct-fde2e0"> </span><span class="ct-d81cf7">&gt;</span><span class="ct-fde2e0">/dev/null </span><span class="ct-d81cf7">2&gt;&amp;1;</span><span class="ct-fde2e0"> </span><span class="ct-d81cf7">do</span></span><span class="line"><span class="ct-fde2e0">    sleep 1</span><span class="ct-d81cf7">;</span></span><span class="line"></span><span class="line"><span class="ct-fde2e0">    i=</span><span class="ct-75e354">$((</span><span class="ct-f87068">$</span><span class="ct-2d0cd3">i</span><span class="ct-d81cf7">+</span><span class="ct-f879cc">1</span><span class="ct-75e354">))</span></span><span class="line"><span class="ct-fde2e0">    </span><span class="ct-d81cf7">if</span><span class="ct-fde2e0"> [[ </span><span class="ct-f87068">${</span><span class="ct-2d0cd3">i</span><span class="ct-f87068">}</span><span class="ct-fde2e0"> </span><span class="ct-d81cf7">-ge</span><span class="ct-fde2e0"> </span><span class="ct-f87068">${</span><span class="ct-2d0cd3">timeout</span><span class="ct-f87068">}</span><span class="ct-fde2e0"> ]]</span><span class="ct-d81cf7">;</span><span class="ct-fde2e0"> </span><span class="ct-d81cf7">then</span></span><span class="line"><span class="ct-fde2e0">      </span><span class="ct-d454d3">echo</span><span class="ct-fde2e0"> </span><span class="ct-75e354">&quot;[Error] can&#39;t properly ping Redis container after </span><span class="ct-f87068">${</span><span class="ct-2d0cd3">i</span><span class="ct-f87068">}</span><span class="ct-75e354"> secs&quot;</span></span><span class="line"><span class="ct-fde2e0">      </span><span class="ct-d454d3">exit</span><span class="ct-fde2e0"> 1</span><span class="ct-d81cf7">;</span></span><span class="line"><span class="ct-fde2e0">    </span><span class="ct-d81cf7">fi</span></span><span class="line"><span class="ct-fde2e0">  </span><span class="ct-d81cf7">done</span></span><span class="line"><span class="ct-fde2e0">}</span></span><span class="line"></span><span class="line"><span class="ct-4f0f5f"># usage: wait_for_redis miin-redis-dev password</span></span></code></pre><!--]--></div><p><!--[--><a href="/docker/wait-for-mysql" class=""><!--[-->Wait for mysql<!--]--></a><!--]--></p><style>.ct-f879cc{color:#79C0FF}.ct-2d0cd3{color:#C9D1D9}.ct-f87068{color:#C9D1D9}.ct-75e354{color:#A5D6FF}.ct-d454d3{color:#79C0FF}.ct-d81cf7{color:#FF7B72}.ct-fde2e0{color:#C9D1D9}.ct-88f37d{color:#D2A8FF}.ct-4f0f5f{color:#8B949E}.light .ct-4f0f5f{color:#93A1A1}.light .ct-88f37d{color:#268BD2}.light .ct-fde2e0{color:#657B83}.light .ct-d81cf7{color:#859900}.light .ct-d454d3{color:#268BD2}.light .ct-75e354{color:#2AA198}.light .ct-f87068{color:#859900}.light .ct-2d0cd3{color:#268BD2}.light .ct-f879cc{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/wait-for-redis/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497688}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a aria-current="page" href="/docker/wait-for-redis" class="router-link-active _active_192pu_81 _link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Wait For Redis</h1><article><div><p><!--[--><a href="https://github.com/vishnubob/wait-for-it" rel="nofollow" target="_blank"><!--[-->wait-for-it.sh<!--]--></a> doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections<!--]--></p><p><!--[-->This script waits for first successful ping or exits with non-zero status after 3 minutes.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-bf03e9"># Waits for redis to become actually available</span></span><span class="line"><span class="ct-a7219d">wait_for_redis</span><span class="ct-ed020c">() {</span></span><span class="line"><span class="ct-ed020c">  timeout=180 </span><span class="ct-bf03e9"># 3 minutes</span></span><span class="line"><span class="ct-ed020c">  i=0</span></span><span class="line"><span class="ct-ed020c">  </span><span class="ct-8482ac">while</span><span class="ct-ed020c"> </span><span class="ct-8482ac">!</span><span class="ct-ed020c"> docker </span><span class="ct-54f348">exec</span><span class="ct-ed020c"> -it </span><span class="ct-47dd3f">&quot;</span><span class="ct-59ad82">$</span><span class="ct-33c468">1</span><span class="ct-47dd3f">&quot;</span><span class="ct-ed020c"> redis-cli -h localhost -p 6379 -a </span><span class="ct-47dd3f">&quot;</span><span class="ct-59ad82">$</span><span class="ct-33c468">2</span><span class="ct-47dd3f">&quot;</span><span class="ct-ed020c"> ping </span><span class="ct-8482ac">|</span><span class="ct-ed020c"> grep </span><span class="ct-47dd3f">&quot;PONG&quot;</span><span class="ct-ed020c"> </span><span class="ct-8482ac">&gt;</span><span class="ct-ed020c">/dev/null </span><span class="ct-8482ac">2&gt;&amp;1;</span><span class="ct-ed020c"> </span><span class="ct-8482ac">do</span></span><span class="line"><span class="ct-ed020c">    sleep 1</span><span class="ct-8482ac">;</span></span><span class="line"></span><span class="line"><span class="ct-ed020c">    i=</span><span class="ct-47dd3f">$((</span><span class="ct-59ad82">$</span><span class="ct-33c468">i</span><span class="ct-8482ac">+</span><span class="ct-9e4889">1</span><span class="ct-47dd3f">))</span></span><span class="line"><span class="ct-ed020c">    </span><span class="ct-8482ac">if</span><span class="ct-ed020c"> [[ </span><span class="ct-59ad82">${</span><span class="ct-33c468">i</span><span class="ct-59ad82">}</span><span class="ct-ed020c"> </span><span class="ct-8482ac">-ge</span><span class="ct-ed020c"> </span><span class="ct-59ad82">${</span><span class="ct-33c468">timeout</span><span class="ct-59ad82">}</span><span class="ct-ed020c"> ]]</span><span class="ct-8482ac">;</span><span class="ct-ed020c"> </span><span class="ct-8482ac">then</span></span><span class="line"><span class="ct-ed020c">      </span><span class="ct-54f348">echo</span><span class="ct-ed020c"> </span><span class="ct-47dd3f">&quot;[Error] can&#39;t properly ping Redis container after </span><span class="ct-59ad82">${</span><span class="ct-33c468">i</span><span class="ct-59ad82">}</span><span class="ct-47dd3f"> secs&quot;</span></span><span class="line"><span class="ct-ed020c">      </span><span class="ct-54f348">exit</span><span class="ct-ed020c"> 1</span><span class="ct-8482ac">;</span></span><span class="line"><span class="ct-ed020c">    </span><span class="ct-8482ac">fi</span></span><span class="line"><span class="ct-ed020c">  </span><span class="ct-8482ac">done</span></span><span class="line"><span class="ct-ed020c">}</span></span><span class="line"></span><span class="line"><span class="ct-bf03e9"># usage: wait_for_redis miin-redis-dev password</span></span></code></pre><!--]--></div><p><!--[--><a href="/docker/wait-for-mysql" class=""><!--[-->Wait for mysql<!--]--></a><!--]--></p><style>.ct-9e4889{color:#79C0FF}.ct-33c468{color:#C9D1D9}.ct-59ad82{color:#C9D1D9}.ct-47dd3f{color:#A5D6FF}.ct-54f348{color:#79C0FF}.ct-8482ac{color:#FF7B72}.ct-ed020c{color:#C9D1D9}.ct-a7219d{color:#D2A8FF}.ct-bf03e9{color:#8B949E}.light .ct-bf03e9{color:#93A1A1}.light .ct-a7219d{color:#268BD2}.light .ct-ed020c{color:#657B83}.light .ct-8482ac{color:#859900}.light .ct-54f348{color:#268BD2}.light .ct-47dd3f{color:#2AA198}.light .ct-59ad82{color:#859900}.light .ct-33c468{color:#268BD2}.light .ct-9e4889{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/docker/wait-for-redis/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813359978}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/react-native/oauth2-login/_payload.js b/frontend/react-native/oauth2-login/_payload.js
index 17df900..c99cfe4 100644
--- a/frontend/react-native/oauth2-login/_payload.js
+++ b/frontend/react-native/oauth2-login/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:U,_path:V},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-zuvbG5OO4q":{_path:V,_dir:"react-native",_draft:A,_partial:A,_locale:"en",_empty:A,title:U,description:B,excerpt:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:H}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:K}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]}]},body:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" { "}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" } "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'react-native-app-auth'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F ..."}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  issuer: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'https:\u002F\u002Faccounts.google.com'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}.apps.googleusercontent.com`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`com.yourapp:\u002Foauth2redirect\u002Fgoogle`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'openid'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'profile'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"; "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F better hide it somehow"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'com.yourapp'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  serviceConfiguration: {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    authorizationEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&redirect_uri=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F TODO: replace it with your own backend to secure client_secret:"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    tokenEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&client_secret=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  },"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:info'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:avatar'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:S},children:[{type:b,value:"callback"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"("}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"accessToken"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:");"}]}]}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:"style",children:[{type:b,value:".ct-7a29da{color:#79C0FF}.ct-eb0424{color:#D2A8FF}.ct-e2cf44{color:#8B949E}.ct-647b71{color:#79C0FF}.ct-b7182d{color:#FF7B72}.ct-08d1e5{color:#A5D6FF}.ct-53e16d{color:#C9D1D9}.ct-fc33e3{color:#C9D1D9}.ct-62cb9a{color:#FF7B72}.light .ct-62cb9a{color:#859900}.light .ct-fc33e3{color:#657B83}.light .ct-53e16d{color:#268BD2}.light .ct-08d1e5{color:#2AA198}.light .ct-b7182d{color:#073642}.light .ct-647b71{color:#268BD2}.light .ct-e2cf44{color:#93A1A1}.light .ct-eb0424{color:#268BD2}.light .ct-7a29da{color:#B58900}"}]}],toc:{title:q,searchDepth:z,depth:z,links:[{id:C,depth:z,text:D,children:[{id:F,depth:au,text:G},{id:I,depth:au,text:J}]},{id:L,depth:z,text:M}]}},_type:"markdown",_id:"content:Frontend:React Native:OAuth2 login.md",_source:"content",_file:"Frontend\u002FReact Native\u002FOAuth2 login.md",_extension:"md"}},prerenderedAt:1667812497736}}("element","text","span","ct-fc33e3","line"," ","ct-08d1e5","ct-647b71","ct-62cb9a",",","code","p","a","ct-b7182d","const","=","","h2","react-native-app-auth","h3","typescript","pre","nofollow",";","YANDEX_OAUTH_CLIENT",2,false,"Use #oauth2 login with React-Native","common-oauth2-providers","Common OAuth2 providers",".","example-for-google","Example for #Google","import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n\u002F\u002F ...\nconst authState = await authorize({\n  issuer: 'https:\u002F\u002Faccounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:\u002Foauth2redirect\u002Fgoogle`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","example-for-yandex","Example for #Yandex","const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; \u002F\u002F better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:\u002Foauth2redirect`,\n    \u002F\u002F TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:\u002Foauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","apple-id-login","Apple ID login","ct-53e16d","authorize","'...'","ct-e2cf44","authState","ct-eb0424","APP_ID","OAuth2 Login","\u002Ffrontend\u002Freact-native\u002Foauth2-login","root","Can be handled by "," by redirecting to url ","code-inline","com.yourapp:\u002F\u002Foauth2provider","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication","react-native-apple-authentication"," has its own ","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication\u002Ftree\u002Fmain\u002Fdocs","documentation"," on setting up OAuth using Apple ID.","GOOGLE_OAUTH_CLIENT","await","({","  clientId: ","`${","  redirectUrl: ","  scopes: [",", ","],","  dangerouslyAllowInsecureHttpRequests: ","ct-7a29da","true","});","YANDEX_OAUTH_SECRET","}:\u002Foauth2redirect`",3))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:U,_path:V},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-zuvbG5OO4q":{_path:V,_dir:"react-native",_draft:A,_partial:A,_locale:"en",_empty:A,title:U,description:B,excerpt:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:H}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:K}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]}]},body:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" { "}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" } "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'react-native-app-auth'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F ..."}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  issuer: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'https:\u002F\u002Faccounts.google.com'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}.apps.googleusercontent.com`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`com.yourapp:\u002Foauth2redirect\u002Fgoogle`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'openid'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'profile'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"; "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F better hide it somehow"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'com.yourapp'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  serviceConfiguration: {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    authorizationEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&redirect_uri=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F TODO: replace it with your own backend to secure client_secret:"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    tokenEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&client_secret=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  },"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:info'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:avatar'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:S},children:[{type:b,value:"callback"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"("}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"accessToken"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:");"}]}]}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:"style",children:[{type:b,value:".ct-1e8c56{color:#79C0FF}.ct-396058{color:#D2A8FF}.ct-00a861{color:#8B949E}.ct-7335a4{color:#79C0FF}.ct-d7da86{color:#FF7B72}.ct-979b43{color:#A5D6FF}.ct-0a1449{color:#C9D1D9}.ct-3e85b2{color:#C9D1D9}.ct-f4335f{color:#FF7B72}.light .ct-f4335f{color:#859900}.light .ct-3e85b2{color:#657B83}.light .ct-0a1449{color:#268BD2}.light .ct-979b43{color:#2AA198}.light .ct-d7da86{color:#073642}.light .ct-7335a4{color:#268BD2}.light .ct-00a861{color:#93A1A1}.light .ct-396058{color:#268BD2}.light .ct-1e8c56{color:#B58900}"}]}],toc:{title:q,searchDepth:z,depth:z,links:[{id:C,depth:z,text:D,children:[{id:F,depth:au,text:G},{id:I,depth:au,text:J}]},{id:L,depth:z,text:M}]}},_type:"markdown",_id:"content:Frontend:React Native:OAuth2 login.md",_source:"content",_file:"Frontend\u002FReact Native\u002FOAuth2 login.md",_extension:"md"}},prerenderedAt:1667813360020}}("element","text","span","ct-3e85b2","line"," ","ct-979b43","ct-7335a4","ct-f4335f",",","code","p","a","ct-d7da86","const","=","","h2","react-native-app-auth","h3","typescript","pre","nofollow",";","YANDEX_OAUTH_CLIENT",2,false,"Use #oauth2 login with React-Native","common-oauth2-providers","Common OAuth2 providers",".","example-for-google","Example for #Google","import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n\u002F\u002F ...\nconst authState = await authorize({\n  issuer: 'https:\u002F\u002Faccounts.google.com',\n  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n  redirectUrl: `com.yourapp:\u002Foauth2redirect\u002Fgoogle`,\n  scopes: ['openid', 'profile'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n","example-for-yandex","Example for #Yandex","const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; \u002F\u002F better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n  serviceConfiguration: {\n    authorizationEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:\u002Foauth2redirect`,\n    \u002F\u002F TODO: replace it with your own backend to secure client_secret:\n    tokenEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n  },\n  clientId: YANDEX_OAUTH_CLIENT,\n  redirectUrl: `${APP_ID}:\u002Foauth2redirect`,\n  scopes: ['login:info', 'login:avatar'],\n  dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","apple-id-login","Apple ID login","ct-0a1449","authorize","'...'","ct-00a861","authState","ct-396058","APP_ID","OAuth2 Login","\u002Ffrontend\u002Freact-native\u002Foauth2-login","root","Can be handled by "," by redirecting to url ","code-inline","com.yourapp:\u002F\u002Foauth2provider","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication","react-native-apple-authentication"," has its own ","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication\u002Ftree\u002Fmain\u002Fdocs","documentation"," on setting up OAuth using Apple ID.","GOOGLE_OAUTH_CLIENT","await","({","  clientId: ","`${","  redirectUrl: ","  scopes: [",", ","],","  dangerouslyAllowInsecureHttpRequests: ","ct-1e8c56","true","});","YANDEX_OAUTH_SECRET","}:\u002Foauth2redirect`",3))
\ No newline at end of file
diff --git a/frontend/react-native/oauth2-login/index.html b/frontend/react-native/oauth2-login/index.html
index 01b9f97..1e20ead 100644
--- a/frontend/react-native/oauth2-login/index.html
+++ b/frontend/react-native/oauth2-login/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>OAuth2 Login • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Use #oauth2 login with React-Native"><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react-native/oauth2-login/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.ed0e0070.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>OAuth2 Login • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Use #oauth2 login with React-Native"><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react-native/oauth2-login/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.af0f4af9.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react-native/oauth2-login" class="router-link-active _active_192pu_81 _link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>OAuth2 Login</h1><article><div><p><!--[-->Use #oauth2 login with React-Native<!--]--></p><h2 id="common-oauth2-providers"><a href="#common-oauth2-providers"><!--[-->Common OAuth2 providers<!--]--></a></h2><p><!--[-->Can be handled by <a href="/frontend/react-native/react-native-app-auth" class=""><!--[-->react-native-app-auth<!--]--></a> by redirecting to url <code><!--[-->com.yourapp://oauth2provider<!--]--></code>.<!--]--></p><h3 id="example-for-google"><a href="#example-for-google"><!--[-->Example for #Google<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-62cb9a">import</span><span class="ct-fc33e3"> { </span><span class="ct-53e16d">authorize</span><span class="ct-fc33e3"> } </span><span class="ct-62cb9a">from</span><span class="ct-fc33e3"> </span><span class="ct-08d1e5">&#39;react-native-app-auth&#39;</span><span class="ct-fc33e3">;</span></span><span class="line"></span><span class="line"><span class="ct-b7182d">const</span><span class="ct-fc33e3"> </span><span class="ct-647b71">GOOGLE_OAUTH_CLIENT</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">=</span><span class="ct-fc33e3"> </span><span class="ct-08d1e5">&#39;...&#39;</span><span class="ct-fc33e3">;</span></span><span class="line"></span><span class="line"><span class="ct-e2cf44">// ...</span></span><span class="line"><span class="ct-b7182d">const</span><span class="ct-fc33e3"> </span><span class="ct-647b71">authState</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">=</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">await</span><span class="ct-fc33e3"> </span><span class="ct-eb0424">authorize</span><span class="ct-fc33e3">({</span></span><span class="line"><span class="ct-fc33e3">  issuer: </span><span class="ct-08d1e5">&#39;https://accounts.google.com&#39;</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">  clientId: </span><span class="ct-08d1e5">`${</span><span class="ct-647b71">GOOGLE_OAUTH_CLIENT</span><span class="ct-08d1e5">}.apps.googleusercontent.com`</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">  redirectUrl: </span><span class="ct-08d1e5">`com.yourapp:/oauth2redirect/google`</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">  scopes: [</span><span class="ct-08d1e5">&#39;openid&#39;</span><span class="ct-fc33e3">, </span><span class="ct-08d1e5">&#39;profile&#39;</span><span class="ct-fc33e3">],</span></span><span class="line"><span class="ct-fc33e3">  dangerouslyAllowInsecureHttpRequests: </span><span class="ct-7a29da">true</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">});</span></span></code></pre><!--]--></div><h3 id="example-for-yandex"><a href="#example-for-yandex"><!--[-->Example for #Yandex<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b7182d">const</span><span class="ct-fc33e3"> </span><span class="ct-647b71">YANDEX_OAUTH_CLIENT</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">=</span><span class="ct-fc33e3"> </span><span class="ct-08d1e5">&#39;...&#39;</span><span class="ct-fc33e3">;</span></span><span class="line"><span class="ct-b7182d">const</span><span class="ct-fc33e3"> </span><span class="ct-647b71">YANDEX_OAUTH_SECRET</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">=</span><span class="ct-fc33e3"> </span><span class="ct-08d1e5">&#39;...&#39;</span><span class="ct-fc33e3">; </span><span class="ct-e2cf44">// better hide it somehow</span></span><span class="line"><span class="ct-b7182d">const</span><span class="ct-fc33e3"> </span><span class="ct-647b71">APP_ID</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">=</span><span class="ct-fc33e3"> </span><span class="ct-08d1e5">&#39;com.yourapp&#39;</span><span class="ct-fc33e3">;</span></span><span class="line"></span><span class="line"><span class="ct-b7182d">const</span><span class="ct-fc33e3"> </span><span class="ct-647b71">authState</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">=</span><span class="ct-fc33e3"> </span><span class="ct-62cb9a">await</span><span class="ct-fc33e3"> </span><span class="ct-eb0424">authorize</span><span class="ct-fc33e3">({</span></span><span class="line"><span class="ct-fc33e3">  serviceConfiguration: {</span></span><span class="line"><span class="ct-fc33e3">    authorizationEndpoint: </span><span class="ct-08d1e5">`https://oauth.yandex.ru/authorize?response_type=code&amp;client_id=${</span><span class="ct-647b71">YANDEX_OAUTH_CLIENT</span><span class="ct-08d1e5">}&amp;redirect_uri=${</span><span class="ct-647b71">APP_ID</span><span class="ct-08d1e5">}:/oauth2redirect`</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">    </span><span class="ct-e2cf44">// TODO: replace it with your own backend to secure client_secret:</span></span><span class="line"><span class="ct-fc33e3">    tokenEndpoint: </span><span class="ct-08d1e5">`https://oauth.yandex.ru/token?grant_type=authorization_code&amp;client_id=${</span><span class="ct-647b71">YANDEX_OAUTH_CLIENT</span><span class="ct-08d1e5">}&amp;client_secret=${</span><span class="ct-647b71">YANDEX_OAUTH_SECRET</span><span class="ct-08d1e5">}`</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">  },</span></span><span class="line"><span class="ct-fc33e3">  clientId: </span><span class="ct-647b71">YANDEX_OAUTH_CLIENT</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">  redirectUrl: </span><span class="ct-08d1e5">`${</span><span class="ct-647b71">APP_ID</span><span class="ct-08d1e5">}:/oauth2redirect`</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">  scopes: [</span><span class="ct-08d1e5">&#39;login:info&#39;</span><span class="ct-fc33e3">, </span><span class="ct-08d1e5">&#39;login:avatar&#39;</span><span class="ct-fc33e3">],</span></span><span class="line"><span class="ct-fc33e3">  dangerouslyAllowInsecureHttpRequests: </span><span class="ct-7a29da">true</span><span class="ct-fc33e3">,</span></span><span class="line"><span class="ct-fc33e3">});</span></span><span class="line"></span><span class="line"><span class="ct-eb0424">callback</span><span class="ct-fc33e3">(</span><span class="ct-53e16d">authState</span><span class="ct-fc33e3">.</span><span class="ct-53e16d">accessToken</span><span class="ct-fc33e3">);</span></span></code></pre><!--]--></div><h2 id="apple-id-login"><a href="#apple-id-login"><!--[-->Apple ID login<!--]--></a></h2><p><!--[--><a href="https://github.com/invertase/react-native-apple-authentication" rel="nofollow" target="_blank"><!--[-->react-native-apple-authentication<!--]--></a> has its own <a href="https://github.com/invertase/react-native-apple-authentication/tree/main/docs" rel="nofollow" target="_blank"><!--[-->documentation<!--]--></a> on setting up OAuth using Apple ID.<!--]--></p><style>.ct-7a29da{color:#79C0FF}.ct-eb0424{color:#D2A8FF}.ct-e2cf44{color:#8B949E}.ct-647b71{color:#79C0FF}.ct-b7182d{color:#FF7B72}.ct-08d1e5{color:#A5D6FF}.ct-53e16d{color:#C9D1D9}.ct-fc33e3{color:#C9D1D9}.ct-62cb9a{color:#FF7B72}.light .ct-62cb9a{color:#859900}.light .ct-fc33e3{color:#657B83}.light .ct-53e16d{color:#268BD2}.light .ct-08d1e5{color:#2AA198}.light .ct-b7182d{color:#073642}.light .ct-647b71{color:#268BD2}.light .ct-e2cf44{color:#93A1A1}.light .ct-eb0424{color:#268BD2}.light .ct-7a29da{color:#B58900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/oauth2-login/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497736}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.ed0e0070.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react-native/oauth2-login" class="router-link-active _active_192pu_81 _link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>OAuth2 Login</h1><article><div><p><!--[-->Use #oauth2 login with React-Native<!--]--></p><h2 id="common-oauth2-providers"><a href="#common-oauth2-providers"><!--[-->Common OAuth2 providers<!--]--></a></h2><p><!--[-->Can be handled by <a href="/frontend/react-native/react-native-app-auth" class=""><!--[-->react-native-app-auth<!--]--></a> by redirecting to url <code><!--[-->com.yourapp://oauth2provider<!--]--></code>.<!--]--></p><h3 id="example-for-google"><a href="#example-for-google"><!--[-->Example for #Google<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-f4335f">import</span><span class="ct-3e85b2"> { </span><span class="ct-0a1449">authorize</span><span class="ct-3e85b2"> } </span><span class="ct-f4335f">from</span><span class="ct-3e85b2"> </span><span class="ct-979b43">&#39;react-native-app-auth&#39;</span><span class="ct-3e85b2">;</span></span><span class="line"></span><span class="line"><span class="ct-d7da86">const</span><span class="ct-3e85b2"> </span><span class="ct-7335a4">GOOGLE_OAUTH_CLIENT</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">=</span><span class="ct-3e85b2"> </span><span class="ct-979b43">&#39;...&#39;</span><span class="ct-3e85b2">;</span></span><span class="line"></span><span class="line"><span class="ct-00a861">// ...</span></span><span class="line"><span class="ct-d7da86">const</span><span class="ct-3e85b2"> </span><span class="ct-7335a4">authState</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">=</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">await</span><span class="ct-3e85b2"> </span><span class="ct-396058">authorize</span><span class="ct-3e85b2">({</span></span><span class="line"><span class="ct-3e85b2">  issuer: </span><span class="ct-979b43">&#39;https://accounts.google.com&#39;</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">  clientId: </span><span class="ct-979b43">`${</span><span class="ct-7335a4">GOOGLE_OAUTH_CLIENT</span><span class="ct-979b43">}.apps.googleusercontent.com`</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">  redirectUrl: </span><span class="ct-979b43">`com.yourapp:/oauth2redirect/google`</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">  scopes: [</span><span class="ct-979b43">&#39;openid&#39;</span><span class="ct-3e85b2">, </span><span class="ct-979b43">&#39;profile&#39;</span><span class="ct-3e85b2">],</span></span><span class="line"><span class="ct-3e85b2">  dangerouslyAllowInsecureHttpRequests: </span><span class="ct-1e8c56">true</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">});</span></span></code></pre><!--]--></div><h3 id="example-for-yandex"><a href="#example-for-yandex"><!--[-->Example for #Yandex<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-d7da86">const</span><span class="ct-3e85b2"> </span><span class="ct-7335a4">YANDEX_OAUTH_CLIENT</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">=</span><span class="ct-3e85b2"> </span><span class="ct-979b43">&#39;...&#39;</span><span class="ct-3e85b2">;</span></span><span class="line"><span class="ct-d7da86">const</span><span class="ct-3e85b2"> </span><span class="ct-7335a4">YANDEX_OAUTH_SECRET</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">=</span><span class="ct-3e85b2"> </span><span class="ct-979b43">&#39;...&#39;</span><span class="ct-3e85b2">; </span><span class="ct-00a861">// better hide it somehow</span></span><span class="line"><span class="ct-d7da86">const</span><span class="ct-3e85b2"> </span><span class="ct-7335a4">APP_ID</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">=</span><span class="ct-3e85b2"> </span><span class="ct-979b43">&#39;com.yourapp&#39;</span><span class="ct-3e85b2">;</span></span><span class="line"></span><span class="line"><span class="ct-d7da86">const</span><span class="ct-3e85b2"> </span><span class="ct-7335a4">authState</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">=</span><span class="ct-3e85b2"> </span><span class="ct-f4335f">await</span><span class="ct-3e85b2"> </span><span class="ct-396058">authorize</span><span class="ct-3e85b2">({</span></span><span class="line"><span class="ct-3e85b2">  serviceConfiguration: {</span></span><span class="line"><span class="ct-3e85b2">    authorizationEndpoint: </span><span class="ct-979b43">`https://oauth.yandex.ru/authorize?response_type=code&amp;client_id=${</span><span class="ct-7335a4">YANDEX_OAUTH_CLIENT</span><span class="ct-979b43">}&amp;redirect_uri=${</span><span class="ct-7335a4">APP_ID</span><span class="ct-979b43">}:/oauth2redirect`</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">    </span><span class="ct-00a861">// TODO: replace it with your own backend to secure client_secret:</span></span><span class="line"><span class="ct-3e85b2">    tokenEndpoint: </span><span class="ct-979b43">`https://oauth.yandex.ru/token?grant_type=authorization_code&amp;client_id=${</span><span class="ct-7335a4">YANDEX_OAUTH_CLIENT</span><span class="ct-979b43">}&amp;client_secret=${</span><span class="ct-7335a4">YANDEX_OAUTH_SECRET</span><span class="ct-979b43">}`</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">  },</span></span><span class="line"><span class="ct-3e85b2">  clientId: </span><span class="ct-7335a4">YANDEX_OAUTH_CLIENT</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">  redirectUrl: </span><span class="ct-979b43">`${</span><span class="ct-7335a4">APP_ID</span><span class="ct-979b43">}:/oauth2redirect`</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">  scopes: [</span><span class="ct-979b43">&#39;login:info&#39;</span><span class="ct-3e85b2">, </span><span class="ct-979b43">&#39;login:avatar&#39;</span><span class="ct-3e85b2">],</span></span><span class="line"><span class="ct-3e85b2">  dangerouslyAllowInsecureHttpRequests: </span><span class="ct-1e8c56">true</span><span class="ct-3e85b2">,</span></span><span class="line"><span class="ct-3e85b2">});</span></span><span class="line"></span><span class="line"><span class="ct-396058">callback</span><span class="ct-3e85b2">(</span><span class="ct-0a1449">authState</span><span class="ct-3e85b2">.</span><span class="ct-0a1449">accessToken</span><span class="ct-3e85b2">);</span></span></code></pre><!--]--></div><h2 id="apple-id-login"><a href="#apple-id-login"><!--[-->Apple ID login<!--]--></a></h2><p><!--[--><a href="https://github.com/invertase/react-native-apple-authentication" rel="nofollow" target="_blank"><!--[-->react-native-apple-authentication<!--]--></a> has its own <a href="https://github.com/invertase/react-native-apple-authentication/tree/main/docs" rel="nofollow" target="_blank"><!--[-->documentation<!--]--></a> on setting up OAuth using Apple ID.<!--]--></p><style>.ct-1e8c56{color:#79C0FF}.ct-396058{color:#D2A8FF}.ct-00a861{color:#8B949E}.ct-7335a4{color:#79C0FF}.ct-d7da86{color:#FF7B72}.ct-979b43{color:#A5D6FF}.ct-0a1449{color:#C9D1D9}.ct-3e85b2{color:#C9D1D9}.ct-f4335f{color:#FF7B72}.light .ct-f4335f{color:#859900}.light .ct-3e85b2{color:#657B83}.light .ct-0a1449{color:#268BD2}.light .ct-979b43{color:#2AA198}.light .ct-d7da86{color:#073642}.light .ct-7335a4{color:#268BD2}.light .ct-00a861{color:#93A1A1}.light .ct-396058{color:#268BD2}.light .ct-1e8c56{color:#B58900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/oauth2-login/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360020}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.af0f4af9.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js
index 9c17194..7be8c0c 100644
--- a/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js
+++ b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:$,_path:aa},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Rv2z2spCBs":{_path:aa,_dir:"react-native",_draft:M,_partial:M,_locale:"en",_empty:M,title:$,description:"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.",excerpt:{type:ab,children:[{type:a,tag:ac,props:{},children:[{type:c,value:ad},{type:a,tag:ae,props:{},children:[{type:c,value:N}]},{type:c,value:af}]},{type:a,tag:C,props:{code:O,language:ag},children:[{type:a,tag:ah,props:{},children:[{type:a,tag:C,props:{__ignoreMap:P},children:[{type:c,value:O}]}]}]}]},body:{type:ab,children:[{type:a,tag:ac,props:{},children:[{type:c,value:ad},{type:a,tag:ae,props:{},children:[{type:c,value:N}]},{type:c,value:af}]},{type:a,tag:C,props:{code:O,language:ag},children:[{type:a,tag:ah,props:{},children:[{type:a,tag:C,props:{__ignoreMap:P},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F interact() is doing some stuff, that changes FlatList scroll size"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:"type"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-b4fb03"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" () "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-d39a2a"},children:[{type:c,value:"void"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"; }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:x},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:"SomeList"}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"FC"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"\u003E "}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:" ({ "}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F set it to `true` before interaction and back to `false` right after"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:"    ("}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"NativeSyntheticEvent"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"NativeScrollEvent"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"\u003E) "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"nativeEvent"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"contentOffset"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"y"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:al}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    [],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-8dee8d"},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"_"}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:an},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:", "}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:an},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:") "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:") {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"?."}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"scrollToOffset"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      offset: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"-"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      animated: "}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:","}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    });"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, []);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F onInteraction wraps interaction to preserve scroll position"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:"onInteraction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    () "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"();"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:"500"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:al}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"setSelectedSubThemes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:"ct-5ff58d"},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F ...required FlatList options"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u002F\u003E"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  )"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-5ff58d{color:#FFA657}.ct-03d3d5{color:#79C0FF}.ct-8dee8d{color:#79C0FF}.ct-2704a7{color:#C9D1D9}.ct-09cabd{color:#79C0FF}.ct-87fdb6{color:#79C0FF}.ct-03f514{color:#79C0FF}.ct-5b3757{color:#FFA657}.ct-02453f{color:#FFA657}.ct-cee0e9{color:#FF7B72}.ct-26da6a{color:#D2A8FF}.ct-0ed0cd{color:#C9D1D9}.ct-0506c3{color:#FF7B72}.ct-d39a2a{color:#79C0FF}.ct-498eca{color:#D2A8FF}.ct-995aac{color:#FF7B72}.ct-b4fb03{color:#FFA657}.ct-36a801{color:#C9D1D9}.ct-0f7321{color:#FF7B72}.ct-8d188c{color:#8B949E}.light .ct-8d188c{color:#93A1A1}.light .ct-0f7321{color:#073642}.light .ct-36a801{color:#657B83}.light .ct-b4fb03{color:#268BD2}.light .ct-995aac{color:#859900}.light .ct-498eca{color:#268BD2}.light .ct-d39a2a{color:#859900}.light .ct-0506c3{color:#073642}.light .ct-0ed0cd{color:#657B83}.light .ct-26da6a{color:#268BD2}.light .ct-cee0e9{color:#859900}.light .ct-02453f{color:#268BD2}.light .ct-5b3757{color:#657B83}.light .ct-03f514{color:#268BD2}.light .ct-87fdb6{color:#D33682}.light .ct-09cabd{color:#B58900}.light .ct-2704a7{color:#268BD2}.light .ct-8dee8d{color:#268BD2}.light .ct-03d3d5{color:#859900}.light .ct-5ff58d{color:#657B83}"}]}],toc:{title:P,searchDepth:av,depth:av,links:[]}},_type:"markdown",_id:"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md",_source:"content",_file:"Frontend\u002FReact Native\u002FPreserve FlatList scroll position in React Native.md",_extension:"md"}},prerenderedAt:1667812497786}}("element","span","text","ct-36a801","line"," ","ct-2704a7","ct-995aac","ct-0ed0cd","=",".","  ","      ","ct-0f7321","current","ct-498eca","=\u003E","const","ct-03f514","ct-cee0e9"," {",";",":","ct-0506c3","(",");","    ","}","code","ct-8d188c","ct-02453f","ct-5b3757","ct-87fdb6","scrollHeight","shouldKeepScrollPosition","ct-09cabd","h","{",false,"FlatList","\u002F\u002F interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () =\u003E void; }\n\nconst SomeList: FC\u003CProps\u003E = ({ interact }) =\u003E {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  \u002F\u002F set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent\u003CNativeScrollEvent\u003E) =\u003E {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) =\u003E {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  \u002F\u002F onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () =\u003E {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() =\u003E {\n        interact();\n      }, 0);\n\n      setTimeout(() =\u003E {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    \u003CFlatList\n      \u002F\u002F ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    \u002F\u003E\n  )\n}\n","","interact","\u003C","scrollPosition","useRef","0","false","onScroll","useCallback","onContentSizeChange"," (","ref","Preserve FlatList Scroll Position In React Native","\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native","root","p","Sometimes you need to keep scroll position of ","code-inline"," in React Native after some user interactions.","typescript","pre","Props","ct-26da6a","event","    },","  );","ct-03d3d5","number","return","setTimeout","(() ","        ","      }, ","onRefresh",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:$,_path:aa},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Rv2z2spCBs":{_path:aa,_dir:"react-native",_draft:M,_partial:M,_locale:"en",_empty:M,title:$,description:"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.",excerpt:{type:ab,children:[{type:a,tag:ac,props:{},children:[{type:c,value:ad},{type:a,tag:ae,props:{},children:[{type:c,value:N}]},{type:c,value:af}]},{type:a,tag:C,props:{code:O,language:ag},children:[{type:a,tag:ah,props:{},children:[{type:a,tag:C,props:{__ignoreMap:P},children:[{type:c,value:O}]}]}]}]},body:{type:ab,children:[{type:a,tag:ac,props:{},children:[{type:c,value:ad},{type:a,tag:ae,props:{},children:[{type:c,value:N}]},{type:c,value:af}]},{type:a,tag:C,props:{code:O,language:ag},children:[{type:a,tag:ah,props:{},children:[{type:a,tag:C,props:{__ignoreMap:P},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F interact() is doing some stuff, that changes FlatList scroll size"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:"type"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-962ae9"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" () "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-1df086"},children:[{type:c,value:"void"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"; }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:x},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:"SomeList"}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"FC"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"\u003E "}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:" ({ "}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F set it to `true` before interaction and back to `false` right after"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:"    ("}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"NativeSyntheticEvent"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"NativeScrollEvent"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"\u003E) "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"nativeEvent"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"contentOffset"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"y"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:al}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    [],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-c04049"},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"_"}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:an},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:", "}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:an},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:") "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:") {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"?."}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"scrollToOffset"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      offset: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"-"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      animated: "}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:","}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    });"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, []);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F onInteraction wraps interaction to preserve scroll position"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:"onInteraction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    () "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"();"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:"500"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:al}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"setSelectedSubThemes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:"ct-87c7b6"},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F ...required FlatList options"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u002F\u003E"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  )"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-87c7b6{color:#FFA657}.ct-7dc0b2{color:#79C0FF}.ct-c04049{color:#79C0FF}.ct-d9dfd6{color:#C9D1D9}.ct-bbd9de{color:#79C0FF}.ct-5e6b92{color:#79C0FF}.ct-b9f460{color:#79C0FF}.ct-c49042{color:#FFA657}.ct-4e09fa{color:#FFA657}.ct-88c97b{color:#FF7B72}.ct-82b48d{color:#D2A8FF}.ct-a5419a{color:#C9D1D9}.ct-cba0df{color:#FF7B72}.ct-1df086{color:#79C0FF}.ct-4702b7{color:#D2A8FF}.ct-35de31{color:#FF7B72}.ct-962ae9{color:#FFA657}.ct-574849{color:#C9D1D9}.ct-5fb3de{color:#FF7B72}.ct-cd0080{color:#8B949E}.light .ct-cd0080{color:#93A1A1}.light .ct-5fb3de{color:#073642}.light .ct-574849{color:#657B83}.light .ct-962ae9{color:#268BD2}.light .ct-35de31{color:#859900}.light .ct-4702b7{color:#268BD2}.light .ct-1df086{color:#859900}.light .ct-cba0df{color:#073642}.light .ct-a5419a{color:#657B83}.light .ct-82b48d{color:#268BD2}.light .ct-88c97b{color:#859900}.light .ct-4e09fa{color:#268BD2}.light .ct-c49042{color:#657B83}.light .ct-b9f460{color:#268BD2}.light .ct-5e6b92{color:#D33682}.light .ct-bbd9de{color:#B58900}.light .ct-d9dfd6{color:#268BD2}.light .ct-c04049{color:#268BD2}.light .ct-7dc0b2{color:#859900}.light .ct-87c7b6{color:#657B83}"}]}],toc:{title:P,searchDepth:av,depth:av,links:[]}},_type:"markdown",_id:"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md",_source:"content",_file:"Frontend\u002FReact Native\u002FPreserve FlatList scroll position in React Native.md",_extension:"md"}},prerenderedAt:1667813360063}}("element","span","text","ct-574849","line"," ","ct-d9dfd6","ct-35de31","ct-a5419a","=",".","  ","      ","ct-5fb3de","current","ct-4702b7","=\u003E","const","ct-b9f460","ct-88c97b"," {",";",":","ct-cba0df","(",");","    ","}","code","ct-cd0080","ct-4e09fa","ct-c49042","ct-5e6b92","scrollHeight","shouldKeepScrollPosition","ct-bbd9de","h","{",false,"FlatList","\u002F\u002F interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () =\u003E void; }\n\nconst SomeList: FC\u003CProps\u003E = ({ interact }) =\u003E {\n  const scrollPosition = useRef(0);\n  const scrollHeight = useRef(0);\n  \n  \u002F\u002F set it to `true` before interaction and back to `false` right after\n  const shouldKeepScrollPosition = useRef(false);\n\n  const onScroll = useCallback(\n    (event: NativeSyntheticEvent\u003CNativeScrollEvent\u003E) =\u003E {\n      scrollPosition.current = event.nativeEvent.contentOffset.y;\n    },\n    [],\n  );\n\n  const onContentSizeChange = useCallback((_: number, h: number) =\u003E {\n    if (!shouldKeepScrollPosition.current) {\n      scrollHeight.current = h;\n      return;\n    }\n\n    ref.current?.scrollToOffset({\n      offset: scrollPosition.current + (h - scrollHeight.current),\n      animated: false,\n    });\n\n    scrollHeight.current = h;\n  }, []);\n\n  \u002F\u002F onInteraction wraps interaction to preserve scroll position\n  const onInteraction = useCallback(\n    () =\u003E {\n      shouldKeepScrollPosition.current = true;\n\n      setTimeout(() =\u003E {\n        interact();\n      }, 0);\n\n      setTimeout(() =\u003E {\n        shouldKeepScrollPosition.current = false;\n      }, 500);\n    },\n    [setSelectedSubThemes],\n  );\n  \n  return (\n    \u003CFlatList\n      \u002F\u002F ...required FlatList options\n      ref={ref}\n      onContentSizeChange={onContentSizeChange}\n      onRefresh={onRefresh}\n      onScroll={onScroll}\n    \u002F\u003E\n  )\n}\n","","interact","\u003C","scrollPosition","useRef","0","false","onScroll","useCallback","onContentSizeChange"," (","ref","Preserve FlatList Scroll Position In React Native","\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native","root","p","Sometimes you need to keep scroll position of ","code-inline"," in React Native after some user interactions.","typescript","pre","Props","ct-82b48d","event","    },","  );","ct-7dc0b2","number","return","setTimeout","(() ","        ","      }, ","onRefresh",2))
\ No newline at end of file
diff --git a/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html
index 709d076..43bdafe 100644
--- a/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html
+++ b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Preserve FlatList Scroll Position In React Native • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Sometimes you need to keep scroll position of FlatList in React Native after some user interactions."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Preserve FlatList Scroll Position In React Native • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Sometimes you need to keep scroll position of FlatList in React Native after some user interactions."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="router-link-active _active_192pu_81 _link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Preserve FlatList Scroll Position In React Native</h1><article><div><p><!--[-->Sometimes you need to keep scroll position of <code><!--[-->FlatList<!--]--></code> in React Native after some user interactions.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8d188c">// interact() is doing some stuff, that changes FlatList scroll size</span></span><span class="line"><span class="ct-0f7321">type</span><span class="ct-36a801"> </span><span class="ct-b4fb03">Props</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> { </span><span class="ct-498eca">interact</span><span class="ct-995aac">:</span><span class="ct-36a801"> () </span><span class="ct-0f7321">=&gt;</span><span class="ct-36a801"> </span><span class="ct-d39a2a">void</span><span class="ct-36a801">; }</span></span><span class="line"></span><span class="line"><span class="ct-0506c3">const</span><span class="ct-0ed0cd"> </span><span class="ct-26da6a">SomeList</span><span class="ct-cee0e9">:</span><span class="ct-0ed0cd"> </span><span class="ct-02453f">FC</span><span class="ct-0ed0cd">&lt;</span><span class="ct-02453f">Props</span><span class="ct-0ed0cd">&gt; </span><span class="ct-cee0e9">=</span><span class="ct-0ed0cd"> ({ </span><span class="ct-5b3757">interact</span><span class="ct-0ed0cd"> }) </span><span class="ct-0506c3">=&gt;</span><span class="ct-0ed0cd"> {</span></span><span class="line"><span class="ct-36a801">  </span><span class="ct-0f7321">const</span><span class="ct-36a801"> </span><span class="ct-03f514">scrollPosition</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-498eca">useRef</span><span class="ct-36a801">(</span><span class="ct-87fdb6">0</span><span class="ct-36a801">);</span></span><span class="line"><span class="ct-36a801">  </span><span class="ct-0f7321">const</span><span class="ct-36a801"> </span><span class="ct-03f514">scrollHeight</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-498eca">useRef</span><span class="ct-36a801">(</span><span class="ct-87fdb6">0</span><span class="ct-36a801">);</span></span><span class="line"><span class="ct-36a801">  </span></span><span class="line"><span class="ct-36a801">  </span><span class="ct-8d188c">// set it to `true` before interaction and back to `false` right after</span></span><span class="line"><span class="ct-36a801">  </span><span class="ct-0f7321">const</span><span class="ct-36a801"> </span><span class="ct-03f514">shouldKeepScrollPosition</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-498eca">useRef</span><span class="ct-36a801">(</span><span class="ct-09cabd">false</span><span class="ct-36a801">);</span></span><span class="line"></span><span class="line"><span class="ct-36a801">  </span><span class="ct-0f7321">const</span><span class="ct-36a801"> </span><span class="ct-03f514">onScroll</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-498eca">useCallback</span><span class="ct-36a801">(</span></span><span class="line"><span class="ct-0ed0cd">    (</span><span class="ct-5b3757">event</span><span class="ct-cee0e9">:</span><span class="ct-0ed0cd"> </span><span class="ct-02453f">NativeSyntheticEvent</span><span class="ct-0ed0cd">&lt;</span><span class="ct-02453f">NativeScrollEvent</span><span class="ct-0ed0cd">&gt;) </span><span class="ct-0506c3">=&gt;</span><span class="ct-0ed0cd"> {</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">scrollPosition</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-2704a7">event</span><span class="ct-36a801">.</span><span class="ct-2704a7">nativeEvent</span><span class="ct-36a801">.</span><span class="ct-2704a7">contentOffset</span><span class="ct-36a801">.</span><span class="ct-2704a7">y</span><span class="ct-36a801">;</span></span><span class="line"><span class="ct-36a801">    },</span></span><span class="line"><span class="ct-36a801">    [],</span></span><span class="line"><span class="ct-36a801">  );</span></span><span class="line"></span><span class="line"><span class="ct-0ed0cd">  </span><span class="ct-0506c3">const</span><span class="ct-0ed0cd"> </span><span class="ct-8dee8d">onContentSizeChange</span><span class="ct-0ed0cd"> </span><span class="ct-cee0e9">=</span><span class="ct-0ed0cd"> </span><span class="ct-26da6a">useCallback</span><span class="ct-0ed0cd">((</span><span class="ct-5b3757">_</span><span class="ct-cee0e9">:</span><span class="ct-0ed0cd"> </span><span class="ct-03d3d5">number</span><span class="ct-0ed0cd">, </span><span class="ct-5b3757">h</span><span class="ct-cee0e9">:</span><span class="ct-0ed0cd"> </span><span class="ct-03d3d5">number</span><span class="ct-0ed0cd">) </span><span class="ct-0506c3">=&gt;</span><span class="ct-0ed0cd"> {</span></span><span class="line"><span class="ct-36a801">    </span><span class="ct-995aac">if</span><span class="ct-36a801"> (</span><span class="ct-995aac">!</span><span class="ct-2704a7">shouldKeepScrollPosition</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801">) {</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">scrollHeight</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-2704a7">h</span><span class="ct-36a801">;</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-995aac">return</span><span class="ct-36a801">;</span></span><span class="line"><span class="ct-36a801">    }</span></span><span class="line"></span><span class="line"><span class="ct-36a801">    </span><span class="ct-2704a7">ref</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801">?.</span><span class="ct-498eca">scrollToOffset</span><span class="ct-36a801">({</span></span><span class="line"><span class="ct-36a801">      offset: </span><span class="ct-2704a7">scrollPosition</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801"> </span><span class="ct-995aac">+</span><span class="ct-36a801"> (</span><span class="ct-2704a7">h</span><span class="ct-36a801"> </span><span class="ct-995aac">-</span><span class="ct-36a801"> </span><span class="ct-2704a7">scrollHeight</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801">),</span></span><span class="line"><span class="ct-36a801">      animated: </span><span class="ct-09cabd">false</span><span class="ct-36a801">,</span></span><span class="line"><span class="ct-36a801">    });</span></span><span class="line"></span><span class="line"><span class="ct-36a801">    </span><span class="ct-2704a7">scrollHeight</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-2704a7">h</span><span class="ct-36a801">;</span></span><span class="line"><span class="ct-36a801">  }, []);</span></span><span class="line"></span><span class="line"><span class="ct-36a801">  </span><span class="ct-8d188c">// onInteraction wraps interaction to preserve scroll position</span></span><span class="line"><span class="ct-36a801">  </span><span class="ct-0f7321">const</span><span class="ct-36a801"> </span><span class="ct-03f514">onInteraction</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-498eca">useCallback</span><span class="ct-36a801">(</span></span><span class="line"><span class="ct-36a801">    () </span><span class="ct-0f7321">=&gt;</span><span class="ct-36a801"> {</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">shouldKeepScrollPosition</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-09cabd">true</span><span class="ct-36a801">;</span></span><span class="line"></span><span class="line"><span class="ct-36a801">      </span><span class="ct-03f514">setTimeout</span><span class="ct-36a801">(() </span><span class="ct-0f7321">=&gt;</span><span class="ct-36a801"> {</span></span><span class="line"><span class="ct-36a801">        </span><span class="ct-498eca">interact</span><span class="ct-36a801">();</span></span><span class="line"><span class="ct-36a801">      }, </span><span class="ct-87fdb6">0</span><span class="ct-36a801">);</span></span><span class="line"></span><span class="line"><span class="ct-36a801">      </span><span class="ct-03f514">setTimeout</span><span class="ct-36a801">(() </span><span class="ct-0f7321">=&gt;</span><span class="ct-36a801"> {</span></span><span class="line"><span class="ct-36a801">        </span><span class="ct-2704a7">shouldKeepScrollPosition</span><span class="ct-36a801">.</span><span class="ct-2704a7">current</span><span class="ct-36a801"> </span><span class="ct-995aac">=</span><span class="ct-36a801"> </span><span class="ct-09cabd">false</span><span class="ct-36a801">;</span></span><span class="line"><span class="ct-36a801">      }, </span><span class="ct-87fdb6">500</span><span class="ct-36a801">);</span></span><span class="line"><span class="ct-36a801">    },</span></span><span class="line"><span class="ct-36a801">    [</span><span class="ct-2704a7">setSelectedSubThemes</span><span class="ct-36a801">],</span></span><span class="line"><span class="ct-36a801">  );</span></span><span class="line"><span class="ct-36a801">  </span></span><span class="line"><span class="ct-36a801">  </span><span class="ct-995aac">return</span><span class="ct-36a801"> (</span></span><span class="line"><span class="ct-36a801">    </span><span class="ct-995aac">&lt;</span><span class="ct-5ff58d">FlatList</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-8d188c">// ...required FlatList options</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">ref</span><span class="ct-995aac">=</span><span class="ct-36a801">{</span><span class="ct-2704a7">ref</span><span class="ct-36a801">}</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">onContentSizeChange</span><span class="ct-995aac">=</span><span class="ct-36a801">{</span><span class="ct-2704a7">onContentSizeChange</span><span class="ct-36a801">}</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">onRefresh</span><span class="ct-995aac">=</span><span class="ct-36a801">{</span><span class="ct-2704a7">onRefresh</span><span class="ct-36a801">}</span></span><span class="line"><span class="ct-36a801">      </span><span class="ct-2704a7">onScroll</span><span class="ct-995aac">=</span><span class="ct-36a801">{</span><span class="ct-2704a7">onScroll</span><span class="ct-36a801">}</span></span><span class="line"><span class="ct-36a801">    </span><span class="ct-995aac">/&gt;</span></span><span class="line"><span class="ct-36a801">  )</span></span><span class="line"><span class="ct-36a801">}</span></span></code></pre><!--]--></div><style>.ct-5ff58d{color:#FFA657}.ct-03d3d5{color:#79C0FF}.ct-8dee8d{color:#79C0FF}.ct-2704a7{color:#C9D1D9}.ct-09cabd{color:#79C0FF}.ct-87fdb6{color:#79C0FF}.ct-03f514{color:#79C0FF}.ct-5b3757{color:#FFA657}.ct-02453f{color:#FFA657}.ct-cee0e9{color:#FF7B72}.ct-26da6a{color:#D2A8FF}.ct-0ed0cd{color:#C9D1D9}.ct-0506c3{color:#FF7B72}.ct-d39a2a{color:#79C0FF}.ct-498eca{color:#D2A8FF}.ct-995aac{color:#FF7B72}.ct-b4fb03{color:#FFA657}.ct-36a801{color:#C9D1D9}.ct-0f7321{color:#FF7B72}.ct-8d188c{color:#8B949E}.light .ct-8d188c{color:#93A1A1}.light .ct-0f7321{color:#073642}.light .ct-36a801{color:#657B83}.light .ct-b4fb03{color:#268BD2}.light .ct-995aac{color:#859900}.light .ct-498eca{color:#268BD2}.light .ct-d39a2a{color:#859900}.light .ct-0506c3{color:#073642}.light .ct-0ed0cd{color:#657B83}.light .ct-26da6a{color:#268BD2}.light .ct-cee0e9{color:#859900}.light .ct-02453f{color:#268BD2}.light .ct-5b3757{color:#657B83}.light .ct-03f514{color:#268BD2}.light .ct-87fdb6{color:#D33682}.light .ct-09cabd{color:#B58900}.light .ct-2704a7{color:#268BD2}.light .ct-8dee8d{color:#268BD2}.light .ct-03d3d5{color:#859900}.light .ct-5ff58d{color:#657B83}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497786}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="router-link-active _active_192pu_81 _link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Preserve FlatList Scroll Position In React Native</h1><article><div><p><!--[-->Sometimes you need to keep scroll position of <code><!--[-->FlatList<!--]--></code> in React Native after some user interactions.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-cd0080">// interact() is doing some stuff, that changes FlatList scroll size</span></span><span class="line"><span class="ct-5fb3de">type</span><span class="ct-574849"> </span><span class="ct-962ae9">Props</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> { </span><span class="ct-4702b7">interact</span><span class="ct-35de31">:</span><span class="ct-574849"> () </span><span class="ct-5fb3de">=&gt;</span><span class="ct-574849"> </span><span class="ct-1df086">void</span><span class="ct-574849">; }</span></span><span class="line"></span><span class="line"><span class="ct-cba0df">const</span><span class="ct-a5419a"> </span><span class="ct-82b48d">SomeList</span><span class="ct-88c97b">:</span><span class="ct-a5419a"> </span><span class="ct-4e09fa">FC</span><span class="ct-a5419a">&lt;</span><span class="ct-4e09fa">Props</span><span class="ct-a5419a">&gt; </span><span class="ct-88c97b">=</span><span class="ct-a5419a"> ({ </span><span class="ct-c49042">interact</span><span class="ct-a5419a"> }) </span><span class="ct-cba0df">=&gt;</span><span class="ct-a5419a"> {</span></span><span class="line"><span class="ct-574849">  </span><span class="ct-5fb3de">const</span><span class="ct-574849"> </span><span class="ct-b9f460">scrollPosition</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-4702b7">useRef</span><span class="ct-574849">(</span><span class="ct-5e6b92">0</span><span class="ct-574849">);</span></span><span class="line"><span class="ct-574849">  </span><span class="ct-5fb3de">const</span><span class="ct-574849"> </span><span class="ct-b9f460">scrollHeight</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-4702b7">useRef</span><span class="ct-574849">(</span><span class="ct-5e6b92">0</span><span class="ct-574849">);</span></span><span class="line"><span class="ct-574849">  </span></span><span class="line"><span class="ct-574849">  </span><span class="ct-cd0080">// set it to `true` before interaction and back to `false` right after</span></span><span class="line"><span class="ct-574849">  </span><span class="ct-5fb3de">const</span><span class="ct-574849"> </span><span class="ct-b9f460">shouldKeepScrollPosition</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-4702b7">useRef</span><span class="ct-574849">(</span><span class="ct-bbd9de">false</span><span class="ct-574849">);</span></span><span class="line"></span><span class="line"><span class="ct-574849">  </span><span class="ct-5fb3de">const</span><span class="ct-574849"> </span><span class="ct-b9f460">onScroll</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-4702b7">useCallback</span><span class="ct-574849">(</span></span><span class="line"><span class="ct-a5419a">    (</span><span class="ct-c49042">event</span><span class="ct-88c97b">:</span><span class="ct-a5419a"> </span><span class="ct-4e09fa">NativeSyntheticEvent</span><span class="ct-a5419a">&lt;</span><span class="ct-4e09fa">NativeScrollEvent</span><span class="ct-a5419a">&gt;) </span><span class="ct-cba0df">=&gt;</span><span class="ct-a5419a"> {</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">scrollPosition</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-d9dfd6">event</span><span class="ct-574849">.</span><span class="ct-d9dfd6">nativeEvent</span><span class="ct-574849">.</span><span class="ct-d9dfd6">contentOffset</span><span class="ct-574849">.</span><span class="ct-d9dfd6">y</span><span class="ct-574849">;</span></span><span class="line"><span class="ct-574849">    },</span></span><span class="line"><span class="ct-574849">    [],</span></span><span class="line"><span class="ct-574849">  );</span></span><span class="line"></span><span class="line"><span class="ct-a5419a">  </span><span class="ct-cba0df">const</span><span class="ct-a5419a"> </span><span class="ct-c04049">onContentSizeChange</span><span class="ct-a5419a"> </span><span class="ct-88c97b">=</span><span class="ct-a5419a"> </span><span class="ct-82b48d">useCallback</span><span class="ct-a5419a">((</span><span class="ct-c49042">_</span><span class="ct-88c97b">:</span><span class="ct-a5419a"> </span><span class="ct-7dc0b2">number</span><span class="ct-a5419a">, </span><span class="ct-c49042">h</span><span class="ct-88c97b">:</span><span class="ct-a5419a"> </span><span class="ct-7dc0b2">number</span><span class="ct-a5419a">) </span><span class="ct-cba0df">=&gt;</span><span class="ct-a5419a"> {</span></span><span class="line"><span class="ct-574849">    </span><span class="ct-35de31">if</span><span class="ct-574849"> (</span><span class="ct-35de31">!</span><span class="ct-d9dfd6">shouldKeepScrollPosition</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849">) {</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">scrollHeight</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-d9dfd6">h</span><span class="ct-574849">;</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-35de31">return</span><span class="ct-574849">;</span></span><span class="line"><span class="ct-574849">    }</span></span><span class="line"></span><span class="line"><span class="ct-574849">    </span><span class="ct-d9dfd6">ref</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849">?.</span><span class="ct-4702b7">scrollToOffset</span><span class="ct-574849">({</span></span><span class="line"><span class="ct-574849">      offset: </span><span class="ct-d9dfd6">scrollPosition</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849"> </span><span class="ct-35de31">+</span><span class="ct-574849"> (</span><span class="ct-d9dfd6">h</span><span class="ct-574849"> </span><span class="ct-35de31">-</span><span class="ct-574849"> </span><span class="ct-d9dfd6">scrollHeight</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849">),</span></span><span class="line"><span class="ct-574849">      animated: </span><span class="ct-bbd9de">false</span><span class="ct-574849">,</span></span><span class="line"><span class="ct-574849">    });</span></span><span class="line"></span><span class="line"><span class="ct-574849">    </span><span class="ct-d9dfd6">scrollHeight</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-d9dfd6">h</span><span class="ct-574849">;</span></span><span class="line"><span class="ct-574849">  }, []);</span></span><span class="line"></span><span class="line"><span class="ct-574849">  </span><span class="ct-cd0080">// onInteraction wraps interaction to preserve scroll position</span></span><span class="line"><span class="ct-574849">  </span><span class="ct-5fb3de">const</span><span class="ct-574849"> </span><span class="ct-b9f460">onInteraction</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-4702b7">useCallback</span><span class="ct-574849">(</span></span><span class="line"><span class="ct-574849">    () </span><span class="ct-5fb3de">=&gt;</span><span class="ct-574849"> {</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">shouldKeepScrollPosition</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-bbd9de">true</span><span class="ct-574849">;</span></span><span class="line"></span><span class="line"><span class="ct-574849">      </span><span class="ct-b9f460">setTimeout</span><span class="ct-574849">(() </span><span class="ct-5fb3de">=&gt;</span><span class="ct-574849"> {</span></span><span class="line"><span class="ct-574849">        </span><span class="ct-4702b7">interact</span><span class="ct-574849">();</span></span><span class="line"><span class="ct-574849">      }, </span><span class="ct-5e6b92">0</span><span class="ct-574849">);</span></span><span class="line"></span><span class="line"><span class="ct-574849">      </span><span class="ct-b9f460">setTimeout</span><span class="ct-574849">(() </span><span class="ct-5fb3de">=&gt;</span><span class="ct-574849"> {</span></span><span class="line"><span class="ct-574849">        </span><span class="ct-d9dfd6">shouldKeepScrollPosition</span><span class="ct-574849">.</span><span class="ct-d9dfd6">current</span><span class="ct-574849"> </span><span class="ct-35de31">=</span><span class="ct-574849"> </span><span class="ct-bbd9de">false</span><span class="ct-574849">;</span></span><span class="line"><span class="ct-574849">      }, </span><span class="ct-5e6b92">500</span><span class="ct-574849">);</span></span><span class="line"><span class="ct-574849">    },</span></span><span class="line"><span class="ct-574849">    [</span><span class="ct-d9dfd6">setSelectedSubThemes</span><span class="ct-574849">],</span></span><span class="line"><span class="ct-574849">  );</span></span><span class="line"><span class="ct-574849">  </span></span><span class="line"><span class="ct-574849">  </span><span class="ct-35de31">return</span><span class="ct-574849"> (</span></span><span class="line"><span class="ct-574849">    </span><span class="ct-35de31">&lt;</span><span class="ct-87c7b6">FlatList</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-cd0080">// ...required FlatList options</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">ref</span><span class="ct-35de31">=</span><span class="ct-574849">{</span><span class="ct-d9dfd6">ref</span><span class="ct-574849">}</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">onContentSizeChange</span><span class="ct-35de31">=</span><span class="ct-574849">{</span><span class="ct-d9dfd6">onContentSizeChange</span><span class="ct-574849">}</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">onRefresh</span><span class="ct-35de31">=</span><span class="ct-574849">{</span><span class="ct-d9dfd6">onRefresh</span><span class="ct-574849">}</span></span><span class="line"><span class="ct-574849">      </span><span class="ct-d9dfd6">onScroll</span><span class="ct-35de31">=</span><span class="ct-574849">{</span><span class="ct-d9dfd6">onScroll</span><span class="ct-574849">}</span></span><span class="line"><span class="ct-574849">    </span><span class="ct-35de31">/&gt;</span></span><span class="line"><span class="ct-574849">  )</span></span><span class="line"><span class="ct-574849">}</span></span></code></pre><!--]--></div><style>.ct-87c7b6{color:#FFA657}.ct-7dc0b2{color:#79C0FF}.ct-c04049{color:#79C0FF}.ct-d9dfd6{color:#C9D1D9}.ct-bbd9de{color:#79C0FF}.ct-5e6b92{color:#79C0FF}.ct-b9f460{color:#79C0FF}.ct-c49042{color:#FFA657}.ct-4e09fa{color:#FFA657}.ct-88c97b{color:#FF7B72}.ct-82b48d{color:#D2A8FF}.ct-a5419a{color:#C9D1D9}.ct-cba0df{color:#FF7B72}.ct-1df086{color:#79C0FF}.ct-4702b7{color:#D2A8FF}.ct-35de31{color:#FF7B72}.ct-962ae9{color:#FFA657}.ct-574849{color:#C9D1D9}.ct-5fb3de{color:#FF7B72}.ct-cd0080{color:#8B949E}.light .ct-cd0080{color:#93A1A1}.light .ct-5fb3de{color:#073642}.light .ct-574849{color:#657B83}.light .ct-962ae9{color:#268BD2}.light .ct-35de31{color:#859900}.light .ct-4702b7{color:#268BD2}.light .ct-1df086{color:#859900}.light .ct-cba0df{color:#073642}.light .ct-a5419a{color:#657B83}.light .ct-82b48d{color:#268BD2}.light .ct-88c97b{color:#859900}.light .ct-4e09fa{color:#268BD2}.light .ct-c49042{color:#657B83}.light .ct-b9f460{color:#268BD2}.light .ct-5e6b92{color:#D33682}.light .ct-bbd9de{color:#B58900}.light .ct-d9dfd6{color:#268BD2}.light .ct-c04049{color:#268BD2}.light .ct-7dc0b2{color:#859900}.light .ct-87c7b6{color:#657B83}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360063}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/react-native/react-native-app-auth/_payload.js b/frontend/react-native/react-native-app-auth/_payload.js
index 2e6b1cb..ea473e9 100644
--- a/frontend/react-native/react-native-app-auth/_payload.js
+++ b/frontend/react-native/react-native-app-auth/_payload.js
@@ -1 +1 @@
-export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Ul5QREg0An":null},prerenderedAt:1667812499144}
\ No newline at end of file
+export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Ul5QREg0An":null},prerenderedAt:1667813361208}
\ No newline at end of file
diff --git a/frontend/react-native/react-native-app-auth/index.html b/frontend/react-native/react-native-app-auth/index.html
index 5d87046..1e6a09c 100644
--- a/frontend/react-native/react-native-app-auth/index.html
+++ b/frontend/react-native/react-native-app-auth/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/frontend/react-native/react-native-app-auth/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><style>._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/frontend/react-native/react-native-app-auth/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><style>._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><article><h1></h1><!----></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/react-native-app-auth/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:c,value:c,unknown:a,forced:b}},_errors:{"content-query-Ul5QREg0An":a},serverRendered:a,config:{public:{content:{clientDB:{isSPA:b,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:b,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812499144}}(true,false,"dark","shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/HomeReference.e315914b.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><article><h1></h1><!----></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/react-native-app-auth/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:c,value:c,unknown:a,forced:b}},_errors:{"content-query-Ul5QREg0An":a},serverRendered:a,config:{public:{content:{clientDB:{isSPA:b,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:b,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813361208}}(true,false,"dark","shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/HomeReference.dcdfc2c4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/react-native/useful-comands/_payload.js b/frontend/react-native/useful-comands/_payload.js
index 4db18c2..8bbb42f 100644
--- a/frontend/react-native/useful-comands/_payload.js
+++ b/frontend/react-native/useful-comands/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:X,_path:Y}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-90RMToCghI":{_path:Y,_dir:"react-native",_draft:y,_partial:y,_locale:"en",_empty:y,title:X,description:g,excerpt:{type:Z,children:[{type:a,tag:i,props:{id:z},children:[{type:b,value:A}]},{type:a,tag:f,props:{code:B,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:B}]}]}]},{type:a,tag:i,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:f,props:{code:E,language:_},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:E}]}]}]},{type:a,tag:i,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:$,props:{},children:[{type:b,value:aa}]},{type:a,tag:f,props:{code:H,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:H}]}]}]},{type:a,tag:i,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:f,props:{code:K,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:K}]}]}]},{type:a,tag:i,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:ab,props:{},children:[{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:r,rel:[n]},children:[{type:b,value:r}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:s,rel:[n]},children:[{type:b,value:s}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:t,rel:[n]},children:[{type:b,value:t}]}]}]},{type:a,tag:u,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:f,props:{code:P,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:P}]}]}]},{type:a,tag:u,props:{id:Q},children:[{type:b,value:R}]},{type:a,tag:f,props:{code:S,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:S}]}]}]}]},body:{type:Z,children:[{type:a,tag:i,props:{id:z},children:[{type:b,value:A}]},{type:a,tag:f,props:{code:B,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb logcat com.application:I "}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"\"*:S\""}]}]}]}]}]},{type:a,tag:i,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:f,props:{code:E,language:_},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"keytool -printcert -jarfile "}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:ac}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:ac}]}]}]}]}]},{type:a,tag:i,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:$,props:{},children:[{type:b,value:aa}]},{type:a,tag:f,props:{code:H,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"npx react-native bundle \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --platform android \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --dev "}]},{type:a,tag:c,props:{class:U},children:[{type:b,value:"false"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --entry-file index.js \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --bundle-output android\u002Fapp\u002Fsrc\u002Fmain\u002Fassets\u002Findex.android.bundle \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --assets-dest android\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002F"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:U},children:[{type:b,value:ad}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" android "}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fgradlew assembleDebug"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# do your stuff"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:".\u002Fgradlew clean"}]}]}]}]}]},{type:a,tag:i,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:f,props:{code:K,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:U},children:[{type:b,value:ad}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fandroid \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:ae}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fgradlew assembleRelease \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:ae}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" adb install .\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fapp-release.apk"}]}]}]}]}]},{type:a,tag:i,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:ab,props:{},children:[{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:r,rel:[n]},children:[{type:b,value:r}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:s,rel:[n]},children:[{type:b,value:s}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:t,rel:[n]},children:[{type:b,value:t}]}]}]},{type:a,tag:u,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:f,props:{code:P,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# ios "}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"xcrun simctl openurl booted "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# android"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb shell am start -W -a android.intent.action.VIEW -d "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"com.application"}]}]}]}]}]},{type:a,tag:u,props:{id:Q},children:[{type:b,value:R}]},{type:a,tag:f,props:{code:S,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"PACKAGE="}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"\"com.application\""}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb shell pm set-app-links --package "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" 0 all "}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  adb shell pm verify-app-links --re-verify "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:af}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-7680f5{color:#8B949E}.ct-3aa5ab{color:#FF7B72}.ct-c76252{color:#79C0FF}.ct-79725d{color:#C9D1D9}.ct-b8df69{color:#C9D1D9}.ct-3cfff2{color:#A5D6FF}.ct-04e482{color:#C9D1D9}.light .ct-04e482{color:#657B83}.light .ct-3cfff2{color:#2AA198}.light .ct-b8df69{color:#859900}.light .ct-79725d{color:#268BD2}.light .ct-c76252{color:#268BD2}.light .ct-3aa5ab{color:#859900}.light .ct-7680f5{color:#93A1A1}"}]}],toc:{title:g,searchDepth:k,depth:k,links:[{id:z,depth:k,text:A},{id:C,depth:k,text:D},{id:F,depth:k,text:G},{id:I,depth:k,text:J},{id:L,depth:k,text:M,children:[{id:N,depth:ag,text:O},{id:Q,depth:ag,text:R}]}]}},_type:"markdown",_id:"content:Frontend:React Native:Useful comands.md",_source:"content",_file:"Frontend\u002FReact Native\u002FUseful comands.md",_extension:"md"}},prerenderedAt:1667812497862}}("element","text","span","line","ct-04e482","code","","pre","h2","shell",2,"li","a","nofollow","ct-b8df69","$","ct-79725d","https:\u002F\u002Fzarah.dev\u002F2022\u002F02\u002F08\u002Fandroid12-deeplinks.html","https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fapp-links\u002Fverify-site-associations#invoke-domain-verification","https:\u002F\u002Fdigitalassetlinks.googleapis.com\u002Fv1\u002Fstatements:list?source.web.site=https:\u002F\u002Fmiin.ru&relation=delegate_permission\u002Fcommon.handle_all_urls","h3","ct-3cfff2","ct-3aa5ab","&&",false,"show-android-logcat","Show android logcat","adb logcat com.application:I \"*:S\"\n","get-apks-sha-256","Get .apk's SHA-256","keytool -printcert -jarfile \"$1\"\n","assemble-debug-release-on-android","Assemble debug release on Android","npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android\u002Fapp\u002Fsrc\u002Fmain\u002Fassets\u002Findex.android.bundle \\\n  --assets-dest android\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002F\n\ncd android && .\u002Fgradlew assembleDebug\n\n# do your stuff\n\n.\u002Fgradlew clean\n","send-release-to-android-device","Send release to Android device","cd .\u002Fandroid \\\n  && .\u002Fgradlew assembleRelease \\\n  && adb install .\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fapp-release.apk\n","deep-links","Deep links","open-deep-links","Open deep links","# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","reverify-links-on-android","Reverify links on Android","PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","1","ct-c76252"," \\","ct-7680f5","Useful Comands","\u002Ffrontend\u002Freact-native\u002Fuseful-comands","root","bash","p","Packages release with bundled resources.","ul","\"","cd","  ","PACKAGE",3))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:X,_path:Y}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-90RMToCghI":{_path:Y,_dir:"react-native",_draft:y,_partial:y,_locale:"en",_empty:y,title:X,description:g,excerpt:{type:Z,children:[{type:a,tag:i,props:{id:z},children:[{type:b,value:A}]},{type:a,tag:f,props:{code:B,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:B}]}]}]},{type:a,tag:i,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:f,props:{code:E,language:_},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:E}]}]}]},{type:a,tag:i,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:$,props:{},children:[{type:b,value:aa}]},{type:a,tag:f,props:{code:H,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:H}]}]}]},{type:a,tag:i,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:f,props:{code:K,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:K}]}]}]},{type:a,tag:i,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:ab,props:{},children:[{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:r,rel:[n]},children:[{type:b,value:r}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:s,rel:[n]},children:[{type:b,value:s}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:t,rel:[n]},children:[{type:b,value:t}]}]}]},{type:a,tag:u,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:f,props:{code:P,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:P}]}]}]},{type:a,tag:u,props:{id:Q},children:[{type:b,value:R}]},{type:a,tag:f,props:{code:S,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:S}]}]}]}]},body:{type:Z,children:[{type:a,tag:i,props:{id:z},children:[{type:b,value:A}]},{type:a,tag:f,props:{code:B,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb logcat com.application:I "}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"\"*:S\""}]}]}]}]}]},{type:a,tag:i,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:f,props:{code:E,language:_},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"keytool -printcert -jarfile "}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:ac}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:ac}]}]}]}]}]},{type:a,tag:i,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:$,props:{},children:[{type:b,value:aa}]},{type:a,tag:f,props:{code:H,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"npx react-native bundle \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --platform android \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --dev "}]},{type:a,tag:c,props:{class:U},children:[{type:b,value:"false"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --entry-file index.js \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --bundle-output android\u002Fapp\u002Fsrc\u002Fmain\u002Fassets\u002Findex.android.bundle \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  --assets-dest android\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002F"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:U},children:[{type:b,value:ad}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" android "}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fgradlew assembleDebug"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# do your stuff"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:".\u002Fgradlew clean"}]}]}]}]}]},{type:a,tag:i,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:f,props:{code:K,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:U},children:[{type:b,value:ad}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fandroid \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:ae}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fgradlew assembleRelease \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:ae}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" adb install .\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fapp-release.apk"}]}]}]}]}]},{type:a,tag:i,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:ab,props:{},children:[{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:r,rel:[n]},children:[{type:b,value:r}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:s,rel:[n]},children:[{type:b,value:s}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:t,rel:[n]},children:[{type:b,value:t}]}]}]},{type:a,tag:u,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:f,props:{code:P,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# ios "}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"xcrun simctl openurl booted "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# android"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb shell am start -W -a android.intent.action.VIEW -d "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"com.application"}]}]}]}]}]},{type:a,tag:u,props:{id:Q},children:[{type:b,value:R}]},{type:a,tag:f,props:{code:S,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"PACKAGE="}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"\"com.application\""}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb shell pm set-app-links --package "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" 0 all "}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"  adb shell pm verify-app-links --re-verify "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:af}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-b49f06{color:#8B949E}.ct-962490{color:#FF7B72}.ct-445c29{color:#79C0FF}.ct-a8ebfa{color:#C9D1D9}.ct-1f82bb{color:#C9D1D9}.ct-bdbf7d{color:#A5D6FF}.ct-0bd10a{color:#C9D1D9}.light .ct-0bd10a{color:#657B83}.light .ct-bdbf7d{color:#2AA198}.light .ct-1f82bb{color:#859900}.light .ct-a8ebfa{color:#268BD2}.light .ct-445c29{color:#268BD2}.light .ct-962490{color:#859900}.light .ct-b49f06{color:#93A1A1}"}]}],toc:{title:g,searchDepth:k,depth:k,links:[{id:z,depth:k,text:A},{id:C,depth:k,text:D},{id:F,depth:k,text:G},{id:I,depth:k,text:J},{id:L,depth:k,text:M,children:[{id:N,depth:ag,text:O},{id:Q,depth:ag,text:R}]}]}},_type:"markdown",_id:"content:Frontend:React Native:Useful comands.md",_source:"content",_file:"Frontend\u002FReact Native\u002FUseful comands.md",_extension:"md"}},prerenderedAt:1667813360132}}("element","text","span","line","ct-0bd10a","code","","pre","h2","shell",2,"li","a","nofollow","ct-1f82bb","$","ct-a8ebfa","https:\u002F\u002Fzarah.dev\u002F2022\u002F02\u002F08\u002Fandroid12-deeplinks.html","https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fapp-links\u002Fverify-site-associations#invoke-domain-verification","https:\u002F\u002Fdigitalassetlinks.googleapis.com\u002Fv1\u002Fstatements:list?source.web.site=https:\u002F\u002Fmiin.ru&relation=delegate_permission\u002Fcommon.handle_all_urls","h3","ct-bdbf7d","ct-962490","&&",false,"show-android-logcat","Show android logcat","adb logcat com.application:I \"*:S\"\n","get-apks-sha-256","Get .apk's SHA-256","keytool -printcert -jarfile \"$1\"\n","assemble-debug-release-on-android","Assemble debug release on Android","npx react-native bundle \\\n  --platform android \\\n  --dev false \\\n  --entry-file index.js \\\n  --bundle-output android\u002Fapp\u002Fsrc\u002Fmain\u002Fassets\u002Findex.android.bundle \\\n  --assets-dest android\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002F\n\ncd android && .\u002Fgradlew assembleDebug\n\n# do your stuff\n\n.\u002Fgradlew clean\n","send-release-to-android-device","Send release to Android device","cd .\u002Fandroid \\\n  && .\u002Fgradlew assembleRelease \\\n  && adb install .\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fapp-release.apk\n","deep-links","Deep links","open-deep-links","Open deep links","# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","reverify-links-on-android","Reverify links on Android","PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n  adb shell pm verify-app-links --re-verify $PACKAGE\n","1","ct-445c29"," \\","ct-b49f06","Useful Comands","\u002Ffrontend\u002Freact-native\u002Fuseful-comands","root","bash","p","Packages release with bundled resources.","ul","\"","cd","  ","PACKAGE",3))
\ No newline at end of file
diff --git a/frontend/react-native/useful-comands/index.html b/frontend/react-native/useful-comands/index.html
index 2a2c9a3..8acc7f3 100644
--- a/frontend/react-native/useful-comands/index.html
+++ b/frontend/react-native/useful-comands/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Useful Comands • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/frontend/react-native/useful-comands/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseUl.7c14583d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.f5f48b70.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.ed0e0070.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Useful Comands • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/frontend/react-native/useful-comands/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseUl.85dc1033.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.94808e98.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.af0f4af9.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react-native/useful-comands" class="router-link-active _active_192pu_81 _link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Useful Comands</h1><article><div><h2 id="show-android-logcat"><a href="#show-android-logcat"><!--[-->Show android logcat<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-04e482">adb logcat com.application:I </span><span class="ct-3cfff2">&quot;*:S&quot;</span></span></code></pre><!--]--></div><h2 id="get-apks-sha-256"><a href="#get-apks-sha-256"><!--[-->Get .apk&#39;s SHA-256<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-04e482">keytool -printcert -jarfile </span><span class="ct-3cfff2">&quot;</span><span class="ct-b8df69">$</span><span class="ct-79725d">1</span><span class="ct-3cfff2">&quot;</span></span></code></pre><!--]--></div><h2 id="assemble-debug-release-on-android"><a href="#assemble-debug-release-on-android"><!--[-->Assemble debug release on Android<!--]--></a></h2><p><!--[-->Packages release with bundled resources.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-04e482">npx react-native bundle \</span></span><span class="line"><span class="ct-04e482">  --platform android \</span></span><span class="line"><span class="ct-04e482">  --dev </span><span class="ct-c76252">false</span><span class="ct-04e482"> \</span></span><span class="line"><span class="ct-04e482">  --entry-file index.js \</span></span><span class="line"><span class="ct-04e482">  --bundle-output android/app/src/main/assets/index.android.bundle \</span></span><span class="line"><span class="ct-04e482">  --assets-dest android/app/src/main/res/</span></span><span class="line"></span><span class="line"><span class="ct-c76252">cd</span><span class="ct-04e482"> android </span><span class="ct-3aa5ab">&amp;&amp;</span><span class="ct-04e482"> ./gradlew assembleDebug</span></span><span class="line"></span><span class="line"><span class="ct-7680f5"># do your stuff</span></span><span class="line"></span><span class="line"><span class="ct-04e482">./gradlew clean</span></span></code></pre><!--]--></div><h2 id="send-release-to-android-device"><a href="#send-release-to-android-device"><!--[-->Send release to Android device<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-c76252">cd</span><span class="ct-04e482"> ./android \</span></span><span class="line"><span class="ct-04e482">  </span><span class="ct-3aa5ab">&amp;&amp;</span><span class="ct-04e482"> ./gradlew assembleRelease \</span></span><span class="line"><span class="ct-04e482">  </span><span class="ct-3aa5ab">&amp;&amp;</span><span class="ct-04e482"> adb install ./app/build/outputs/apk/release/app-release.apk</span></span></code></pre><!--]--></div><h2 id="deep-links"><a href="#deep-links"><!--[-->Deep links<!--]--></a></h2><ul><!--[--><li><!--[--><a href="https://zarah.dev/2022/02/08/android12-deeplinks.html" rel="nofollow" target="_blank"><!--[-->https://zarah.dev/2022/02/08/android12-deeplinks.html<!--]--></a><!--]--></li><li><!--[--><a href="https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification" rel="nofollow" target="_blank"><!--[-->https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification<!--]--></a><!--]--></li><li><!--[--><a href="https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&amp;relation=delegate_permission/common.handle_all_urls" rel="nofollow" target="_blank"><!--[-->https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&amp;relation=delegate_permission/common.handle_all_urls<!--]--></a><!--]--></li><!--]--></ul><h3 id="open-deep-links"><a href="#open-deep-links"><!--[-->Open deep links<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-7680f5"># ios </span></span><span class="line"><span class="ct-04e482">xcrun simctl openurl booted </span><span class="ct-b8df69">$</span><span class="ct-79725d">1</span></span><span class="line"></span><span class="line"><span class="ct-7680f5"># android</span></span><span class="line"><span class="ct-04e482">adb shell am start -W -a android.intent.action.VIEW -d </span><span class="ct-b8df69">$</span><span class="ct-79725d">1</span><span class="ct-04e482"> \</span></span><span class="line"><span class="ct-04e482">com.application</span></span></code></pre><!--]--></div><h3 id="reverify-links-on-android"><a href="#reverify-links-on-android"><!--[-->Reverify links on Android<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-04e482">PACKAGE=</span><span class="ct-3cfff2">&quot;com.application&quot;</span></span><span class="line"></span><span class="line"><span class="ct-04e482">adb shell pm set-app-links --package </span><span class="ct-b8df69">$</span><span class="ct-79725d">PACKAGE</span><span class="ct-04e482"> 0 all </span><span class="ct-3aa5ab">&amp;&amp;</span><span class="ct-04e482"> \</span></span><span class="line"><span class="ct-04e482">  adb shell pm verify-app-links --re-verify </span><span class="ct-b8df69">$</span><span class="ct-79725d">PACKAGE</span></span></code></pre><!--]--></div><style>.ct-7680f5{color:#8B949E}.ct-3aa5ab{color:#FF7B72}.ct-c76252{color:#79C0FF}.ct-79725d{color:#C9D1D9}.ct-b8df69{color:#C9D1D9}.ct-3cfff2{color:#A5D6FF}.ct-04e482{color:#C9D1D9}.light .ct-04e482{color:#657B83}.light .ct-3cfff2{color:#2AA198}.light .ct-b8df69{color:#859900}.light .ct-79725d{color:#268BD2}.light .ct-c76252{color:#268BD2}.light .ct-3aa5ab{color:#859900}.light .ct-7680f5{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/useful-comands/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497862}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseUl.7c14583d.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.f5f48b70.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.ed0e0070.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react-native/useful-comands" class="router-link-active _active_192pu_81 _link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Useful Comands</h1><article><div><h2 id="show-android-logcat"><a href="#show-android-logcat"><!--[-->Show android logcat<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-0bd10a">adb logcat com.application:I </span><span class="ct-bdbf7d">&quot;*:S&quot;</span></span></code></pre><!--]--></div><h2 id="get-apks-sha-256"><a href="#get-apks-sha-256"><!--[-->Get .apk&#39;s SHA-256<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-0bd10a">keytool -printcert -jarfile </span><span class="ct-bdbf7d">&quot;</span><span class="ct-1f82bb">$</span><span class="ct-a8ebfa">1</span><span class="ct-bdbf7d">&quot;</span></span></code></pre><!--]--></div><h2 id="assemble-debug-release-on-android"><a href="#assemble-debug-release-on-android"><!--[-->Assemble debug release on Android<!--]--></a></h2><p><!--[-->Packages release with bundled resources.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-0bd10a">npx react-native bundle \</span></span><span class="line"><span class="ct-0bd10a">  --platform android \</span></span><span class="line"><span class="ct-0bd10a">  --dev </span><span class="ct-445c29">false</span><span class="ct-0bd10a"> \</span></span><span class="line"><span class="ct-0bd10a">  --entry-file index.js \</span></span><span class="line"><span class="ct-0bd10a">  --bundle-output android/app/src/main/assets/index.android.bundle \</span></span><span class="line"><span class="ct-0bd10a">  --assets-dest android/app/src/main/res/</span></span><span class="line"></span><span class="line"><span class="ct-445c29">cd</span><span class="ct-0bd10a"> android </span><span class="ct-962490">&amp;&amp;</span><span class="ct-0bd10a"> ./gradlew assembleDebug</span></span><span class="line"></span><span class="line"><span class="ct-b49f06"># do your stuff</span></span><span class="line"></span><span class="line"><span class="ct-0bd10a">./gradlew clean</span></span></code></pre><!--]--></div><h2 id="send-release-to-android-device"><a href="#send-release-to-android-device"><!--[-->Send release to Android device<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-445c29">cd</span><span class="ct-0bd10a"> ./android \</span></span><span class="line"><span class="ct-0bd10a">  </span><span class="ct-962490">&amp;&amp;</span><span class="ct-0bd10a"> ./gradlew assembleRelease \</span></span><span class="line"><span class="ct-0bd10a">  </span><span class="ct-962490">&amp;&amp;</span><span class="ct-0bd10a"> adb install ./app/build/outputs/apk/release/app-release.apk</span></span></code></pre><!--]--></div><h2 id="deep-links"><a href="#deep-links"><!--[-->Deep links<!--]--></a></h2><ul><!--[--><li><!--[--><a href="https://zarah.dev/2022/02/08/android12-deeplinks.html" rel="nofollow" target="_blank"><!--[-->https://zarah.dev/2022/02/08/android12-deeplinks.html<!--]--></a><!--]--></li><li><!--[--><a href="https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification" rel="nofollow" target="_blank"><!--[-->https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification<!--]--></a><!--]--></li><li><!--[--><a href="https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&amp;relation=delegate_permission/common.handle_all_urls" rel="nofollow" target="_blank"><!--[-->https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&amp;relation=delegate_permission/common.handle_all_urls<!--]--></a><!--]--></li><!--]--></ul><h3 id="open-deep-links"><a href="#open-deep-links"><!--[-->Open deep links<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-b49f06"># ios </span></span><span class="line"><span class="ct-0bd10a">xcrun simctl openurl booted </span><span class="ct-1f82bb">$</span><span class="ct-a8ebfa">1</span></span><span class="line"></span><span class="line"><span class="ct-b49f06"># android</span></span><span class="line"><span class="ct-0bd10a">adb shell am start -W -a android.intent.action.VIEW -d </span><span class="ct-1f82bb">$</span><span class="ct-a8ebfa">1</span><span class="ct-0bd10a"> \</span></span><span class="line"><span class="ct-0bd10a">com.application</span></span></code></pre><!--]--></div><h3 id="reverify-links-on-android"><a href="#reverify-links-on-android"><!--[-->Reverify links on Android<!--]--></a></h3><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-0bd10a">PACKAGE=</span><span class="ct-bdbf7d">&quot;com.application&quot;</span></span><span class="line"></span><span class="line"><span class="ct-0bd10a">adb shell pm set-app-links --package </span><span class="ct-1f82bb">$</span><span class="ct-a8ebfa">PACKAGE</span><span class="ct-0bd10a"> 0 all </span><span class="ct-962490">&amp;&amp;</span><span class="ct-0bd10a"> \</span></span><span class="line"><span class="ct-0bd10a">  adb shell pm verify-app-links --re-verify </span><span class="ct-1f82bb">$</span><span class="ct-a8ebfa">PACKAGE</span></span></code></pre><!--]--></div><style>.ct-b49f06{color:#8B949E}.ct-962490{color:#FF7B72}.ct-445c29{color:#79C0FF}.ct-a8ebfa{color:#C9D1D9}.ct-1f82bb{color:#C9D1D9}.ct-bdbf7d{color:#A5D6FF}.ct-0bd10a{color:#C9D1D9}.light .ct-0bd10a{color:#657B83}.light .ct-bdbf7d{color:#2AA198}.light .ct-1f82bb{color:#859900}.light .ct-a8ebfa{color:#268BD2}.light .ct-445c29{color:#268BD2}.light .ct-962490{color:#859900}.light .ct-b49f06{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react-native/useful-comands/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360132}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseUl.85dc1033.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.94808e98.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.af0f4af9.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/react/axios-refresh-token-on-react/_payload.js b/frontend/react/axios-refresh-token-on-react/_payload.js
index 9625eb8..ca01cbb 100644
--- a/frontend/react/axios-refresh-token-on-react/_payload.js
+++ b/frontend/react/axios-refresh-token-on-react/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:ae,_path:"\u002Ffrontend\u002Freact",children:[{title:af,_path:ag},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-lzTEE4EzmV":{_path:ag,_dir:"react",_draft:U,_partial:U,_locale:"en",_empty:U,title:af,description:"\u003CApiProvider \u002F\u003E component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.",excerpt:{type:ah,children:[{type:a,tag:ai,props:{},children:[{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:al}]},{type:a,tag:M,props:{code:V,language:am},children:[{type:a,tag:an,props:{},children:[{type:a,tag:M,props:{__ignoreMap:W},children:[{type:c,value:V}]}]}]}]},body:{type:ah,children:[{type:a,tag:ai,props:{},children:[{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:al}]},{type:a,tag:M,props:{code:V,language:am},children:[{type:a,tag:an,props:{},children:[{type:a,tag:M,props:{__ignoreMap:W},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"axios\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"react\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:w},children:[{type:c,value:"interface"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-706917"},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"extends"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-7232c4"},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"void"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  client: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    baseURL: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"});"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aG},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]},{type:a,tag:b,props:{class:aG},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"}) "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      baseURL: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  )."}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"current"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003C() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E(() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F TODO: implement me"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"throw"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"new"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"Error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"not implemented\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, []);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F append `access` token to all requests"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          Authorization: "}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"`Bearer ${"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:"ct-4c3a40"},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"}`"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aS}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aU}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F refreshing interceptor"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"function"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"status"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"==="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-c10737"},children:[{type:c,value:"401"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"&&"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-0f16f1"},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            headers: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              Authorization: "}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"Bearer \""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"();"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aS}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aU}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, ["}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aH}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:a_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"value"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"{{ "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }}"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"        {"}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u003C\u002F"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:a_}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ba}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"useAPI"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ba}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-0f16f1{color:#79C0FF}.ct-c10737{color:#79C0FF}.ct-4c3a40{color:#A5D6FF}.ct-11fa4d{color:#8B949E}.ct-03cd7c{color:#FFA657}.ct-acc80e{color:#79C0FF}.ct-c81972{color:#79C0FF}.ct-2503cc{color:#FF7B72}.ct-e8515f{color:#D2A8FF}.ct-be5dc3{color:#79C0FF}.ct-a6fb7c{color:#FF7B72}.ct-e6282b{color:#FFA657}.ct-7232c4{color:#79C0FF}.ct-706917{color:#FFA657}.ct-799eb0{color:#C9D1D9}.ct-d3a7a8{color:#FF7B72}.ct-d81eef{color:#A5D6FF}.ct-592be9{color:#C9D1D9}.ct-11a550{color:#C9D1D9}.ct-9878b7{color:#FF7B72}.light .ct-9878b7{color:#859900}.light .ct-11a550{color:#657B83}.light .ct-592be9{color:#268BD2}.light .ct-d81eef{color:#2AA198}.light .ct-d3a7a8{color:#073642}.light .ct-799eb0{color:#657B83}.light .ct-706917{color:#268BD2}.light .ct-7232c4{color:#657B83}.light .ct-e6282b{color:#657B83}.light .ct-a6fb7c{color:#859900}.light .ct-be5dc3{color:#859900}.light .ct-e8515f{color:#268BD2}.light .ct-2503cc{color:#073642}.light .ct-c81972{color:#859900}.light .ct-acc80e{color:#268BD2}.light .ct-03cd7c{color:#268BD2}.light .ct-11fa4d{color:#93A1A1}.light .ct-4c3a40{color:#657B83}.light .ct-c10737{color:#D33682}.light .ct-0f16f1{color:#B58900}"}]}],toc:{title:W,searchDepth:bb,depth:bb,links:[]}},_type:"markdown",_id:"content:Frontend:React:Axios refresh token on React.md",_source:"content",_file:"Frontend\u002FReact\u002FAxios refresh token on React.md",_extension:"md"}},prerenderedAt:1667812497923}}("element","span","text","ct-11a550","line","ct-592be9"," ","ct-9878b7",".","ct-799eb0","ct-e8515f","    ","ct-2503cc",",",";","  ","="," {","=\u003E","const","ct-acc80e","(","ct-d3a7a8","ct-e6282b","        ","return","axios","ct-d81eef","tokens",", ","client","error",":","ct-c81972",");"," (","      ","originalRequest","code","access","logout","APIContext","({","interceptors","config","response",false,"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () =\u003E void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC\u003CAPIProviderProps\u003E = ({ \n    tokens, \n    logout, \n    children,\n}) =\u003E {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback\u003C() =\u003E string\u003E(() =\u003E {\n    \u002F\u002F TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() =\u003E {\n    if (!tokens.access) {\n      return;\n    }\n\n    \u002F\u002F append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) =\u003E {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) =\u003E {\n        Promise.reject(error);\n      }\n    );\n\n    \u002F\u002F refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) =\u003E {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () =\u003E {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    \u003CAPIContext.Provider value={{ client }}\u003E\n        {children}\n    \u003C\u002FAPIContext.Provider\u003E\n  );\n};\n\nexport const useAPI = () =\u003E useContext(APIContext).client;\n\nexport { APIProvider };\n","","ct-a6fb7c","string"," () ","refreshTokens","ct-11fa4d",") {","request",") ","          ","React","Axios Refresh Token On React","\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react","root","p","code-inline","\u003CApiProvider \u002F\u003E"," component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","typescript","pre","import","from","createContext","FC","PropsWithChildren","useCallback","useContext","useEffect","useRef","APIProviderProps","ct-be5dc3","refresh","}","create","process","env","NEXT_PUBLIC_API_ENDPOINT","APIProvider","ct-03cd7c","\u003C","children","if","!","req","use","async","headers","      },","      (","Promise","reject","      }","    );","resp","_retry","newToken","...","eject","Provider","\u003E","export",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:ae,_path:"\u002Ffrontend\u002Freact",children:[{title:af,_path:ag},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-lzTEE4EzmV":{_path:ag,_dir:"react",_draft:U,_partial:U,_locale:"en",_empty:U,title:af,description:"\u003CApiProvider \u002F\u003E component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.",excerpt:{type:ah,children:[{type:a,tag:ai,props:{},children:[{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:al}]},{type:a,tag:M,props:{code:V,language:am},children:[{type:a,tag:an,props:{},children:[{type:a,tag:M,props:{__ignoreMap:W},children:[{type:c,value:V}]}]}]}]},body:{type:ah,children:[{type:a,tag:ai,props:{},children:[{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:al}]},{type:a,tag:M,props:{code:V,language:am},children:[{type:a,tag:an,props:{},children:[{type:a,tag:M,props:{__ignoreMap:W},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"axios\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"react\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:w},children:[{type:c,value:"interface"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-658312"},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"extends"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-fcc667"},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"void"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  client: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    baseURL: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"});"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aG},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]},{type:a,tag:b,props:{class:aG},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"}) "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      baseURL: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  )."}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"current"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003C() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E(() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F TODO: implement me"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"throw"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"new"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"Error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"not implemented\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, []);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F append `access` token to all requests"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          Authorization: "}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"`Bearer ${"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:"ct-2b09b3"},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"}`"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aS}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aU}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F refreshing interceptor"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"function"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"status"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"==="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-8c07f5"},children:[{type:c,value:"401"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"&&"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-9a486a"},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            headers: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"              Authorization: "}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"Bearer \""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"();"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aS}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aU}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, ["}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aH}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:a_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"value"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"{{ "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }}"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"        {"}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u003C\u002F"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:a_}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ba}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"useAPI"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ba}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-9a486a{color:#79C0FF}.ct-8c07f5{color:#79C0FF}.ct-2b09b3{color:#A5D6FF}.ct-3967a7{color:#8B949E}.ct-8e6a4e{color:#FFA657}.ct-401d6b{color:#79C0FF}.ct-ae446b{color:#79C0FF}.ct-1eb103{color:#FF7B72}.ct-3cc3c7{color:#D2A8FF}.ct-c2e231{color:#79C0FF}.ct-25aec3{color:#FF7B72}.ct-7609cd{color:#FFA657}.ct-fcc667{color:#79C0FF}.ct-658312{color:#FFA657}.ct-32b8c3{color:#C9D1D9}.ct-563bf4{color:#FF7B72}.ct-eebfe7{color:#A5D6FF}.ct-83746d{color:#C9D1D9}.ct-ffb1cf{color:#C9D1D9}.ct-c3ad92{color:#FF7B72}.light .ct-c3ad92{color:#859900}.light .ct-ffb1cf{color:#657B83}.light .ct-83746d{color:#268BD2}.light .ct-eebfe7{color:#2AA198}.light .ct-563bf4{color:#073642}.light .ct-32b8c3{color:#657B83}.light .ct-658312{color:#268BD2}.light .ct-fcc667{color:#657B83}.light .ct-7609cd{color:#657B83}.light .ct-25aec3{color:#859900}.light .ct-c2e231{color:#859900}.light .ct-3cc3c7{color:#268BD2}.light .ct-1eb103{color:#073642}.light .ct-ae446b{color:#859900}.light .ct-401d6b{color:#268BD2}.light .ct-8e6a4e{color:#268BD2}.light .ct-3967a7{color:#93A1A1}.light .ct-2b09b3{color:#657B83}.light .ct-8c07f5{color:#D33682}.light .ct-9a486a{color:#B58900}"}]}],toc:{title:W,searchDepth:bb,depth:bb,links:[]}},_type:"markdown",_id:"content:Frontend:React:Axios refresh token on React.md",_source:"content",_file:"Frontend\u002FReact\u002FAxios refresh token on React.md",_extension:"md"}},prerenderedAt:1667813360173}}("element","span","text","ct-ffb1cf","line","ct-83746d"," ","ct-c3ad92",".","ct-32b8c3","ct-3cc3c7","    ","ct-1eb103",",",";","  ","="," {","=\u003E","const","ct-401d6b","(","ct-563bf4","ct-7609cd","        ","return","axios","ct-eebfe7","tokens",", ","client","error",":","ct-ae446b",");"," (","      ","originalRequest","code","access","logout","APIContext","({","interceptors","config","response",false,"import axios from \"axios\";\nimport React, {\n  createContext,\n  FC,\n  PropsWithChildren,\n  useCallback,\n  useContext,\n  useEffect,\n  useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n  tokens: {\n    access: string;\n    refresh: string;\n  };\n  logout: () =\u003E void;\n}\n\nconst APIContext = createContext({\n  client: axios.create({\n    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n  }),\n});\n\nconst APIProvider: FC\u003CAPIProviderProps\u003E = ({ \n    tokens, \n    logout, \n    children,\n}) =\u003E {\n  const client = useRef(\n    axios.create({\n      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n    })\n  ).current;\n\n  const refreshTokens = useCallback\u003C() =\u003E string\u003E(() =\u003E {\n    \u002F\u002F TODO: implement me\n    throw new Error(\"not implemented\");\n  }, []);\n\n  useEffect(() =\u003E {\n    if (!tokens.access) {\n      return;\n    }\n\n    \u002F\u002F append `access` token to all requests\n    const req = client.interceptors.request.use(\n      async (config) =\u003E {\n        config.headers = {\n          Authorization: `Bearer ${tokens.access}`,\n        };\n        return config;\n      },\n      (error) =\u003E {\n        Promise.reject(error);\n      }\n    );\n\n    \u002F\u002F refreshing interceptor\n    const resp = client.interceptors.response.use(\n      (response) =\u003E {\n        return response;\n      },\n      async function (error) {\n        const originalRequest = error.config;\n\n        if (error.response.status === 401 && !originalRequest._retry) {\n          originalRequest._retry = true;\n\n          const newToken = refreshTokens;\n\n          return axios({\n            ...originalRequest,\n            headers: {\n              ...originalRequest.headers,\n              Authorization: \"Bearer \" + newToken,\n            },\n          });\n        }\n\n        logout();\n        return Promise.reject(error);\n      }\n    );\n\n    return () =\u003E {\n      axios.interceptors.request.eject(req);\n      axios.interceptors.request.eject(resp);\n    };\n  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n  return (\n    \u003CAPIContext.Provider value={{ client }}\u003E\n        {children}\n    \u003C\u002FAPIContext.Provider\u003E\n  );\n};\n\nexport const useAPI = () =\u003E useContext(APIContext).client;\n\nexport { APIProvider };\n","","ct-25aec3","string"," () ","refreshTokens","ct-3967a7",") {","request",") ","          ","React","Axios Refresh Token On React","\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react","root","p","code-inline","\u003CApiProvider \u002F\u003E"," component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","typescript","pre","import","from","createContext","FC","PropsWithChildren","useCallback","useContext","useEffect","useRef","APIProviderProps","ct-c2e231","refresh","}","create","process","env","NEXT_PUBLIC_API_ENDPOINT","APIProvider","ct-8e6a4e","\u003C","children","if","!","req","use","async","headers","      },","      (","Promise","reject","      }","    );","resp","_retry","newToken","...","eject","Provider","\u003E","export",2))
\ No newline at end of file
diff --git a/frontend/react/axios-refresh-token-on-react/index.html b/frontend/react/axios-refresh-token-on-react/index.html
index dc9dcdf..3ac4091 100644
--- a/frontend/react/axios-refresh-token-on-react/index.html
+++ b/frontend/react/axios-refresh-token-on-react/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Axios Refresh Token On React • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react/axios-refresh-token-on-react/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Axios Refresh Token On React • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react/axios-refresh-token-on-react/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react/axios-refresh-token-on-react" class="router-link-active _active_192pu_81 _link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Axios Refresh Token On React</h1><article><div><p><!--[--><code><!--[-->&lt;ApiProvider /&gt;<!--]--></code> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-9878b7">import</span><span class="ct-11a550"> </span><span class="ct-592be9">axios</span><span class="ct-11a550"> </span><span class="ct-9878b7">from</span><span class="ct-11a550"> </span><span class="ct-d81eef">&quot;axios&quot;</span><span class="ct-11a550">;</span></span><span class="line"><span class="ct-9878b7">import</span><span class="ct-11a550"> </span><span class="ct-592be9">React</span><span class="ct-11a550">, {</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">createContext</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">FC</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">PropsWithChildren</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">useCallback</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">useContext</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">useEffect</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-592be9">useRef</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">} </span><span class="ct-9878b7">from</span><span class="ct-11a550"> </span><span class="ct-d81eef">&quot;react&quot;</span><span class="ct-11a550">;</span></span><span class="line"></span><span class="line"><span class="ct-d3a7a8">interface</span><span class="ct-799eb0"> </span><span class="ct-706917">APIProviderProps</span><span class="ct-799eb0"> </span><span class="ct-d3a7a8">extends</span><span class="ct-799eb0"> </span><span class="ct-7232c4">PropsWithChildren</span><span class="ct-799eb0"> {</span></span><span class="line"><span class="ct-799eb0">  </span><span class="ct-e6282b">tokens</span><span class="ct-a6fb7c">:</span><span class="ct-799eb0"> {</span></span><span class="line"><span class="ct-799eb0">    </span><span class="ct-e6282b">access</span><span class="ct-a6fb7c">:</span><span class="ct-799eb0"> </span><span class="ct-be5dc3">string</span><span class="ct-799eb0">;</span></span><span class="line"><span class="ct-799eb0">    </span><span class="ct-e6282b">refresh</span><span class="ct-a6fb7c">:</span><span class="ct-799eb0"> </span><span class="ct-be5dc3">string</span><span class="ct-799eb0">;</span></span><span class="line"><span class="ct-11a550">  };</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-e8515f">logout</span><span class="ct-9878b7">:</span><span class="ct-11a550"> () </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> </span><span class="ct-c81972">void</span><span class="ct-11a550">;</span></span><span class="line"><span class="ct-11a550">}</span></span><span class="line"></span><span class="line"><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">APIContext</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-e8515f">createContext</span><span class="ct-11a550">({</span></span><span class="line"><span class="ct-11a550">  client: </span><span class="ct-592be9">axios</span><span class="ct-11a550">.</span><span class="ct-e8515f">create</span><span class="ct-11a550">({</span></span><span class="line"><span class="ct-11a550">    baseURL: </span><span class="ct-592be9">process</span><span class="ct-11a550">.</span><span class="ct-592be9">env</span><span class="ct-11a550">.</span><span class="ct-acc80e">NEXT_PUBLIC_API_ENDPOINT</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">  }),</span></span><span class="line"><span class="ct-11a550">});</span></span><span class="line"></span><span class="line"><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-e8515f">APIProvider</span><span class="ct-9878b7">:</span><span class="ct-11a550"> </span><span class="ct-03cd7c">FC</span><span class="ct-11a550">&lt;</span><span class="ct-03cd7c">APIProviderProps</span><span class="ct-11a550">&gt; </span><span class="ct-9878b7">=</span><span class="ct-11a550"> ({ </span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-592be9">tokens</span><span class="ct-11a550">, </span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-592be9">logout</span><span class="ct-11a550">, </span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-592be9">children</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">}) </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> {</span></span><span class="line"><span class="ct-11a550">  </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">client</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-e8515f">useRef</span><span class="ct-11a550">(</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-592be9">axios</span><span class="ct-11a550">.</span><span class="ct-e8515f">create</span><span class="ct-11a550">({</span></span><span class="line"><span class="ct-11a550">      baseURL: </span><span class="ct-592be9">process</span><span class="ct-11a550">.</span><span class="ct-592be9">env</span><span class="ct-11a550">.</span><span class="ct-acc80e">NEXT_PUBLIC_API_ENDPOINT</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">    })</span></span><span class="line"><span class="ct-11a550">  ).</span><span class="ct-592be9">current</span><span class="ct-11a550">;</span></span><span class="line"></span><span class="line"><span class="ct-11a550">  </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">refreshTokens</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-e8515f">useCallback</span><span class="ct-11a550">&lt;() </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> </span><span class="ct-c81972">string</span><span class="ct-11a550">&gt;(() </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> {</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-11fa4d">// TODO: implement me</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-9878b7">throw</span><span class="ct-11a550"> </span><span class="ct-9878b7">new</span><span class="ct-11a550"> </span><span class="ct-c81972">Error</span><span class="ct-11a550">(</span><span class="ct-d81eef">&quot;not implemented&quot;</span><span class="ct-11a550">);</span></span><span class="line"><span class="ct-11a550">  }, []);</span></span><span class="line"></span><span class="line"><span class="ct-11a550">  </span><span class="ct-e8515f">useEffect</span><span class="ct-11a550">(() </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> {</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-9878b7">if</span><span class="ct-11a550"> (</span><span class="ct-9878b7">!</span><span class="ct-592be9">tokens</span><span class="ct-11a550">.</span><span class="ct-592be9">access</span><span class="ct-11a550">) {</span></span><span class="line"><span class="ct-11a550">      </span><span class="ct-9878b7">return</span><span class="ct-11a550">;</span></span><span class="line"><span class="ct-11a550">    }</span></span><span class="line"></span><span class="line"><span class="ct-11a550">    </span><span class="ct-11fa4d">// append `access` token to all requests</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">req</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-592be9">client</span><span class="ct-11a550">.</span><span class="ct-592be9">interceptors</span><span class="ct-11a550">.</span><span class="ct-592be9">request</span><span class="ct-11a550">.</span><span class="ct-e8515f">use</span><span class="ct-11a550">(</span></span><span class="line"><span class="ct-799eb0">      </span><span class="ct-d3a7a8">async</span><span class="ct-799eb0"> (</span><span class="ct-e6282b">config</span><span class="ct-799eb0">) </span><span class="ct-d3a7a8">=&gt;</span><span class="ct-799eb0"> {</span></span><span class="line"><span class="ct-11a550">        </span><span class="ct-592be9">config</span><span class="ct-11a550">.</span><span class="ct-592be9">headers</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> {</span></span><span class="line"><span class="ct-11a550">          Authorization: </span><span class="ct-d81eef">`Bearer ${</span><span class="ct-592be9">tokens</span><span class="ct-4c3a40">.</span><span class="ct-592be9">access</span><span class="ct-d81eef">}`</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">        };</span></span><span class="line"><span class="ct-11a550">        </span><span class="ct-9878b7">return</span><span class="ct-11a550"> </span><span class="ct-592be9">config</span><span class="ct-11a550">;</span></span><span class="line"><span class="ct-11a550">      },</span></span><span class="line"><span class="ct-799eb0">      (</span><span class="ct-e6282b">error</span><span class="ct-799eb0">) </span><span class="ct-d3a7a8">=&gt;</span><span class="ct-799eb0"> {</span></span><span class="line"><span class="ct-11a550">        </span><span class="ct-c81972">Promise</span><span class="ct-11a550">.</span><span class="ct-e8515f">reject</span><span class="ct-11a550">(</span><span class="ct-592be9">error</span><span class="ct-11a550">);</span></span><span class="line"><span class="ct-11a550">      }</span></span><span class="line"><span class="ct-11a550">    );</span></span><span class="line"></span><span class="line"><span class="ct-11a550">    </span><span class="ct-11fa4d">// refreshing interceptor</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">resp</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-592be9">client</span><span class="ct-11a550">.</span><span class="ct-592be9">interceptors</span><span class="ct-11a550">.</span><span class="ct-592be9">response</span><span class="ct-11a550">.</span><span class="ct-e8515f">use</span><span class="ct-11a550">(</span></span><span class="line"><span class="ct-799eb0">      (</span><span class="ct-e6282b">response</span><span class="ct-799eb0">) </span><span class="ct-d3a7a8">=&gt;</span><span class="ct-799eb0"> {</span></span><span class="line"><span class="ct-11a550">        </span><span class="ct-9878b7">return</span><span class="ct-11a550"> </span><span class="ct-592be9">response</span><span class="ct-11a550">;</span></span><span class="line"><span class="ct-11a550">      },</span></span><span class="line"><span class="ct-799eb0">      </span><span class="ct-d3a7a8">async</span><span class="ct-799eb0"> </span><span class="ct-d3a7a8">function</span><span class="ct-799eb0"> (</span><span class="ct-e6282b">error</span><span class="ct-799eb0">) {</span></span><span class="line"><span class="ct-11a550">        </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">originalRequest</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-592be9">error</span><span class="ct-11a550">.</span><span class="ct-592be9">config</span><span class="ct-11a550">;</span></span><span class="line"></span><span class="line"><span class="ct-11a550">        </span><span class="ct-9878b7">if</span><span class="ct-11a550"> (</span><span class="ct-592be9">error</span><span class="ct-11a550">.</span><span class="ct-592be9">response</span><span class="ct-11a550">.</span><span class="ct-592be9">status</span><span class="ct-11a550"> </span><span class="ct-9878b7">===</span><span class="ct-11a550"> </span><span class="ct-c10737">401</span><span class="ct-11a550"> </span><span class="ct-9878b7">&amp;&amp;</span><span class="ct-11a550"> </span><span class="ct-9878b7">!</span><span class="ct-592be9">originalRequest</span><span class="ct-11a550">.</span><span class="ct-592be9">_retry</span><span class="ct-11a550">) {</span></span><span class="line"><span class="ct-11a550">          </span><span class="ct-592be9">originalRequest</span><span class="ct-11a550">.</span><span class="ct-592be9">_retry</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-0f16f1">true</span><span class="ct-11a550">;</span></span><span class="line"></span><span class="line"><span class="ct-11a550">          </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-acc80e">newToken</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> </span><span class="ct-592be9">refreshTokens</span><span class="ct-11a550">;</span></span><span class="line"></span><span class="line"><span class="ct-11a550">          </span><span class="ct-9878b7">return</span><span class="ct-11a550"> </span><span class="ct-e8515f">axios</span><span class="ct-11a550">({</span></span><span class="line"><span class="ct-11a550">            </span><span class="ct-9878b7">...</span><span class="ct-592be9">originalRequest</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">            headers: {</span></span><span class="line"><span class="ct-11a550">              </span><span class="ct-9878b7">...</span><span class="ct-592be9">originalRequest</span><span class="ct-11a550">.</span><span class="ct-592be9">headers</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">              Authorization: </span><span class="ct-d81eef">&quot;Bearer &quot;</span><span class="ct-11a550"> </span><span class="ct-9878b7">+</span><span class="ct-11a550"> </span><span class="ct-592be9">newToken</span><span class="ct-11a550">,</span></span><span class="line"><span class="ct-11a550">            },</span></span><span class="line"><span class="ct-11a550">          });</span></span><span class="line"><span class="ct-11a550">        }</span></span><span class="line"></span><span class="line"><span class="ct-11a550">        </span><span class="ct-e8515f">logout</span><span class="ct-11a550">();</span></span><span class="line"><span class="ct-11a550">        </span><span class="ct-9878b7">return</span><span class="ct-11a550"> </span><span class="ct-c81972">Promise</span><span class="ct-11a550">.</span><span class="ct-e8515f">reject</span><span class="ct-11a550">(</span><span class="ct-592be9">error</span><span class="ct-11a550">);</span></span><span class="line"><span class="ct-11a550">      }</span></span><span class="line"><span class="ct-11a550">    );</span></span><span class="line"></span><span class="line"><span class="ct-11a550">    </span><span class="ct-9878b7">return</span><span class="ct-11a550"> () </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> {</span></span><span class="line"><span class="ct-11a550">      </span><span class="ct-592be9">axios</span><span class="ct-11a550">.</span><span class="ct-592be9">interceptors</span><span class="ct-11a550">.</span><span class="ct-592be9">request</span><span class="ct-11a550">.</span><span class="ct-e8515f">eject</span><span class="ct-11a550">(</span><span class="ct-592be9">req</span><span class="ct-11a550">);</span></span><span class="line"><span class="ct-11a550">      </span><span class="ct-592be9">axios</span><span class="ct-11a550">.</span><span class="ct-592be9">interceptors</span><span class="ct-11a550">.</span><span class="ct-592be9">request</span><span class="ct-11a550">.</span><span class="ct-e8515f">eject</span><span class="ct-11a550">(</span><span class="ct-592be9">resp</span><span class="ct-11a550">);</span></span><span class="line"><span class="ct-11a550">    };</span></span><span class="line"><span class="ct-11a550">  }, [</span><span class="ct-592be9">client</span><span class="ct-11a550">, </span><span class="ct-592be9">tokens</span><span class="ct-11a550">.</span><span class="ct-592be9">access</span><span class="ct-11a550">, </span><span class="ct-592be9">tokens</span><span class="ct-11a550">.</span><span class="ct-592be9">refresh</span><span class="ct-11a550">, </span><span class="ct-592be9">refreshTokens</span><span class="ct-11a550">, </span><span class="ct-592be9">logout</span><span class="ct-11a550">]);</span></span><span class="line"></span><span class="line"><span class="ct-11a550">  </span><span class="ct-9878b7">return</span><span class="ct-11a550"> (</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-9878b7">&lt;</span><span class="ct-592be9">APIContext</span><span class="ct-11a550">.</span><span class="ct-592be9">Provider</span><span class="ct-11a550"> </span><span class="ct-592be9">value</span><span class="ct-9878b7">=</span><span class="ct-11a550">{{ </span><span class="ct-592be9">client</span><span class="ct-11a550"> }}</span><span class="ct-9878b7">&gt;</span></span><span class="line"><span class="ct-799eb0">        {</span><span class="ct-e6282b">children</span><span class="ct-799eb0">}</span></span><span class="line"><span class="ct-11a550">    </span><span class="ct-9878b7">&lt;/</span><span class="ct-592be9">APIContext</span><span class="ct-11a550">.</span><span class="ct-592be9">Provider</span><span class="ct-9878b7">&gt;</span></span><span class="line"><span class="ct-11a550">  );</span></span><span class="line"><span class="ct-11a550">};</span></span><span class="line"></span><span class="line"><span class="ct-9878b7">export</span><span class="ct-11a550"> </span><span class="ct-2503cc">const</span><span class="ct-11a550"> </span><span class="ct-e8515f">useAPI</span><span class="ct-11a550"> </span><span class="ct-9878b7">=</span><span class="ct-11a550"> () </span><span class="ct-2503cc">=&gt;</span><span class="ct-11a550"> </span><span class="ct-e8515f">useContext</span><span class="ct-11a550">(</span><span class="ct-592be9">APIContext</span><span class="ct-11a550">).</span><span class="ct-592be9">client</span><span class="ct-11a550">;</span></span><span class="line"></span><span class="line"><span class="ct-9878b7">export</span><span class="ct-11a550"> { </span><span class="ct-592be9">APIProvider</span><span class="ct-11a550"> };</span></span></code></pre><!--]--></div><style>.ct-0f16f1{color:#79C0FF}.ct-c10737{color:#79C0FF}.ct-4c3a40{color:#A5D6FF}.ct-11fa4d{color:#8B949E}.ct-03cd7c{color:#FFA657}.ct-acc80e{color:#79C0FF}.ct-c81972{color:#79C0FF}.ct-2503cc{color:#FF7B72}.ct-e8515f{color:#D2A8FF}.ct-be5dc3{color:#79C0FF}.ct-a6fb7c{color:#FF7B72}.ct-e6282b{color:#FFA657}.ct-7232c4{color:#79C0FF}.ct-706917{color:#FFA657}.ct-799eb0{color:#C9D1D9}.ct-d3a7a8{color:#FF7B72}.ct-d81eef{color:#A5D6FF}.ct-592be9{color:#C9D1D9}.ct-11a550{color:#C9D1D9}.ct-9878b7{color:#FF7B72}.light .ct-9878b7{color:#859900}.light .ct-11a550{color:#657B83}.light .ct-592be9{color:#268BD2}.light .ct-d81eef{color:#2AA198}.light .ct-d3a7a8{color:#073642}.light .ct-799eb0{color:#657B83}.light .ct-706917{color:#268BD2}.light .ct-7232c4{color:#657B83}.light .ct-e6282b{color:#657B83}.light .ct-a6fb7c{color:#859900}.light .ct-be5dc3{color:#859900}.light .ct-e8515f{color:#268BD2}.light .ct-2503cc{color:#073642}.light .ct-c81972{color:#859900}.light .ct-acc80e{color:#268BD2}.light .ct-03cd7c{color:#268BD2}.light .ct-11fa4d{color:#93A1A1}.light .ct-4c3a40{color:#657B83}.light .ct-c10737{color:#D33682}.light .ct-0f16f1{color:#B58900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react/axios-refresh-token-on-react/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812497923}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react/axios-refresh-token-on-react" class="router-link-active _active_192pu_81 _link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Axios Refresh Token On React</h1><article><div><p><!--[--><code><!--[-->&lt;ApiProvider /&gt;<!--]--></code> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-c3ad92">import</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">axios</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">from</span><span class="ct-ffb1cf"> </span><span class="ct-eebfe7">&quot;axios&quot;</span><span class="ct-ffb1cf">;</span></span><span class="line"><span class="ct-c3ad92">import</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">React</span><span class="ct-ffb1cf">, {</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">createContext</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">FC</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">PropsWithChildren</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">useCallback</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">useContext</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">useEffect</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-83746d">useRef</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">} </span><span class="ct-c3ad92">from</span><span class="ct-ffb1cf"> </span><span class="ct-eebfe7">&quot;react&quot;</span><span class="ct-ffb1cf">;</span></span><span class="line"></span><span class="line"><span class="ct-563bf4">interface</span><span class="ct-32b8c3"> </span><span class="ct-658312">APIProviderProps</span><span class="ct-32b8c3"> </span><span class="ct-563bf4">extends</span><span class="ct-32b8c3"> </span><span class="ct-fcc667">PropsWithChildren</span><span class="ct-32b8c3"> {</span></span><span class="line"><span class="ct-32b8c3">  </span><span class="ct-7609cd">tokens</span><span class="ct-25aec3">:</span><span class="ct-32b8c3"> {</span></span><span class="line"><span class="ct-32b8c3">    </span><span class="ct-7609cd">access</span><span class="ct-25aec3">:</span><span class="ct-32b8c3"> </span><span class="ct-c2e231">string</span><span class="ct-32b8c3">;</span></span><span class="line"><span class="ct-32b8c3">    </span><span class="ct-7609cd">refresh</span><span class="ct-25aec3">:</span><span class="ct-32b8c3"> </span><span class="ct-c2e231">string</span><span class="ct-32b8c3">;</span></span><span class="line"><span class="ct-ffb1cf">  };</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-3cc3c7">logout</span><span class="ct-c3ad92">:</span><span class="ct-ffb1cf"> () </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> </span><span class="ct-ae446b">void</span><span class="ct-ffb1cf">;</span></span><span class="line"><span class="ct-ffb1cf">}</span></span><span class="line"></span><span class="line"><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">APIContext</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">createContext</span><span class="ct-ffb1cf">({</span></span><span class="line"><span class="ct-ffb1cf">  client: </span><span class="ct-83746d">axios</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">create</span><span class="ct-ffb1cf">({</span></span><span class="line"><span class="ct-ffb1cf">    baseURL: </span><span class="ct-83746d">process</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">env</span><span class="ct-ffb1cf">.</span><span class="ct-401d6b">NEXT_PUBLIC_API_ENDPOINT</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">  }),</span></span><span class="line"><span class="ct-ffb1cf">});</span></span><span class="line"></span><span class="line"><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">APIProvider</span><span class="ct-c3ad92">:</span><span class="ct-ffb1cf"> </span><span class="ct-8e6a4e">FC</span><span class="ct-ffb1cf">&lt;</span><span class="ct-8e6a4e">APIProviderProps</span><span class="ct-ffb1cf">&gt; </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> ({ </span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-83746d">tokens</span><span class="ct-ffb1cf">, </span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-83746d">logout</span><span class="ct-ffb1cf">, </span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-83746d">children</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">}) </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> {</span></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">client</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">useRef</span><span class="ct-ffb1cf">(</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-83746d">axios</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">create</span><span class="ct-ffb1cf">({</span></span><span class="line"><span class="ct-ffb1cf">      baseURL: </span><span class="ct-83746d">process</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">env</span><span class="ct-ffb1cf">.</span><span class="ct-401d6b">NEXT_PUBLIC_API_ENDPOINT</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">    })</span></span><span class="line"><span class="ct-ffb1cf">  ).</span><span class="ct-83746d">current</span><span class="ct-ffb1cf">;</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">refreshTokens</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">useCallback</span><span class="ct-ffb1cf">&lt;() </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> </span><span class="ct-ae446b">string</span><span class="ct-ffb1cf">&gt;(() </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> {</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-3967a7">// TODO: implement me</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-c3ad92">throw</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">new</span><span class="ct-ffb1cf"> </span><span class="ct-ae446b">Error</span><span class="ct-ffb1cf">(</span><span class="ct-eebfe7">&quot;not implemented&quot;</span><span class="ct-ffb1cf">);</span></span><span class="line"><span class="ct-ffb1cf">  }, []);</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-3cc3c7">useEffect</span><span class="ct-ffb1cf">(() </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> {</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-c3ad92">if</span><span class="ct-ffb1cf"> (</span><span class="ct-c3ad92">!</span><span class="ct-83746d">tokens</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">access</span><span class="ct-ffb1cf">) {</span></span><span class="line"><span class="ct-ffb1cf">      </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf">;</span></span><span class="line"><span class="ct-ffb1cf">    }</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-3967a7">// append `access` token to all requests</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">req</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">client</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">interceptors</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">request</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">use</span><span class="ct-ffb1cf">(</span></span><span class="line"><span class="ct-32b8c3">      </span><span class="ct-563bf4">async</span><span class="ct-32b8c3"> (</span><span class="ct-7609cd">config</span><span class="ct-32b8c3">) </span><span class="ct-563bf4">=&gt;</span><span class="ct-32b8c3"> {</span></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-83746d">config</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">headers</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> {</span></span><span class="line"><span class="ct-ffb1cf">          Authorization: </span><span class="ct-eebfe7">`Bearer ${</span><span class="ct-83746d">tokens</span><span class="ct-2b09b3">.</span><span class="ct-83746d">access</span><span class="ct-eebfe7">}`</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">        };</span></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">config</span><span class="ct-ffb1cf">;</span></span><span class="line"><span class="ct-ffb1cf">      },</span></span><span class="line"><span class="ct-32b8c3">      (</span><span class="ct-7609cd">error</span><span class="ct-32b8c3">) </span><span class="ct-563bf4">=&gt;</span><span class="ct-32b8c3"> {</span></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-ae446b">Promise</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">reject</span><span class="ct-ffb1cf">(</span><span class="ct-83746d">error</span><span class="ct-ffb1cf">);</span></span><span class="line"><span class="ct-ffb1cf">      }</span></span><span class="line"><span class="ct-ffb1cf">    );</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-3967a7">// refreshing interceptor</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">resp</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">client</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">interceptors</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">response</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">use</span><span class="ct-ffb1cf">(</span></span><span class="line"><span class="ct-32b8c3">      (</span><span class="ct-7609cd">response</span><span class="ct-32b8c3">) </span><span class="ct-563bf4">=&gt;</span><span class="ct-32b8c3"> {</span></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">response</span><span class="ct-ffb1cf">;</span></span><span class="line"><span class="ct-ffb1cf">      },</span></span><span class="line"><span class="ct-32b8c3">      </span><span class="ct-563bf4">async</span><span class="ct-32b8c3"> </span><span class="ct-563bf4">function</span><span class="ct-32b8c3"> (</span><span class="ct-7609cd">error</span><span class="ct-32b8c3">) {</span></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">originalRequest</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">error</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">config</span><span class="ct-ffb1cf">;</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-c3ad92">if</span><span class="ct-ffb1cf"> (</span><span class="ct-83746d">error</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">response</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">status</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">===</span><span class="ct-ffb1cf"> </span><span class="ct-8c07f5">401</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">&amp;&amp;</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">!</span><span class="ct-83746d">originalRequest</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">_retry</span><span class="ct-ffb1cf">) {</span></span><span class="line"><span class="ct-ffb1cf">          </span><span class="ct-83746d">originalRequest</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">_retry</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-9a486a">true</span><span class="ct-ffb1cf">;</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">          </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-401d6b">newToken</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">refreshTokens</span><span class="ct-ffb1cf">;</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">          </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">axios</span><span class="ct-ffb1cf">({</span></span><span class="line"><span class="ct-ffb1cf">            </span><span class="ct-c3ad92">...</span><span class="ct-83746d">originalRequest</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">            headers: {</span></span><span class="line"><span class="ct-ffb1cf">              </span><span class="ct-c3ad92">...</span><span class="ct-83746d">originalRequest</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">headers</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">              Authorization: </span><span class="ct-eebfe7">&quot;Bearer &quot;</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">+</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">newToken</span><span class="ct-ffb1cf">,</span></span><span class="line"><span class="ct-ffb1cf">            },</span></span><span class="line"><span class="ct-ffb1cf">          });</span></span><span class="line"><span class="ct-ffb1cf">        }</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-3cc3c7">logout</span><span class="ct-ffb1cf">();</span></span><span class="line"><span class="ct-ffb1cf">        </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf"> </span><span class="ct-ae446b">Promise</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">reject</span><span class="ct-ffb1cf">(</span><span class="ct-83746d">error</span><span class="ct-ffb1cf">);</span></span><span class="line"><span class="ct-ffb1cf">      }</span></span><span class="line"><span class="ct-ffb1cf">    );</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf"> () </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> {</span></span><span class="line"><span class="ct-ffb1cf">      </span><span class="ct-83746d">axios</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">interceptors</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">request</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">eject</span><span class="ct-ffb1cf">(</span><span class="ct-83746d">req</span><span class="ct-ffb1cf">);</span></span><span class="line"><span class="ct-ffb1cf">      </span><span class="ct-83746d">axios</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">interceptors</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">request</span><span class="ct-ffb1cf">.</span><span class="ct-3cc3c7">eject</span><span class="ct-ffb1cf">(</span><span class="ct-83746d">resp</span><span class="ct-ffb1cf">);</span></span><span class="line"><span class="ct-ffb1cf">    };</span></span><span class="line"><span class="ct-ffb1cf">  }, [</span><span class="ct-83746d">client</span><span class="ct-ffb1cf">, </span><span class="ct-83746d">tokens</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">access</span><span class="ct-ffb1cf">, </span><span class="ct-83746d">tokens</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">refresh</span><span class="ct-ffb1cf">, </span><span class="ct-83746d">refreshTokens</span><span class="ct-ffb1cf">, </span><span class="ct-83746d">logout</span><span class="ct-ffb1cf">]);</span></span><span class="line"></span><span class="line"><span class="ct-ffb1cf">  </span><span class="ct-c3ad92">return</span><span class="ct-ffb1cf"> (</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-c3ad92">&lt;</span><span class="ct-83746d">APIContext</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">Provider</span><span class="ct-ffb1cf"> </span><span class="ct-83746d">value</span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf">{{ </span><span class="ct-83746d">client</span><span class="ct-ffb1cf"> }}</span><span class="ct-c3ad92">&gt;</span></span><span class="line"><span class="ct-32b8c3">        {</span><span class="ct-7609cd">children</span><span class="ct-32b8c3">}</span></span><span class="line"><span class="ct-ffb1cf">    </span><span class="ct-c3ad92">&lt;/</span><span class="ct-83746d">APIContext</span><span class="ct-ffb1cf">.</span><span class="ct-83746d">Provider</span><span class="ct-c3ad92">&gt;</span></span><span class="line"><span class="ct-ffb1cf">  );</span></span><span class="line"><span class="ct-ffb1cf">};</span></span><span class="line"></span><span class="line"><span class="ct-c3ad92">export</span><span class="ct-ffb1cf"> </span><span class="ct-1eb103">const</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">useAPI</span><span class="ct-ffb1cf"> </span><span class="ct-c3ad92">=</span><span class="ct-ffb1cf"> () </span><span class="ct-1eb103">=&gt;</span><span class="ct-ffb1cf"> </span><span class="ct-3cc3c7">useContext</span><span class="ct-ffb1cf">(</span><span class="ct-83746d">APIContext</span><span class="ct-ffb1cf">).</span><span class="ct-83746d">client</span><span class="ct-ffb1cf">;</span></span><span class="line"></span><span class="line"><span class="ct-c3ad92">export</span><span class="ct-ffb1cf"> { </span><span class="ct-83746d">APIProvider</span><span class="ct-ffb1cf"> };</span></span></code></pre><!--]--></div><style>.ct-9a486a{color:#79C0FF}.ct-8c07f5{color:#79C0FF}.ct-2b09b3{color:#A5D6FF}.ct-3967a7{color:#8B949E}.ct-8e6a4e{color:#FFA657}.ct-401d6b{color:#79C0FF}.ct-ae446b{color:#79C0FF}.ct-1eb103{color:#FF7B72}.ct-3cc3c7{color:#D2A8FF}.ct-c2e231{color:#79C0FF}.ct-25aec3{color:#FF7B72}.ct-7609cd{color:#FFA657}.ct-fcc667{color:#79C0FF}.ct-658312{color:#FFA657}.ct-32b8c3{color:#C9D1D9}.ct-563bf4{color:#FF7B72}.ct-eebfe7{color:#A5D6FF}.ct-83746d{color:#C9D1D9}.ct-ffb1cf{color:#C9D1D9}.ct-c3ad92{color:#FF7B72}.light .ct-c3ad92{color:#859900}.light .ct-ffb1cf{color:#657B83}.light .ct-83746d{color:#268BD2}.light .ct-eebfe7{color:#2AA198}.light .ct-563bf4{color:#073642}.light .ct-32b8c3{color:#657B83}.light .ct-658312{color:#268BD2}.light .ct-fcc667{color:#657B83}.light .ct-7609cd{color:#657B83}.light .ct-25aec3{color:#859900}.light .ct-c2e231{color:#859900}.light .ct-3cc3c7{color:#268BD2}.light .ct-1eb103{color:#073642}.light .ct-ae446b{color:#859900}.light .ct-401d6b{color:#268BD2}.light .ct-8e6a4e{color:#268BD2}.light .ct-3967a7{color:#93A1A1}.light .ct-2b09b3{color:#657B83}.light .ct-8c07f5{color:#D33682}.light .ct-9a486a{color:#B58900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react/axios-refresh-token-on-react/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360173}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/react/axios-with-abortcontroller/_payload.js b/frontend/react/axios-with-abortcontroller/_payload.js
index 24515bc..4ec4f09 100644
--- a/frontend/react/axios-with-abortcontroller/_payload.js
+++ b/frontend/react/axios-with-abortcontroller/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:G,_path:H}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-9RFKZoeNNl":{_path:H,_dir:"react",_draft:u,_partial:u,_locale:"en",_empty:u,title:G,description:"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.",excerpt:{type:I,children:[{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:K,props:{href:L,rel:[M]},children:[{type:c,value:N}]},{type:c,value:O}]},{type:a,tag:r,props:{},children:[{type:a,tag:P,props:{},children:[{type:c,value:s}]},{type:c,value:Q}]},{type:a,tag:t,props:{code:v,language:R},children:[{type:a,tag:S,props:{},children:[{type:a,tag:t,props:{__ignoreMap:w},children:[{type:c,value:v}]}]}]}]},body:{type:I,children:[{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:K,props:{href:L,rel:[M]},children:[{type:c,value:N}]},{type:c,value:O}]},{type:a,tag:r,props:{},children:[{type:a,tag:P,props:{},children:[{type:c,value:s}]},{type:c,value:Q}]},{type:a,tag:t,props:{code:v,language:R},children:[{type:a,tag:S,props:{},children:[{type:a,tag:t,props:{__ignoreMap:w},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"\"react\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"'axios'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"create"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"useGetUsers"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"());"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"async"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"await"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"\"\u002F\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", {"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        "}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"\u002F\u002F params and props here"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        signal: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"signal"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:","}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    });"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"data"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, []);"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(() "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"abort"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"\u002F\u002F controller should be rewritten or all requests will fail"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, ["}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]);"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-03ead4{color:#8B949E}.ct-4cc01b{color:#D2A8FF}.ct-07b026{color:#79C0FF}.ct-e966be{color:#FF7B72}.ct-9aea1b{color:#A5D6FF}.ct-0da03b{color:#C9D1D9}.ct-6c6595{color:#C9D1D9}.ct-8e94e6{color:#FF7B72}.light .ct-8e94e6{color:#859900}.light .ct-6c6595{color:#657B83}.light .ct-0da03b{color:#268BD2}.light .ct-9aea1b{color:#2AA198}.light .ct-e966be{color:#073642}.light .ct-07b026{color:#268BD2}.light .ct-4cc01b{color:#268BD2}.light .ct-03ead4{color:#93A1A1}"}]}],toc:{title:w,searchDepth:ae,depth:ae,links:[]}},_type:"markdown",_id:"content:Frontend:React:Axios with AbortController.md",_source:"content",_file:"Frontend\u002FReact\u002FAxios with AbortController.md",_extension:"md"}},prerenderedAt:1667812498119}}("element","span","text","ct-6c6595"," ","line","ct-8e94e6","ct-0da03b","ct-e966be","ct-4cc01b",".","=","const","    ","ct-07b026","  ","controller","p","AbortController","code",false,"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () =\u003E {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () =\u003E {\n    const result = await client.get(\"\u002F\", {\n        \u002F\u002F params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() =\u003E {\n    controller.current.abort();\n    \n    \u002F\u002F controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","","useCallback","ct-9aea1b",";","();","=\u003E"," {","(","get","current","Axios With AbortController","\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller","root","If you need to cancel some request, use ","a","https:\u002F\u002Faxios-http.com\u002Fdocs\u002Fcancellation","nofollow","axios with AbortController",". Previously axios used cancellation token, but now it's deprecated.","code-inline"," can be used with a multiple requests to cancel them at once.","typescript","pre","import"," { ",", ","useRef","from","axios","client"," () ","new","result","ct-03ead4","return","cancel",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:G,_path:H}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-9RFKZoeNNl":{_path:H,_dir:"react",_draft:u,_partial:u,_locale:"en",_empty:u,title:G,description:"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.",excerpt:{type:I,children:[{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:K,props:{href:L,rel:[M]},children:[{type:c,value:N}]},{type:c,value:O}]},{type:a,tag:r,props:{},children:[{type:a,tag:P,props:{},children:[{type:c,value:s}]},{type:c,value:Q}]},{type:a,tag:t,props:{code:v,language:R},children:[{type:a,tag:S,props:{},children:[{type:a,tag:t,props:{__ignoreMap:w},children:[{type:c,value:v}]}]}]}]},body:{type:I,children:[{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:K,props:{href:L,rel:[M]},children:[{type:c,value:N}]},{type:c,value:O}]},{type:a,tag:r,props:{},children:[{type:a,tag:P,props:{},children:[{type:c,value:s}]},{type:c,value:Q}]},{type:a,tag:t,props:{code:v,language:R},children:[{type:a,tag:S,props:{},children:[{type:a,tag:t,props:{__ignoreMap:w},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"\"react\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"'axios'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"create"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"useGetUsers"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"());"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"async"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"await"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"\"\u002F\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", {"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        "}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"\u002F\u002F params and props here"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        signal: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"signal"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:","}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    });"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"data"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, []);"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(() "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"abort"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"\u002F\u002F controller should be rewritten or all requests will fail"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }, ["}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]);"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-916275{color:#8B949E}.ct-786d0a{color:#D2A8FF}.ct-54619d{color:#79C0FF}.ct-607c3e{color:#FF7B72}.ct-e58c4f{color:#A5D6FF}.ct-d898c1{color:#C9D1D9}.ct-fa942d{color:#C9D1D9}.ct-8b8e9a{color:#FF7B72}.light .ct-8b8e9a{color:#859900}.light .ct-fa942d{color:#657B83}.light .ct-d898c1{color:#268BD2}.light .ct-e58c4f{color:#2AA198}.light .ct-607c3e{color:#073642}.light .ct-54619d{color:#268BD2}.light .ct-786d0a{color:#268BD2}.light .ct-916275{color:#93A1A1}"}]}],toc:{title:w,searchDepth:ae,depth:ae,links:[]}},_type:"markdown",_id:"content:Frontend:React:Axios with AbortController.md",_source:"content",_file:"Frontend\u002FReact\u002FAxios with AbortController.md",_extension:"md"}},prerenderedAt:1667813360269}}("element","span","text","ct-fa942d"," ","line","ct-8b8e9a","ct-d898c1","ct-607c3e","ct-786d0a",".","=","const","    ","ct-54619d","  ","controller","p","AbortController","code",false,"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () =\u003E {\n  const controller = useRef(new AbortController());\n  \n  const get = useCallback(async () =\u003E {\n    const result = await client.get(\"\u002F\", {\n        \u002F\u002F params and props here\n        signal: controller.current.signal,\n    });\n\n    return result.data;\n  }, []);\n\n  const cancel = useCallback(() =\u003E {\n    controller.current.abort();\n    \n    \u002F\u002F controller should be rewritten or all requests will fail\n    controller.current = new AbortController();\n  }, [controller]);\n\n  return { get, cancel };\n};\n","","useCallback","ct-e58c4f",";","();","=\u003E"," {","(","get","current","Axios With AbortController","\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller","root","If you need to cancel some request, use ","a","https:\u002F\u002Faxios-http.com\u002Fdocs\u002Fcancellation","nofollow","axios with AbortController",". Previously axios used cancellation token, but now it's deprecated.","code-inline"," can be used with a multiple requests to cancel them at once.","typescript","pre","import"," { ",", ","useRef","from","axios","client"," () ","new","result","ct-916275","return","cancel",2))
\ No newline at end of file
diff --git a/frontend/react/axios-with-abortcontroller/index.html b/frontend/react/axios-with-abortcontroller/index.html
index 2592102..85e84fc 100644
--- a/frontend/react/axios-with-abortcontroller/index.html
+++ b/frontend/react/axios-with-abortcontroller/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Axios With AbortController • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react/axios-with-abortcontroller/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Axios With AbortController • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/react/axios-with-abortcontroller/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react/axios-with-abortcontroller" class="router-link-active _active_192pu_81 _link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Axios With AbortController</h1><article><div><p><!--[-->If you need to cancel some request, use <a href="https://axios-http.com/docs/cancellation" rel="nofollow" target="_blank"><!--[-->axios with AbortController<!--]--></a>. Previously axios used cancellation token, but now it&#39;s deprecated.<!--]--></p><p><!--[--><code><!--[-->AbortController<!--]--></code> can be used with a multiple requests to cancel them at once.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8e94e6">import</span><span class="ct-6c6595"> { </span><span class="ct-0da03b">useCallback</span><span class="ct-6c6595">, </span><span class="ct-0da03b">useRef</span><span class="ct-6c6595"> } </span><span class="ct-8e94e6">from</span><span class="ct-6c6595"> </span><span class="ct-9aea1b">&quot;react&quot;</span><span class="ct-6c6595">;</span></span><span class="line"><span class="ct-8e94e6">import</span><span class="ct-6c6595"> </span><span class="ct-0da03b">axios</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">from</span><span class="ct-6c6595"> </span><span class="ct-9aea1b">&#39;axios&#39;</span><span class="ct-6c6595">;</span></span><span class="line"></span><span class="line"><span class="ct-e966be">const</span><span class="ct-6c6595"> </span><span class="ct-07b026">client</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> </span><span class="ct-0da03b">axios</span><span class="ct-6c6595">.</span><span class="ct-4cc01b">create</span><span class="ct-6c6595">();</span></span><span class="line"></span><span class="line"><span class="ct-8e94e6">export</span><span class="ct-6c6595"> </span><span class="ct-e966be">const</span><span class="ct-6c6595"> </span><span class="ct-4cc01b">useGetUsers</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> () </span><span class="ct-e966be">=&gt;</span><span class="ct-6c6595"> {</span></span><span class="line"><span class="ct-6c6595">  </span><span class="ct-e966be">const</span><span class="ct-6c6595"> </span><span class="ct-07b026">controller</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> </span><span class="ct-4cc01b">useRef</span><span class="ct-6c6595">(</span><span class="ct-8e94e6">new</span><span class="ct-6c6595"> </span><span class="ct-4cc01b">AbortController</span><span class="ct-6c6595">());</span></span><span class="line"><span class="ct-6c6595">  </span></span><span class="line"><span class="ct-6c6595">  </span><span class="ct-e966be">const</span><span class="ct-6c6595"> </span><span class="ct-07b026">get</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> </span><span class="ct-4cc01b">useCallback</span><span class="ct-6c6595">(</span><span class="ct-e966be">async</span><span class="ct-6c6595"> () </span><span class="ct-e966be">=&gt;</span><span class="ct-6c6595"> {</span></span><span class="line"><span class="ct-6c6595">    </span><span class="ct-e966be">const</span><span class="ct-6c6595"> </span><span class="ct-07b026">result</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">await</span><span class="ct-6c6595"> </span><span class="ct-0da03b">client</span><span class="ct-6c6595">.</span><span class="ct-4cc01b">get</span><span class="ct-6c6595">(</span><span class="ct-9aea1b">&quot;/&quot;</span><span class="ct-6c6595">, {</span></span><span class="line"><span class="ct-6c6595">        </span><span class="ct-03ead4">// params and props here</span></span><span class="line"><span class="ct-6c6595">        signal: </span><span class="ct-0da03b">controller</span><span class="ct-6c6595">.</span><span class="ct-0da03b">current</span><span class="ct-6c6595">.</span><span class="ct-0da03b">signal</span><span class="ct-6c6595">,</span></span><span class="line"><span class="ct-6c6595">    });</span></span><span class="line"></span><span class="line"><span class="ct-6c6595">    </span><span class="ct-8e94e6">return</span><span class="ct-6c6595"> </span><span class="ct-0da03b">result</span><span class="ct-6c6595">.</span><span class="ct-0da03b">data</span><span class="ct-6c6595">;</span></span><span class="line"><span class="ct-6c6595">  }, []);</span></span><span class="line"></span><span class="line"><span class="ct-6c6595">  </span><span class="ct-e966be">const</span><span class="ct-6c6595"> </span><span class="ct-07b026">cancel</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> </span><span class="ct-4cc01b">useCallback</span><span class="ct-6c6595">(() </span><span class="ct-e966be">=&gt;</span><span class="ct-6c6595"> {</span></span><span class="line"><span class="ct-6c6595">    </span><span class="ct-0da03b">controller</span><span class="ct-6c6595">.</span><span class="ct-0da03b">current</span><span class="ct-6c6595">.</span><span class="ct-4cc01b">abort</span><span class="ct-6c6595">();</span></span><span class="line"><span class="ct-6c6595">    </span></span><span class="line"><span class="ct-6c6595">    </span><span class="ct-03ead4">// controller should be rewritten or all requests will fail</span></span><span class="line"><span class="ct-6c6595">    </span><span class="ct-0da03b">controller</span><span class="ct-6c6595">.</span><span class="ct-0da03b">current</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">=</span><span class="ct-6c6595"> </span><span class="ct-8e94e6">new</span><span class="ct-6c6595"> </span><span class="ct-4cc01b">AbortController</span><span class="ct-6c6595">();</span></span><span class="line"><span class="ct-6c6595">  }, [</span><span class="ct-0da03b">controller</span><span class="ct-6c6595">]);</span></span><span class="line"></span><span class="line"><span class="ct-6c6595">  </span><span class="ct-8e94e6">return</span><span class="ct-6c6595"> { </span><span class="ct-0da03b">get</span><span class="ct-6c6595">, </span><span class="ct-0da03b">cancel</span><span class="ct-6c6595"> };</span></span><span class="line"><span class="ct-6c6595">};</span></span></code></pre><!--]--></div><style>.ct-03ead4{color:#8B949E}.ct-4cc01b{color:#D2A8FF}.ct-07b026{color:#79C0FF}.ct-e966be{color:#FF7B72}.ct-9aea1b{color:#A5D6FF}.ct-0da03b{color:#C9D1D9}.ct-6c6595{color:#C9D1D9}.ct-8e94e6{color:#FF7B72}.light .ct-8e94e6{color:#859900}.light .ct-6c6595{color:#657B83}.light .ct-0da03b{color:#268BD2}.light .ct-9aea1b{color:#2AA198}.light .ct-e966be{color:#073642}.light .ct-07b026{color:#268BD2}.light .ct-4cc01b{color:#268BD2}.light .ct-03ead4{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react/axios-with-abortcontroller/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498119}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/react/axios-with-abortcontroller" class="router-link-active _active_192pu_81 _link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Axios With AbortController</h1><article><div><p><!--[-->If you need to cancel some request, use <a href="https://axios-http.com/docs/cancellation" rel="nofollow" target="_blank"><!--[-->axios with AbortController<!--]--></a>. Previously axios used cancellation token, but now it&#39;s deprecated.<!--]--></p><p><!--[--><code><!--[-->AbortController<!--]--></code> can be used with a multiple requests to cancel them at once.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8b8e9a">import</span><span class="ct-fa942d"> { </span><span class="ct-d898c1">useCallback</span><span class="ct-fa942d">, </span><span class="ct-d898c1">useRef</span><span class="ct-fa942d"> } </span><span class="ct-8b8e9a">from</span><span class="ct-fa942d"> </span><span class="ct-e58c4f">&quot;react&quot;</span><span class="ct-fa942d">;</span></span><span class="line"><span class="ct-8b8e9a">import</span><span class="ct-fa942d"> </span><span class="ct-d898c1">axios</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">from</span><span class="ct-fa942d"> </span><span class="ct-e58c4f">&#39;axios&#39;</span><span class="ct-fa942d">;</span></span><span class="line"></span><span class="line"><span class="ct-607c3e">const</span><span class="ct-fa942d"> </span><span class="ct-54619d">client</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> </span><span class="ct-d898c1">axios</span><span class="ct-fa942d">.</span><span class="ct-786d0a">create</span><span class="ct-fa942d">();</span></span><span class="line"></span><span class="line"><span class="ct-8b8e9a">export</span><span class="ct-fa942d"> </span><span class="ct-607c3e">const</span><span class="ct-fa942d"> </span><span class="ct-786d0a">useGetUsers</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> () </span><span class="ct-607c3e">=&gt;</span><span class="ct-fa942d"> {</span></span><span class="line"><span class="ct-fa942d">  </span><span class="ct-607c3e">const</span><span class="ct-fa942d"> </span><span class="ct-54619d">controller</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> </span><span class="ct-786d0a">useRef</span><span class="ct-fa942d">(</span><span class="ct-8b8e9a">new</span><span class="ct-fa942d"> </span><span class="ct-786d0a">AbortController</span><span class="ct-fa942d">());</span></span><span class="line"><span class="ct-fa942d">  </span></span><span class="line"><span class="ct-fa942d">  </span><span class="ct-607c3e">const</span><span class="ct-fa942d"> </span><span class="ct-54619d">get</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> </span><span class="ct-786d0a">useCallback</span><span class="ct-fa942d">(</span><span class="ct-607c3e">async</span><span class="ct-fa942d"> () </span><span class="ct-607c3e">=&gt;</span><span class="ct-fa942d"> {</span></span><span class="line"><span class="ct-fa942d">    </span><span class="ct-607c3e">const</span><span class="ct-fa942d"> </span><span class="ct-54619d">result</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">await</span><span class="ct-fa942d"> </span><span class="ct-d898c1">client</span><span class="ct-fa942d">.</span><span class="ct-786d0a">get</span><span class="ct-fa942d">(</span><span class="ct-e58c4f">&quot;/&quot;</span><span class="ct-fa942d">, {</span></span><span class="line"><span class="ct-fa942d">        </span><span class="ct-916275">// params and props here</span></span><span class="line"><span class="ct-fa942d">        signal: </span><span class="ct-d898c1">controller</span><span class="ct-fa942d">.</span><span class="ct-d898c1">current</span><span class="ct-fa942d">.</span><span class="ct-d898c1">signal</span><span class="ct-fa942d">,</span></span><span class="line"><span class="ct-fa942d">    });</span></span><span class="line"></span><span class="line"><span class="ct-fa942d">    </span><span class="ct-8b8e9a">return</span><span class="ct-fa942d"> </span><span class="ct-d898c1">result</span><span class="ct-fa942d">.</span><span class="ct-d898c1">data</span><span class="ct-fa942d">;</span></span><span class="line"><span class="ct-fa942d">  }, []);</span></span><span class="line"></span><span class="line"><span class="ct-fa942d">  </span><span class="ct-607c3e">const</span><span class="ct-fa942d"> </span><span class="ct-54619d">cancel</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> </span><span class="ct-786d0a">useCallback</span><span class="ct-fa942d">(() </span><span class="ct-607c3e">=&gt;</span><span class="ct-fa942d"> {</span></span><span class="line"><span class="ct-fa942d">    </span><span class="ct-d898c1">controller</span><span class="ct-fa942d">.</span><span class="ct-d898c1">current</span><span class="ct-fa942d">.</span><span class="ct-786d0a">abort</span><span class="ct-fa942d">();</span></span><span class="line"><span class="ct-fa942d">    </span></span><span class="line"><span class="ct-fa942d">    </span><span class="ct-916275">// controller should be rewritten or all requests will fail</span></span><span class="line"><span class="ct-fa942d">    </span><span class="ct-d898c1">controller</span><span class="ct-fa942d">.</span><span class="ct-d898c1">current</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">=</span><span class="ct-fa942d"> </span><span class="ct-8b8e9a">new</span><span class="ct-fa942d"> </span><span class="ct-786d0a">AbortController</span><span class="ct-fa942d">();</span></span><span class="line"><span class="ct-fa942d">  }, [</span><span class="ct-d898c1">controller</span><span class="ct-fa942d">]);</span></span><span class="line"></span><span class="line"><span class="ct-fa942d">  </span><span class="ct-8b8e9a">return</span><span class="ct-fa942d"> { </span><span class="ct-d898c1">get</span><span class="ct-fa942d">, </span><span class="ct-d898c1">cancel</span><span class="ct-fa942d"> };</span></span><span class="line"><span class="ct-fa942d">};</span></span></code></pre><!--]--></div><style>.ct-916275{color:#8B949E}.ct-786d0a{color:#D2A8FF}.ct-54619d{color:#79C0FF}.ct-607c3e{color:#FF7B72}.ct-e58c4f{color:#A5D6FF}.ct-d898c1{color:#C9D1D9}.ct-fa942d{color:#C9D1D9}.ct-8b8e9a{color:#FF7B72}.light .ct-8b8e9a{color:#859900}.light .ct-fa942d{color:#657B83}.light .ct-d898c1{color:#268BD2}.light .ct-e58c4f{color:#2AA198}.light .ct-607c3e{color:#073642}.light .ct-54619d{color:#268BD2}.light .ct-786d0a{color:#268BD2}.light .ct-916275{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/react/axios-with-abortcontroller/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360269}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/vue/add-global-variable-to-window/_payload.js b/frontend/vue/add-global-variable-to-window/_payload.js
index 0f1cbb3..61335dd 100644
--- a/frontend/vue/add-global-variable-to-window/_payload.js
+++ b/frontend/vue/add-global-variable-to-window/_payload.js
@@ -1 +1 @@
-export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-gf0FmfUQhH":null},prerenderedAt:1667812499226}
\ No newline at end of file
+export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-gf0FmfUQhH":null},prerenderedAt:1667813361265}
\ No newline at end of file
diff --git a/frontend/vue/add-global-variable-to-window/index.html b/frontend/vue/add-global-variable-to-window/index.html
index 94ca9f0..6c7b873 100644
--- a/frontend/vue/add-global-variable-to-window/index.html
+++ b/frontend/vue/add-global-variable-to-window/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/frontend/vue/add-global-variable-to-window/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><style>._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/frontend/vue/add-global-variable-to-window/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><style>._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><article><h1></h1><!----></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/vue/add-global-variable-to-window/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:c,value:c,unknown:a,forced:b}},_errors:{"content-query-gf0FmfUQhH":a},serverRendered:a,config:{public:{content:{clientDB:{isSPA:b,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:b,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812499226}}(true,false,"dark","shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/HomeReference.e315914b.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><article><h1></h1><!----></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/vue/add-global-variable-to-window/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:c,value:c,unknown:a,forced:b}},_errors:{"content-query-gf0FmfUQhH":a},serverRendered:a,config:{public:{content:{clientDB:{isSPA:b,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:b,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813361265}}(true,false,"dark","shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/HomeReference.dcdfc2c4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/vue/adding-global-properties-to-component/_payload.js b/frontend/vue/adding-global-properties-to-component/_payload.js
index 61608b5..7d63098 100644
--- a/frontend/vue/adding-global-properties-to-component/_payload.js
+++ b/frontend/vue/adding-global-properties-to-component/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:q,_path:r},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-gHURXJrO3C":{_path:r,_dir:"vue",_draft:l,_partial:l,_locale:"en",_empty:l,title:q,description:"The topic's fully covered in the official documentation and in Add global variable to window.",excerpt:{type:s,children:[{type:a,tag:h,props:{},children:[{type:b,value:t},{type:a,tag:i,props:{href:u,rel:[v]},children:[{type:b,value:w}]},{type:b,value:x},{type:a,tag:i,props:{href:y},children:[{type:b,value:z}]},{type:b,value:A}]},{type:a,tag:h,props:{},children:[{type:b,value:B},{type:a,tag:j,props:{},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:j,props:{},children:[{type:b,value:m}]},{type:b,value:E}]},{type:a,tag:k,props:{code:n,language:F},children:[{type:a,tag:G,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:b,value:n}]}]}]}]},body:{type:s,children:[{type:a,tag:h,props:{},children:[{type:b,value:t},{type:a,tag:i,props:{href:u,rel:[v]},children:[{type:b,value:w}]},{type:b,value:x},{type:a,tag:i,props:{href:y},children:[{type:b,value:z}]},{type:b,value:A}]},{type:a,tag:h,props:{},children:[{type:b,value:B},{type:a,tag:j,props:{},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:j,props:{},children:[{type:b,value:m}]},{type:b,value:E}]},{type:a,tag:k,props:{code:n,language:F},children:[{type:a,tag:G,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-964d2b"},children:[{type:b,value:"\u002F\u002F ~\u002Findex.d.ts or ~\u002Fcustom.d.ts"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:H},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:"ct-a3ca8a"},children:[{type:b,value:"axios"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"'axios'"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:p},children:[{type:b,value:"declare"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"module"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"'vue'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"interface"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:"ct-cee846"},children:[{type:b,value:"ComponentCustomProperties"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:"ct-9299ea"},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:" ("}]},{type:a,tag:c,props:{class:"ct-ad6170"},children:[{type:b,value:"key"}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:M},children:[{type:b,value:N}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:") "}]},{type:a,tag:c,props:{class:"ct-c23435"},children:[{type:b,value:"=\u003E"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:M},children:[{type:b,value:N}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"}"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-c23435{color:#FF7B72}.ct-cb7d06{color:#79C0FF}.ct-ad6170{color:#FFA657}.ct-00bcc1{color:#FF7B72}.ct-9299ea{color:#D2A8FF}.ct-38a198{color:#C9D1D9}.ct-cee846{color:#FFA657}.ct-8f0d2a{color:#FF7B72}.ct-49add5{color:#A5D6FF}.ct-a3ca8a{color:#C9D1D9}.ct-59b12a{color:#C9D1D9}.ct-a5de92{color:#FF7B72}.ct-964d2b{color:#8B949E}.light .ct-964d2b{color:#93A1A1}.light .ct-a5de92{color:#859900}.light .ct-59b12a{color:#657B83}.light .ct-a3ca8a{color:#268BD2}.light .ct-49add5{color:#2AA198}.light .ct-8f0d2a{color:#073642}.light .ct-cee846{color:#268BD2}.light .ct-38a198{color:#657B83}.light .ct-9299ea{color:#268BD2}.light .ct-00bcc1{color:#859900}.light .ct-ad6170{color:#657B83}.light .ct-cb7d06{color:#859900}.light .ct-c23435{color:#073642}"}]}],toc:{title:o,searchDepth:O,depth:O,links:[]}},_type:"markdown",_id:"content:Frontend:Vue:Adding global properties to component.md",_source:"content",_file:"Frontend\u002FVue\u002FAdding global properties to component.md",_extension:"md"}},prerenderedAt:1667812498167}}("element","text","span","ct-59b12a","line"," ","ct-38a198","p","a","code-inline","code",false,"$translate","\u002F\u002F ~\u002Findex.d.ts or ~\u002Fcustom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) =\u003E string\n  }\n}\n","","ct-8f0d2a","Adding Global Properties To Component","\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component","root","The topic's fully covered in the ","https:\u002F\u002Fvuejs.org\u002Fguide\u002Ftypescript\u002Foptions-api.html#augmenting-global-properties","nofollow","official documentation"," and in ","Add%20global%20variable%20to%20window","Add global variable to window",".","For example, you want to add global ","$http"," and "," services to all of project's components:","typescript","pre","ct-a5de92","ct-49add5"," {","ct-00bcc1",":","ct-cb7d06","string",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:q,_path:r},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-gHURXJrO3C":{_path:r,_dir:"vue",_draft:l,_partial:l,_locale:"en",_empty:l,title:q,description:"The topic's fully covered in the official documentation and in Add global variable to window.",excerpt:{type:s,children:[{type:a,tag:h,props:{},children:[{type:b,value:t},{type:a,tag:i,props:{href:u,rel:[v]},children:[{type:b,value:w}]},{type:b,value:x},{type:a,tag:i,props:{href:y},children:[{type:b,value:z}]},{type:b,value:A}]},{type:a,tag:h,props:{},children:[{type:b,value:B},{type:a,tag:j,props:{},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:j,props:{},children:[{type:b,value:m}]},{type:b,value:E}]},{type:a,tag:k,props:{code:n,language:F},children:[{type:a,tag:G,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:b,value:n}]}]}]}]},body:{type:s,children:[{type:a,tag:h,props:{},children:[{type:b,value:t},{type:a,tag:i,props:{href:u,rel:[v]},children:[{type:b,value:w}]},{type:b,value:x},{type:a,tag:i,props:{href:y},children:[{type:b,value:z}]},{type:b,value:A}]},{type:a,tag:h,props:{},children:[{type:b,value:B},{type:a,tag:j,props:{},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:j,props:{},children:[{type:b,value:m}]},{type:b,value:E}]},{type:a,tag:k,props:{code:n,language:F},children:[{type:a,tag:G,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-cfd4ea"},children:[{type:b,value:"\u002F\u002F ~\u002Findex.d.ts or ~\u002Fcustom.d.ts"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:H},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:"ct-f9fd34"},children:[{type:b,value:"axios"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"'axios'"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:p},children:[{type:b,value:"declare"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"module"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"'vue'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"interface"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:"ct-b4ae5a"},children:[{type:b,value:"ComponentCustomProperties"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:"ct-fea5b6"},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:" ("}]},{type:a,tag:c,props:{class:"ct-de2a30"},children:[{type:b,value:"key"}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:M},children:[{type:b,value:N}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:") "}]},{type:a,tag:c,props:{class:"ct-82a210"},children:[{type:b,value:"=\u003E"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:M},children:[{type:b,value:N}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"}"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-82a210{color:#FF7B72}.ct-2d5bd5{color:#79C0FF}.ct-de2a30{color:#FFA657}.ct-170947{color:#FF7B72}.ct-fea5b6{color:#D2A8FF}.ct-3f5f3d{color:#C9D1D9}.ct-b4ae5a{color:#FFA657}.ct-7904bc{color:#FF7B72}.ct-9f76f6{color:#A5D6FF}.ct-f9fd34{color:#C9D1D9}.ct-69c0b2{color:#C9D1D9}.ct-d02a4e{color:#FF7B72}.ct-cfd4ea{color:#8B949E}.light .ct-cfd4ea{color:#93A1A1}.light .ct-d02a4e{color:#859900}.light .ct-69c0b2{color:#657B83}.light .ct-f9fd34{color:#268BD2}.light .ct-9f76f6{color:#2AA198}.light .ct-7904bc{color:#073642}.light .ct-b4ae5a{color:#268BD2}.light .ct-3f5f3d{color:#657B83}.light .ct-fea5b6{color:#268BD2}.light .ct-170947{color:#859900}.light .ct-de2a30{color:#657B83}.light .ct-2d5bd5{color:#859900}.light .ct-82a210{color:#073642}"}]}],toc:{title:o,searchDepth:O,depth:O,links:[]}},_type:"markdown",_id:"content:Frontend:Vue:Adding global properties to component.md",_source:"content",_file:"Frontend\u002FVue\u002FAdding global properties to component.md",_extension:"md"}},prerenderedAt:1667813360313}}("element","text","span","ct-69c0b2","line"," ","ct-3f5f3d","p","a","code-inline","code",false,"$translate","\u002F\u002F ~\u002Findex.d.ts or ~\u002Fcustom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n  interface ComponentCustomProperties {\n    $http: typeof axios\n    $translate: (key: string) =\u003E string\n  }\n}\n","","ct-7904bc","Adding Global Properties To Component","\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component","root","The topic's fully covered in the ","https:\u002F\u002Fvuejs.org\u002Fguide\u002Ftypescript\u002Foptions-api.html#augmenting-global-properties","nofollow","official documentation"," and in ","Add%20global%20variable%20to%20window","Add global variable to window",".","For example, you want to add global ","$http"," and "," services to all of project's components:","typescript","pre","ct-d02a4e","ct-9f76f6"," {","ct-170947",":","ct-2d5bd5","string",2))
\ No newline at end of file
diff --git a/frontend/vue/adding-global-properties-to-component/index.html b/frontend/vue/adding-global-properties-to-component/index.html
index a4ea8a0..429433f 100644
--- a/frontend/vue/adding-global-properties-to-component/index.html
+++ b/frontend/vue/adding-global-properties-to-component/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Adding Global Properties To Component • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="The topic's fully covered in the official documentation and in Add global variable to window."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/vue/adding-global-properties-to-component/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Adding Global Properties To Component • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="The topic's fully covered in the official documentation and in Add global variable to window."><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/vue/adding-global-properties-to-component/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/frontend/vue/adding-global-properties-to-component" class="router-link-active _active_192pu_81 _link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Adding Global Properties To Component</h1><article><div><p><!--[-->The topic&#39;s fully covered in the <a href="https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties" rel="nofollow" target="_blank"><!--[-->official documentation<!--]--></a> and in <a href="/frontend/vue/add-global-variable-to-window" class=""><!--[-->Add global variable to window<!--]--></a>.<!--]--></p><p><!--[-->For example, you want to add global <code><!--[-->$http<!--]--></code> and <code><!--[-->$translate<!--]--></code> services to all of project&#39;s components:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-964d2b">// ~/index.d.ts or ~/custom.d.ts</span></span><span class="line"></span><span class="line"><span class="ct-a5de92">import</span><span class="ct-59b12a"> </span><span class="ct-a3ca8a">axios</span><span class="ct-59b12a"> </span><span class="ct-a5de92">from</span><span class="ct-59b12a"> </span><span class="ct-49add5">&#39;axios&#39;</span></span><span class="line"></span><span class="line"><span class="ct-8f0d2a">declare</span><span class="ct-59b12a"> </span><span class="ct-8f0d2a">module</span><span class="ct-59b12a"> </span><span class="ct-49add5">&#39;vue&#39;</span><span class="ct-59b12a"> {</span></span><span class="line"><span class="ct-59b12a">  </span><span class="ct-8f0d2a">interface</span><span class="ct-59b12a"> </span><span class="ct-cee846">ComponentCustomProperties</span><span class="ct-59b12a"> {</span></span><span class="line"><span class="ct-59b12a"> </span><span class="ct-59b12a"> </span></span><span class="line"><span class="ct-38a198">    </span><span class="ct-9299ea">$translate</span><span class="ct-00bcc1">:</span><span class="ct-38a198"> (</span><span class="ct-ad6170">key</span><span class="ct-00bcc1">:</span><span class="ct-38a198"> </span><span class="ct-cb7d06">string</span><span class="ct-38a198">) </span><span class="ct-c23435">=&gt;</span><span class="ct-38a198"> </span><span class="ct-cb7d06">string</span></span><span class="line"><span class="ct-59b12a">  }</span></span><span class="line"><span class="ct-59b12a">}</span></span></code></pre><!--]--></div><style>.ct-c23435{color:#FF7B72}.ct-cb7d06{color:#79C0FF}.ct-ad6170{color:#FFA657}.ct-00bcc1{color:#FF7B72}.ct-9299ea{color:#D2A8FF}.ct-38a198{color:#C9D1D9}.ct-cee846{color:#FFA657}.ct-8f0d2a{color:#FF7B72}.ct-49add5{color:#A5D6FF}.ct-a3ca8a{color:#C9D1D9}.ct-59b12a{color:#C9D1D9}.ct-a5de92{color:#FF7B72}.ct-964d2b{color:#8B949E}.light .ct-964d2b{color:#93A1A1}.light .ct-a5de92{color:#859900}.light .ct-59b12a{color:#657B83}.light .ct-a3ca8a{color:#268BD2}.light .ct-49add5{color:#2AA198}.light .ct-8f0d2a{color:#073642}.light .ct-cee846{color:#268BD2}.light .ct-38a198{color:#657B83}.light .ct-9299ea{color:#268BD2}.light .ct-00bcc1{color:#859900}.light .ct-ad6170{color:#657B83}.light .ct-cb7d06{color:#859900}.light .ct-c23435{color:#073642}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/vue/adding-global-properties-to-component/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498167}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/frontend/vue/adding-global-properties-to-component" class="router-link-active _active_192pu_81 _link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Adding Global Properties To Component</h1><article><div><p><!--[-->The topic&#39;s fully covered in the <a href="https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties" rel="nofollow" target="_blank"><!--[-->official documentation<!--]--></a> and in <a href="/frontend/vue/add-global-variable-to-window" class=""><!--[-->Add global variable to window<!--]--></a>.<!--]--></p><p><!--[-->For example, you want to add global <code><!--[-->$http<!--]--></code> and <code><!--[-->$translate<!--]--></code> services to all of project&#39;s components:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-cfd4ea">// ~/index.d.ts or ~/custom.d.ts</span></span><span class="line"></span><span class="line"><span class="ct-d02a4e">import</span><span class="ct-69c0b2"> </span><span class="ct-f9fd34">axios</span><span class="ct-69c0b2"> </span><span class="ct-d02a4e">from</span><span class="ct-69c0b2"> </span><span class="ct-9f76f6">&#39;axios&#39;</span></span><span class="line"></span><span class="line"><span class="ct-7904bc">declare</span><span class="ct-69c0b2"> </span><span class="ct-7904bc">module</span><span class="ct-69c0b2"> </span><span class="ct-9f76f6">&#39;vue&#39;</span><span class="ct-69c0b2"> {</span></span><span class="line"><span class="ct-69c0b2">  </span><span class="ct-7904bc">interface</span><span class="ct-69c0b2"> </span><span class="ct-b4ae5a">ComponentCustomProperties</span><span class="ct-69c0b2"> {</span></span><span class="line"><span class="ct-69c0b2"> </span><span class="ct-69c0b2"> </span></span><span class="line"><span class="ct-3f5f3d">    </span><span class="ct-fea5b6">$translate</span><span class="ct-170947">:</span><span class="ct-3f5f3d"> (</span><span class="ct-de2a30">key</span><span class="ct-170947">:</span><span class="ct-3f5f3d"> </span><span class="ct-2d5bd5">string</span><span class="ct-3f5f3d">) </span><span class="ct-82a210">=&gt;</span><span class="ct-3f5f3d"> </span><span class="ct-2d5bd5">string</span></span><span class="line"><span class="ct-69c0b2">  }</span></span><span class="line"><span class="ct-69c0b2">}</span></span></code></pre><!--]--></div><style>.ct-82a210{color:#FF7B72}.ct-2d5bd5{color:#79C0FF}.ct-de2a30{color:#FFA657}.ct-170947{color:#FF7B72}.ct-fea5b6{color:#D2A8FF}.ct-3f5f3d{color:#C9D1D9}.ct-b4ae5a{color:#FFA657}.ct-7904bc{color:#FF7B72}.ct-9f76f6{color:#A5D6FF}.ct-f9fd34{color:#C9D1D9}.ct-69c0b2{color:#C9D1D9}.ct-d02a4e{color:#FF7B72}.ct-cfd4ea{color:#8B949E}.light .ct-cfd4ea{color:#93A1A1}.light .ct-d02a4e{color:#859900}.light .ct-69c0b2{color:#657B83}.light .ct-f9fd34{color:#268BD2}.light .ct-9f76f6{color:#2AA198}.light .ct-7904bc{color:#073642}.light .ct-b4ae5a{color:#268BD2}.light .ct-3f5f3d{color:#657B83}.light .ct-fea5b6{color:#268BD2}.light .ct-170947{color:#859900}.light .ct-de2a30{color:#657B83}.light .ct-2d5bd5{color:#859900}.light .ct-82a210{color:#073642}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/vue/adding-global-properties-to-component/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360313}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js b/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js
index fe8aa6d..f64777e 100644
--- a/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js
+++ b/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:u,_path:v}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-JZY9J7Y59r":{_path:v,_dir:"vue",_draft:m,_partial:m,_locale:"en",_empty:m,title:u,description:"By default Nuxt Content Plugin not handling \u003Cspan class=\"highlight\"\u003Ehighlight\u003C\u002Fspan\u003E links. To fix that we will create Nitro plugin:",excerpt:{type:w,children:[{type:a,tag:x,props:{},children:[{type:b,value:y},{type:a,tag:z,props:{href:A,rel:[B]},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:k,props:{},children:[{type:b,value:E}]},{type:b,value:F},{type:a,tag:k,props:{},children:[{type:b,value:G}]},{type:b,value:H}]},{type:a,tag:l,props:{code:n,language:I},children:[{type:a,tag:J,props:{},children:[{type:a,tag:l,props:{__ignoreMap:o},children:[{type:b,value:n}]}]}]}]},body:{type:w,children:[{type:a,tag:x,props:{},children:[{type:b,value:y},{type:a,tag:z,props:{href:A,rel:[B]},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:k,props:{},children:[{type:b,value:E}]},{type:b,value:F},{type:a,tag:k,props:{},children:[{type:b,value:G}]},{type:b,value:H}]},{type:a,tag:l,props:{code:n,language:I},children:[{type:a,tag:J,props:{},children:[{type:a,tag:l,props:{__ignoreMap:o},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-07bca4"},children:[{type:b,value:"\u002F\u002F ~\u002Fserver\u002Fplugins\u002Fhighlight.ts"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:K},children:[{type:b,value:"export"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:"default"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:"ct-61e645"},children:[{type:b,value:"defineNitroPlugin"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"((nitroApp) "}]},{type:a,tag:c,props:{class:"ct-1a60f0"},children:[{type:b,value:"=\u003E"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"{"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"nitroApp"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"hooks"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"hook"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"\"content:file:beforeParse\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"if"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" ("}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"_id"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"endsWith"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"\".md\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:")) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"      "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"replace"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"\u002F==("}]},{type:a,tag:c,props:{class:O},children:[{type:b,value:"["}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"^"}]},{type:a,tag:c,props:{class:O},children:[{type:b,value:"=]"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"+"}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:")==\u002F"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"gs"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:","}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"`\u003Cspan class=\"highlight\"\u003E$1\u003C\u002Fspan\u003E`"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"      );"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  });"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:p},children:[{type:b,value:"}"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:")"}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:";"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-6a52e4{color:#79C0FF}.ct-061337{color:#A5D6FF}.ct-1be858{color:#FF7B72}.ct-89c7d8{color:#A5D6FF}.ct-d24565{color:#D2A8FF}.ct-64dc60{color:#C9D1D9}.ct-67d53e{color:#C9D1D9}.ct-0ba54a{color:#C9D1D9}.ct-1a60f0{color:#FF7B72}.ct-61e645{color:#D2A8FF}.ct-6fcf5f{color:#FFA657}.ct-ac2020{color:#FF7B72}.ct-07bca4{color:#8B949E}.light .ct-07bca4{color:#93A1A1}.light .ct-ac2020{color:#859900}.light .ct-6fcf5f{color:#657B83}.light .ct-61e645{color:#268BD2}.light .ct-1a60f0{color:#073642}.light .ct-0ba54a{color:#657B83}.light .ct-67d53e{color:#657B83}.light .ct-64dc60{color:#268BD2}.light .ct-d24565{color:#268BD2}.light .ct-89c7d8{color:#2AA198}.light .ct-1be858{color:#859900}.light .ct-061337{color:#D30102}.light .ct-6a52e4{color:#CB4B16}"}]}],toc:{title:o,searchDepth:P,depth:P,links:[]}},_type:"markdown",_id:"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md",_source:"content",_file:"Frontend\u002FVue\u002FMake Nuxt handle Obsidian highlights.md",_extension:"md"}},prerenderedAt:1667812498208}}("element","text","span","ct-67d53e","line","ct-64dc60",".","ct-6fcf5f"," ","ct-1be858","code-inline","code",false,"\u002F\u002F ~\u002Fserver\u002Fplugins\u002Fhighlight.ts\nexport default defineNitroPlugin((nitroApp) =\u003E {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) =\u003E {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        \u002F==([^=]+)==\u002Fgs,\n        `\u003Cspan class=\"highlight\"\u003E$1\u003C\u002Fspan\u003E`\n      );\n    }\n  });\n});\n","","ct-0ba54a","ct-d24565","(","ct-89c7d8","file","Make Nuxt Handle Obsidian Highlights","\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights","root","p","By default ","a","https:\u002F\u002Fcontent.nuxtjs.org","nofollow","Nuxt Content Plugin"," not handling ","\u003Cspan class=\"highlight\"\u003Ehighlight\u003C\u002Fspan\u003E"," links. To fix that we will create ","Nitro"," plugin:","typescript","pre","ct-ac2020","body","        ","ct-061337","ct-6a52e4",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:u,_path:v}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-JZY9J7Y59r":{_path:v,_dir:"vue",_draft:m,_partial:m,_locale:"en",_empty:m,title:u,description:"By default Nuxt Content Plugin not handling \u003Cspan class=\"highlight\"\u003Ehighlight\u003C\u002Fspan\u003E links. To fix that we will create Nitro plugin:",excerpt:{type:w,children:[{type:a,tag:x,props:{},children:[{type:b,value:y},{type:a,tag:z,props:{href:A,rel:[B]},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:k,props:{},children:[{type:b,value:E}]},{type:b,value:F},{type:a,tag:k,props:{},children:[{type:b,value:G}]},{type:b,value:H}]},{type:a,tag:l,props:{code:n,language:I},children:[{type:a,tag:J,props:{},children:[{type:a,tag:l,props:{__ignoreMap:o},children:[{type:b,value:n}]}]}]}]},body:{type:w,children:[{type:a,tag:x,props:{},children:[{type:b,value:y},{type:a,tag:z,props:{href:A,rel:[B]},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:k,props:{},children:[{type:b,value:E}]},{type:b,value:F},{type:a,tag:k,props:{},children:[{type:b,value:G}]},{type:b,value:H}]},{type:a,tag:l,props:{code:n,language:I},children:[{type:a,tag:J,props:{},children:[{type:a,tag:l,props:{__ignoreMap:o},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-2e7616"},children:[{type:b,value:"\u002F\u002F ~\u002Fserver\u002Fplugins\u002Fhighlight.ts"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:K},children:[{type:b,value:"export"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:"default"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:"ct-d318f7"},children:[{type:b,value:"defineNitroPlugin"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"((nitroApp) "}]},{type:a,tag:c,props:{class:"ct-1d2692"},children:[{type:b,value:"=\u003E"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"{"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"nitroApp"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"hooks"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"hook"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"\"content:file:beforeParse\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    "}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"if"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" ("}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"_id"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"endsWith"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"\".md\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:")) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"      "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"replace"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"\u002F==("}]},{type:a,tag:c,props:{class:O},children:[{type:b,value:"["}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"^"}]},{type:a,tag:c,props:{class:O},children:[{type:b,value:"=]"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"+"}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:")==\u002F"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"gs"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:","}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"`\u003Cspan class=\"highlight\"\u003E$1\u003C\u002Fspan\u003E`"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"      );"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"  });"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:p},children:[{type:b,value:"}"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:")"}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:";"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-64c297{color:#79C0FF}.ct-817c63{color:#A5D6FF}.ct-1a88aa{color:#FF7B72}.ct-4c47aa{color:#A5D6FF}.ct-6ef647{color:#D2A8FF}.ct-710984{color:#C9D1D9}.ct-bb40ca{color:#C9D1D9}.ct-c8b69f{color:#C9D1D9}.ct-1d2692{color:#FF7B72}.ct-d318f7{color:#D2A8FF}.ct-f01136{color:#FFA657}.ct-8942f2{color:#FF7B72}.ct-2e7616{color:#8B949E}.light .ct-2e7616{color:#93A1A1}.light .ct-8942f2{color:#859900}.light .ct-f01136{color:#657B83}.light .ct-d318f7{color:#268BD2}.light .ct-1d2692{color:#073642}.light .ct-c8b69f{color:#657B83}.light .ct-bb40ca{color:#657B83}.light .ct-710984{color:#268BD2}.light .ct-6ef647{color:#268BD2}.light .ct-4c47aa{color:#2AA198}.light .ct-1a88aa{color:#859900}.light .ct-817c63{color:#D30102}.light .ct-64c297{color:#CB4B16}"}]}],toc:{title:o,searchDepth:P,depth:P,links:[]}},_type:"markdown",_id:"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md",_source:"content",_file:"Frontend\u002FVue\u002FMake Nuxt handle Obsidian highlights.md",_extension:"md"}},prerenderedAt:1667813360343}}("element","text","span","ct-bb40ca","line","ct-710984",".","ct-f01136"," ","ct-1a88aa","code-inline","code",false,"\u002F\u002F ~\u002Fserver\u002Fplugins\u002Fhighlight.ts\nexport default defineNitroPlugin((nitroApp) =\u003E {\n  nitroApp.hooks.hook(\"content:file:beforeParse\", (file) =\u003E {\n    if (file._id.endsWith(\".md\")) {\n      file.body = file.body.replace(\n        \u002F==([^=]+)==\u002Fgs,\n        `\u003Cspan class=\"highlight\"\u003E$1\u003C\u002Fspan\u003E`\n      );\n    }\n  });\n});\n","","ct-c8b69f","ct-6ef647","(","ct-4c47aa","file","Make Nuxt Handle Obsidian Highlights","\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights","root","p","By default ","a","https:\u002F\u002Fcontent.nuxtjs.org","nofollow","Nuxt Content Plugin"," not handling ","\u003Cspan class=\"highlight\"\u003Ehighlight\u003C\u002Fspan\u003E"," links. To fix that we will create ","Nitro"," plugin:","typescript","pre","ct-8942f2","body","        ","ct-817c63","ct-64c297",2))
\ No newline at end of file
diff --git a/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html b/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html
index 16735be..9ab0057 100644
--- a/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html
+++ b/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Make Nuxt Handle Obsidian Highlights • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="By default Nuxt Content Plugin not handling <span class=&quot;highlight&quot;>highlight</span> links. To fix that we will create Nitro plugin:"><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Make Nuxt Handle Obsidian Highlights • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="By default Nuxt Content Plugin not handling <span class=&quot;highlight&quot;>highlight</span> links. To fix that we will create Nitro plugin:"><meta name="head:count" content="3"><link rel="modulepreload" href="/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="router-link-active _active_192pu_81 _link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Make Nuxt Handle Obsidian Highlights</h1><article><div><p><!--[-->By default <a href="https://content.nuxtjs.org" rel="nofollow" target="_blank"><!--[-->Nuxt Content Plugin<!--]--></a> not handling <code><!--[-->&lt;span class=&quot;highlight&quot;&gt;highlight&lt;/span&gt;<!--]--></code> links. To fix that we will create <code><!--[-->Nitro<!--]--></code> plugin:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-07bca4">// ~/server/plugins/highlight.ts</span></span><span class="line"><span class="ct-ac2020">export</span><span class="ct-6fcf5f"> </span><span class="ct-ac2020">default</span><span class="ct-6fcf5f"> </span><span class="ct-61e645">defineNitroPlugin</span><span class="ct-6fcf5f">((nitroApp) </span><span class="ct-1a60f0">=&gt;</span><span class="ct-6fcf5f"> </span><span class="ct-0ba54a">{</span></span><span class="line"><span class="ct-67d53e">  </span><span class="ct-64dc60">nitroApp</span><span class="ct-67d53e">.</span><span class="ct-64dc60">hooks</span><span class="ct-67d53e">.</span><span class="ct-d24565">hook</span><span class="ct-67d53e">(</span><span class="ct-89c7d8">&quot;content:file:beforeParse&quot;</span></span><span class="line"><span class="ct-67d53e">    </span><span class="ct-1be858">if</span><span class="ct-67d53e"> (</span><span class="ct-64dc60">file</span><span class="ct-67d53e">.</span><span class="ct-64dc60">_id</span><span class="ct-67d53e">.</span><span class="ct-d24565">endsWith</span><span class="ct-67d53e">(</span><span class="ct-89c7d8">&quot;.md&quot;</span><span class="ct-67d53e">)) {</span></span><span class="line"><span class="ct-67d53e">      </span><span class="ct-64dc60">file</span><span class="ct-67d53e">.</span><span class="ct-64dc60">body</span><span class="ct-67d53e"> </span><span class="ct-1be858">=</span><span class="ct-67d53e"> </span><span class="ct-64dc60">file</span><span class="ct-67d53e">.</span><span class="ct-64dc60">body</span><span class="ct-67d53e">.</span><span class="ct-d24565">replace</span><span class="ct-67d53e">(</span></span><span class="line"><span class="ct-67d53e">        </span><span class="ct-061337">/==(</span><span class="ct-6a52e4">[</span><span class="ct-1be858">^</span><span class="ct-6a52e4">=]</span><span class="ct-1be858">+</span><span class="ct-061337">)==/</span><span class="ct-1be858">gs</span><span class="ct-67d53e">,</span></span><span class="line"><span class="ct-67d53e">        </span><span class="ct-89c7d8">`&lt;span class=&quot;highlight&quot;&gt;$1&lt;/span&gt;`</span></span><span class="line"><span class="ct-67d53e">      );</span></span><span class="line"><span class="ct-67d53e">    }</span></span><span class="line"><span class="ct-67d53e">  });</span></span><span class="line"><span class="ct-0ba54a">}</span><span class="ct-6fcf5f">)</span><span class="ct-0ba54a">;</span></span></code></pre><!--]--></div><style>.ct-6a52e4{color:#79C0FF}.ct-061337{color:#A5D6FF}.ct-1be858{color:#FF7B72}.ct-89c7d8{color:#A5D6FF}.ct-d24565{color:#D2A8FF}.ct-64dc60{color:#C9D1D9}.ct-67d53e{color:#C9D1D9}.ct-0ba54a{color:#C9D1D9}.ct-1a60f0{color:#FF7B72}.ct-61e645{color:#D2A8FF}.ct-6fcf5f{color:#FFA657}.ct-ac2020{color:#FF7B72}.ct-07bca4{color:#8B949E}.light .ct-07bca4{color:#93A1A1}.light .ct-ac2020{color:#859900}.light .ct-6fcf5f{color:#657B83}.light .ct-61e645{color:#268BD2}.light .ct-1a60f0{color:#073642}.light .ct-0ba54a{color:#657B83}.light .ct-67d53e{color:#657B83}.light .ct-64dc60{color:#268BD2}.light .ct-d24565{color:#268BD2}.light .ct-89c7d8{color:#2AA198}.light .ct-1be858{color:#859900}.light .ct-061337{color:#D30102}.light .ct-6a52e4{color:#CB4B16}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498208}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a aria-current="page" href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="router-link-active _active_192pu_81 _link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Make Nuxt Handle Obsidian Highlights</h1><article><div><p><!--[-->By default <a href="https://content.nuxtjs.org" rel="nofollow" target="_blank"><!--[-->Nuxt Content Plugin<!--]--></a> not handling <code><!--[-->&lt;span class=&quot;highlight&quot;&gt;highlight&lt;/span&gt;<!--]--></code> links. To fix that we will create <code><!--[-->Nitro<!--]--></code> plugin:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-2e7616">// ~/server/plugins/highlight.ts</span></span><span class="line"><span class="ct-8942f2">export</span><span class="ct-f01136"> </span><span class="ct-8942f2">default</span><span class="ct-f01136"> </span><span class="ct-d318f7">defineNitroPlugin</span><span class="ct-f01136">((nitroApp) </span><span class="ct-1d2692">=&gt;</span><span class="ct-f01136"> </span><span class="ct-c8b69f">{</span></span><span class="line"><span class="ct-bb40ca">  </span><span class="ct-710984">nitroApp</span><span class="ct-bb40ca">.</span><span class="ct-710984">hooks</span><span class="ct-bb40ca">.</span><span class="ct-6ef647">hook</span><span class="ct-bb40ca">(</span><span class="ct-4c47aa">&quot;content:file:beforeParse&quot;</span></span><span class="line"><span class="ct-bb40ca">    </span><span class="ct-1a88aa">if</span><span class="ct-bb40ca"> (</span><span class="ct-710984">file</span><span class="ct-bb40ca">.</span><span class="ct-710984">_id</span><span class="ct-bb40ca">.</span><span class="ct-6ef647">endsWith</span><span class="ct-bb40ca">(</span><span class="ct-4c47aa">&quot;.md&quot;</span><span class="ct-bb40ca">)) {</span></span><span class="line"><span class="ct-bb40ca">      </span><span class="ct-710984">file</span><span class="ct-bb40ca">.</span><span class="ct-710984">body</span><span class="ct-bb40ca"> </span><span class="ct-1a88aa">=</span><span class="ct-bb40ca"> </span><span class="ct-710984">file</span><span class="ct-bb40ca">.</span><span class="ct-710984">body</span><span class="ct-bb40ca">.</span><span class="ct-6ef647">replace</span><span class="ct-bb40ca">(</span></span><span class="line"><span class="ct-bb40ca">        </span><span class="ct-817c63">/==(</span><span class="ct-64c297">[</span><span class="ct-1a88aa">^</span><span class="ct-64c297">=]</span><span class="ct-1a88aa">+</span><span class="ct-817c63">)==/</span><span class="ct-1a88aa">gs</span><span class="ct-bb40ca">,</span></span><span class="line"><span class="ct-bb40ca">        </span><span class="ct-4c47aa">`&lt;span class=&quot;highlight&quot;&gt;$1&lt;/span&gt;`</span></span><span class="line"><span class="ct-bb40ca">      );</span></span><span class="line"><span class="ct-bb40ca">    }</span></span><span class="line"><span class="ct-bb40ca">  });</span></span><span class="line"><span class="ct-c8b69f">}</span><span class="ct-f01136">)</span><span class="ct-c8b69f">;</span></span></code></pre><!--]--></div><style>.ct-64c297{color:#79C0FF}.ct-817c63{color:#A5D6FF}.ct-1a88aa{color:#FF7B72}.ct-4c47aa{color:#A5D6FF}.ct-6ef647{color:#D2A8FF}.ct-710984{color:#C9D1D9}.ct-bb40ca{color:#C9D1D9}.ct-c8b69f{color:#C9D1D9}.ct-1d2692{color:#FF7B72}.ct-d318f7{color:#D2A8FF}.ct-f01136{color:#FFA657}.ct-8942f2{color:#FF7B72}.ct-2e7616{color:#8B949E}.light .ct-2e7616{color:#93A1A1}.light .ct-8942f2{color:#859900}.light .ct-f01136{color:#657B83}.light .ct-d318f7{color:#268BD2}.light .ct-1d2692{color:#073642}.light .ct-c8b69f{color:#657B83}.light .ct-bb40ca{color:#657B83}.light .ct-710984{color:#268BD2}.light .ct-6ef647{color:#268BD2}.light .ct-4c47aa{color:#2AA198}.light .ct-1a88aa{color:#859900}.light .ct-817c63{color:#D30102}.light .ct-64c297{color:#CB4B16}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360343}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/git/force-git-to-use-https/_payload.js b/git/force-git-to-use-https/_payload.js
index 97e2019..ee317ab 100644
--- a/git/force-git-to-use-https/_payload.js
+++ b/git/force-git-to-use-https/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:k,_path:l},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-atqGqeweL2":{_path:l,_dir:"git",_draft:g,_partial:g,_locale:"en",_empty:g,title:k,description:h,excerpt:{type:m,children:[{type:a,tag:d,props:{},children:[{type:b,value:h}]},{type:a,tag:d,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:e,props:{code:i,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:e,props:{__ignoreMap:j},children:[{type:b,value:i}]}]}]}]},body:{type:m,children:[{type:a,tag:d,props:{},children:[{type:b,value:h}]},{type:a,tag:d,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:e,props:{code:i,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:e,props:{__ignoreMap:j},children:[{type:a,tag:c,props:{class:t},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"[url "}]},{type:a,tag:c,props:{class:"ct-ea0e55"},children:[{type:b,value:"\"https:\u002F\u002Fgithub.com\""}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"]"}]}]},{type:a,tag:c,props:{class:t},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"    insteadOf "}]},{type:a,tag:c,props:{class:"ct-93e5d8"},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:" git:"}]},{type:a,tag:c,props:{class:"ct-0da74e"},children:[{type:b,value:"\u002F\u002Fgithub.com"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-0da74e{color:#8B949E}.ct-93e5d8{color:#FF7B72}.ct-ea0e55{color:#A5D6FF}.ct-696cb4{color:#C9D1D9}.light .ct-696cb4{color:#657B83}.light .ct-ea0e55{color:#2AA198}.light .ct-93e5d8{color:#859900}.light .ct-0da74e{color:#93A1A1}"}]}],toc:{title:j,searchDepth:u,depth:u,links:[]}},_type:"markdown",_id:"content:Git:Force git to use HTTPS.md",_source:"content",_file:"Git\u002FForce git to use HTTPS.md",_extension:"md"}},prerenderedAt:1667812498244}}("element","text","span","p","code","ct-696cb4",false,"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","[url \"https:\u002F\u002Fgithub.com\"]\n    insteadOf = git:\u002F\u002Fgithub.com\n","","Force Git To Use HTTPS","\u002Fgit\u002Fforce-git-to-use-https","root","Put this inside your ","code-inline","~\u002F.gitconfig",":","c","pre","line",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:k,_path:l},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-atqGqeweL2":{_path:l,_dir:"git",_draft:g,_partial:g,_locale:"en",_empty:g,title:k,description:h,excerpt:{type:m,children:[{type:a,tag:d,props:{},children:[{type:b,value:h}]},{type:a,tag:d,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:e,props:{code:i,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:e,props:{__ignoreMap:j},children:[{type:b,value:i}]}]}]}]},body:{type:m,children:[{type:a,tag:d,props:{},children:[{type:b,value:h}]},{type:a,tag:d,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:e,props:{code:i,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:e,props:{__ignoreMap:j},children:[{type:a,tag:c,props:{class:t},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"[url "}]},{type:a,tag:c,props:{class:"ct-0aff86"},children:[{type:b,value:"\"https:\u002F\u002Fgithub.com\""}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"]"}]}]},{type:a,tag:c,props:{class:t},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"    insteadOf "}]},{type:a,tag:c,props:{class:"ct-f985dd"},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:" git:"}]},{type:a,tag:c,props:{class:"ct-09eae1"},children:[{type:b,value:"\u002F\u002Fgithub.com"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-09eae1{color:#8B949E}.ct-f985dd{color:#FF7B72}.ct-0aff86{color:#A5D6FF}.ct-5bc9e0{color:#C9D1D9}.light .ct-5bc9e0{color:#657B83}.light .ct-0aff86{color:#2AA198}.light .ct-f985dd{color:#859900}.light .ct-09eae1{color:#93A1A1}"}]}],toc:{title:j,searchDepth:u,depth:u,links:[]}},_type:"markdown",_id:"content:Git:Force git to use HTTPS.md",_source:"content",_file:"Git\u002FForce git to use HTTPS.md",_extension:"md"}},prerenderedAt:1667813360373}}("element","text","span","p","code","ct-5bc9e0",false,"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","[url \"https:\u002F\u002Fgithub.com\"]\n    insteadOf = git:\u002F\u002Fgithub.com\n","","Force Git To Use HTTPS","\u002Fgit\u002Fforce-git-to-use-https","root","Put this inside your ","code-inline","~\u002F.gitconfig",":","c","pre","line",2))
\ No newline at end of file
diff --git a/git/force-git-to-use-https/index.html b/git/force-git-to-use-https/index.html
index 5258bfd..2bc1d08 100644
--- a/git/force-git-to-use-https/index.html
+++ b/git/force-git-to-use-https/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Force Git To Use HTTPS • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."><meta name="head:count" content="3"><link rel="modulepreload" href="/git/force-git-to-use-https/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Force Git To Use HTTPS • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."><meta name="head:count" content="3"><link rel="modulepreload" href="/git/force-git-to-use-https/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/git/force-git-to-use-https" class="router-link-active _active_192pu_81 _link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Force Git To Use HTTPS</h1><article><div><p><!--[-->Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.<!--]--></p><p><!--[-->Put this inside your <code><!--[-->~/.gitconfig<!--]--></code>:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>c</span></button><!--[--><pre><code><span class="line"><span class="ct-696cb4">[url </span><span class="ct-ea0e55">&quot;https://github.com&quot;</span><span class="ct-696cb4">]</span></span><span class="line"><span class="ct-696cb4">    insteadOf </span><span class="ct-93e5d8">=</span><span class="ct-696cb4"> git:</span><span class="ct-0da74e">//github.com</span></span></code></pre><!--]--></div><style>.ct-0da74e{color:#8B949E}.ct-93e5d8{color:#FF7B72}.ct-ea0e55{color:#A5D6FF}.ct-696cb4{color:#C9D1D9}.light .ct-696cb4{color:#657B83}.light .ct-ea0e55{color:#2AA198}.light .ct-93e5d8{color:#859900}.light .ct-0da74e{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/git/force-git-to-use-https/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498244}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/git/force-git-to-use-https" class="router-link-active _active_192pu_81 _link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Force Git To Use HTTPS</h1><article><div><p><!--[-->Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.<!--]--></p><p><!--[-->Put this inside your <code><!--[-->~/.gitconfig<!--]--></code>:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>c</span></button><!--[--><pre><code><span class="line"><span class="ct-5bc9e0">[url </span><span class="ct-0aff86">&quot;https://github.com&quot;</span><span class="ct-5bc9e0">]</span></span><span class="line"><span class="ct-5bc9e0">    insteadOf </span><span class="ct-f985dd">=</span><span class="ct-5bc9e0"> git:</span><span class="ct-09eae1">//github.com</span></span></code></pre><!--]--></div><style>.ct-09eae1{color:#8B949E}.ct-f985dd{color:#FF7B72}.ct-0aff86{color:#A5D6FF}.ct-5bc9e0{color:#C9D1D9}.light .ct-5bc9e0{color:#657B83}.light .ct-0aff86{color:#2AA198}.light .ct-f985dd{color:#859900}.light .ct-09eae1{color:#93A1A1}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/git/force-git-to-use-https/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360373}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/git/git-aliases-and-useful-commands/_payload.js b/git/git-aliases-and-useful-commands/_payload.js
index a206d21..07e92ed 100644
--- a/git/git-aliases-and-useful-commands/_payload.js
+++ b/git/git-aliases-and-useful-commands/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:t,_path:u}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-VrJO0uSyzq":{_path:u,_dir:"git",_draft:q,_partial:q,_locale:"en",_empty:q,title:t,description:"Shorthands for #git commands can be specified. Should be placed at ~\u002F.gitconfig.",excerpt:{type:v,children:[{type:a,tag:w,props:{},children:[{type:b,value:x},{type:a,tag:h,props:{},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:n,props:{code:r,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:n,props:{__ignoreMap:s},children:[{type:b,value:r}]}]}]},{type:a,tag:C,props:{},children:[{type:a,tag:D,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:E}]}]},{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:F}]}]}]}]},{type:a,tag:G,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:H}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:I}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:J}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:K}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:L}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:M}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:N}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:O}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:P}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:Q}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:R}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:S}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:T}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:U}]}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{},children:[{type:b,value:x},{type:a,tag:h,props:{},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:n,props:{code:r,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:n,props:{__ignoreMap:s},children:[{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"[alias]"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    flush "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" git clean"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"branches branch "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:V}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" grep "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"v master "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:V}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" xargs git branch "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"D"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    lol "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" log "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"oneline "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"graph"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    l "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" lol"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    c "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:W}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:X}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    cv "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:W}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"no"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"verify "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:X}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    p "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" push"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    pf "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" p "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"force"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"with"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"lease"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    ignore"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"now "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" update"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"index "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"skip"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"worktree"}]}]}]}]}]},{type:a,tag:C,props:{},children:[{type:a,tag:D,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:E}]}]},{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:F}]}]}]}]},{type:a,tag:G,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:H}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:I}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:J}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:K}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:L}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:M}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:N}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:O}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:P}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:Q}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:R}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:S}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:T}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:U}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-24779b{color:#FF7B72}.ct-1c723b{color:#C9D1D9}.light .ct-1c723b{color:#657B83}.light .ct-24779b{color:#859900}"}]}],toc:{title:s,searchDepth:Y,depth:Y,links:[]}},_type:"markdown",_id:"content:Git:Git aliases and useful commands.md",_source:"content",_file:"Git\u002FGit aliases and useful commands.md",_extension:"md"}},prerenderedAt:1667812498271}}("element","text","span","ct-1c723b",null,"td","ct-24779b","code-inline","tr","-","line","=","--","code","th","strong",false,"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","","Git Aliases And Useful Commands","\u002Fgit\u002Fgit-aliases-and-useful-commands","root","p","Shorthands for #git commands can be specified. Should be placed at ","~\u002F.gitconfig",".","c","pre","table","thead","command","description","tbody","git flush","drops all branches, except master","git lol","shows log","git c","commits with message","git cv","commits without hooks","git p","pushes","git pf","push with --force and additional check","git ignore-now","starts ignoring file from now on","|"," commit ","am",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:t,_path:u}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-VrJO0uSyzq":{_path:u,_dir:"git",_draft:q,_partial:q,_locale:"en",_empty:q,title:t,description:"Shorthands for #git commands can be specified. Should be placed at ~\u002F.gitconfig.",excerpt:{type:v,children:[{type:a,tag:w,props:{},children:[{type:b,value:x},{type:a,tag:h,props:{},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:n,props:{code:r,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:n,props:{__ignoreMap:s},children:[{type:b,value:r}]}]}]},{type:a,tag:C,props:{},children:[{type:a,tag:D,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:E}]}]},{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:F}]}]}]}]},{type:a,tag:G,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:H}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:I}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:J}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:K}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:L}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:M}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:N}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:O}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:P}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:Q}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:R}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:S}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:T}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:U}]}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{},children:[{type:b,value:x},{type:a,tag:h,props:{},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:n,props:{code:r,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:n,props:{__ignoreMap:s},children:[{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"[alias]"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    flush "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" git clean"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"branches branch "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:V}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" grep "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"v master "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:V}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" xargs git branch "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"D"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    lol "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" log "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"oneline "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"graph"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    l "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" lol"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    c "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:W}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:X}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    cv "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:W}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"no"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"verify "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:X}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    p "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" push"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    pf "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" p "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"force"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"with"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"lease"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"    ignore"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"now "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" update"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"index "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"skip"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"worktree"}]}]}]}]}]},{type:a,tag:C,props:{},children:[{type:a,tag:D,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:E}]}]},{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:F}]}]}]}]},{type:a,tag:G,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:H}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:I}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:J}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:K}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:L}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:M}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:N}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:O}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:P}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:Q}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:R}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:S}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:T}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:U}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-ca83b5{color:#FF7B72}.ct-e8955a{color:#C9D1D9}.light .ct-e8955a{color:#657B83}.light .ct-ca83b5{color:#859900}"}]}],toc:{title:s,searchDepth:Y,depth:Y,links:[]}},_type:"markdown",_id:"content:Git:Git aliases and useful commands.md",_source:"content",_file:"Git\u002FGit aliases and useful commands.md",_extension:"md"}},prerenderedAt:1667813360399}}("element","text","span","ct-e8955a",null,"td","ct-ca83b5","code-inline","tr","-","line","=","--","code","th","strong",false,"[alias]\n    flush = git clean-branches branch | grep -v master | xargs git branch -D\n    lol = log --oneline --graph\n    l = lol\n    c = commit -am\n    cv = commit --no-verify -am\n    p = push\n    pf = p --force-with-lease\n    ignore-now = update-index --skip-worktree\n","","Git Aliases And Useful Commands","\u002Fgit\u002Fgit-aliases-and-useful-commands","root","p","Shorthands for #git commands can be specified. Should be placed at ","~\u002F.gitconfig",".","c","pre","table","thead","command","description","tbody","git flush","drops all branches, except master","git lol","shows log","git c","commits with message","git cv","commits without hooks","git p","pushes","git pf","push with --force and additional check","git ignore-now","starts ignoring file from now on","|"," commit ","am",2))
\ No newline at end of file
diff --git a/git/git-aliases-and-useful-commands/index.html b/git/git-aliases-and-useful-commands/index.html
index 211004a..b9aabc7 100644
--- a/git/git-aliases-and-useful-commands/index.html
+++ b/git/git-aliases-and-useful-commands/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Git Aliases And Useful Commands • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig."><meta name="head:count" content="3"><link rel="modulepreload" href="/git/git-aliases-and-useful-commands/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTable.848e00bb.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseThead.e6b0aae2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTr.c191348d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTh.898f7f75.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseStrong.f3ca6279.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTbody.52634c80.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTd.340aed92.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Git Aliases And Useful Commands • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig."><meta name="head:count" content="3"><link rel="modulepreload" href="/git/git-aliases-and-useful-commands/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTable.38c46255.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseThead.7e525844.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTr.91c3a4e0.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTh.25f9816d.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseStrong.e221982f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTbody.19692760.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseTd.44b1749b.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a aria-current="page" href="/git/git-aliases-and-useful-commands" class="router-link-active _active_192pu_81 _link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Git Aliases And Useful Commands</h1><article><div><p><!--[-->Shorthands for #git commands can be specified. Should be placed at <code><!--[-->~/.gitconfig<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>c</span></button><!--[--><pre><code><span class="line"><span class="ct-1c723b">[alias]</span></span><span class="line"><span class="ct-1c723b">    flush </span><span class="ct-24779b">=</span><span class="ct-1c723b"> git clean</span><span class="ct-24779b">-</span><span class="ct-1c723b">branches branch </span><span class="ct-24779b">|</span><span class="ct-1c723b"> grep </span><span class="ct-24779b">-</span><span class="ct-1c723b">v master </span><span class="ct-24779b">|</span><span class="ct-1c723b"> xargs git branch </span><span class="ct-24779b">-</span><span class="ct-1c723b">D</span></span><span class="line"><span class="ct-1c723b">    lol </span><span class="ct-24779b">=</span><span class="ct-1c723b"> log </span><span class="ct-24779b">--</span><span class="ct-1c723b">oneline </span><span class="ct-24779b">--</span><span class="ct-1c723b">graph</span></span><span class="line"><span class="ct-1c723b">    l </span><span class="ct-24779b">=</span><span class="ct-1c723b"> lol</span></span><span class="line"><span class="ct-1c723b">    c </span><span class="ct-24779b">=</span><span class="ct-1c723b"> commit </span><span class="ct-24779b">-</span><span class="ct-1c723b">am</span></span><span class="line"><span class="ct-1c723b">    cv </span><span class="ct-24779b">=</span><span class="ct-1c723b"> commit </span><span class="ct-24779b">--</span><span class="ct-1c723b">no</span><span class="ct-24779b">-</span><span class="ct-1c723b">verify </span><span class="ct-24779b">-</span><span class="ct-1c723b">am</span></span><span class="line"><span class="ct-1c723b">    p </span><span class="ct-24779b">=</span><span class="ct-1c723b"> push</span></span><span class="line"><span class="ct-1c723b">    pf </span><span class="ct-24779b">=</span><span class="ct-1c723b"> p </span><span class="ct-24779b">--</span><span class="ct-1c723b">force</span><span class="ct-24779b">-</span><span class="ct-1c723b">with</span><span class="ct-24779b">-</span><span class="ct-1c723b">lease</span></span><span class="line"><span class="ct-1c723b">    ignore</span><span class="ct-24779b">-</span><span class="ct-1c723b">now </span><span class="ct-24779b">=</span><span class="ct-1c723b"> update</span><span class="ct-24779b">-</span><span class="ct-1c723b">index </span><span class="ct-24779b">--</span><span class="ct-1c723b">skip</span><span class="ct-24779b">-</span><span class="ct-1c723b">worktree</span></span></code></pre><!--]--></div><table><!--[--><thead><!--[--><tr><!--[--><th><!--[--><strong><!--[-->command<!--]--></strong><!--]--></th><th><!--[--><strong><!--[-->description<!--]--></strong><!--]--></th><!--]--></tr><!--]--></thead><tbody><!--[--><tr><!--[--><td><!--[--><code><!--[-->git flush<!--]--></code><!--]--></td><td><!--[-->drops all branches, except master<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git lol<!--]--></code><!--]--></td><td><!--[-->shows log<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git c<!--]--></code><!--]--></td><td><!--[-->commits with message<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git cv<!--]--></code><!--]--></td><td><!--[-->commits without hooks<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git p<!--]--></code><!--]--></td><td><!--[-->pushes<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git pf<!--]--></code><!--]--></td><td><!--[-->push with --force and additional check<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git ignore-now<!--]--></code><!--]--></td><td><!--[-->starts ignoring file from now on<!--]--></td><!--]--></tr><!--]--></tbody><!--]--></table><style>.ct-24779b{color:#FF7B72}.ct-1c723b{color:#C9D1D9}.light .ct-1c723b{color:#657B83}.light .ct-24779b{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/git/git-aliases-and-useful-commands/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498271}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseTable.848e00bb.js" crossorigin></script><script type="module" src="/nuxt/ProseThead.e6b0aae2.js" crossorigin></script><script type="module" src="/nuxt/ProseTr.c191348d.js" crossorigin></script><script type="module" src="/nuxt/ProseTh.898f7f75.js" crossorigin></script><script type="module" src="/nuxt/ProseStrong.f3ca6279.js" crossorigin></script><script type="module" src="/nuxt/ProseTbody.52634c80.js" crossorigin></script><script type="module" src="/nuxt/ProseTd.340aed92.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a aria-current="page" href="/git/git-aliases-and-useful-commands" class="router-link-active _active_192pu_81 _link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Git Aliases And Useful Commands</h1><article><div><p><!--[-->Shorthands for #git commands can be specified. Should be placed at <code><!--[-->~/.gitconfig<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>c</span></button><!--[--><pre><code><span class="line"><span class="ct-e8955a">[alias]</span></span><span class="line"><span class="ct-e8955a">    flush </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> git clean</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">branches branch </span><span class="ct-ca83b5">|</span><span class="ct-e8955a"> grep </span><span class="ct-ca83b5">-</span><span class="ct-e8955a">v master </span><span class="ct-ca83b5">|</span><span class="ct-e8955a"> xargs git branch </span><span class="ct-ca83b5">-</span><span class="ct-e8955a">D</span></span><span class="line"><span class="ct-e8955a">    lol </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> log </span><span class="ct-ca83b5">--</span><span class="ct-e8955a">oneline </span><span class="ct-ca83b5">--</span><span class="ct-e8955a">graph</span></span><span class="line"><span class="ct-e8955a">    l </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> lol</span></span><span class="line"><span class="ct-e8955a">    c </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> commit </span><span class="ct-ca83b5">-</span><span class="ct-e8955a">am</span></span><span class="line"><span class="ct-e8955a">    cv </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> commit </span><span class="ct-ca83b5">--</span><span class="ct-e8955a">no</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">verify </span><span class="ct-ca83b5">-</span><span class="ct-e8955a">am</span></span><span class="line"><span class="ct-e8955a">    p </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> push</span></span><span class="line"><span class="ct-e8955a">    pf </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> p </span><span class="ct-ca83b5">--</span><span class="ct-e8955a">force</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">with</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">lease</span></span><span class="line"><span class="ct-e8955a">    ignore</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">now </span><span class="ct-ca83b5">=</span><span class="ct-e8955a"> update</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">index </span><span class="ct-ca83b5">--</span><span class="ct-e8955a">skip</span><span class="ct-ca83b5">-</span><span class="ct-e8955a">worktree</span></span></code></pre><!--]--></div><table><!--[--><thead><!--[--><tr><!--[--><th><!--[--><strong><!--[-->command<!--]--></strong><!--]--></th><th><!--[--><strong><!--[-->description<!--]--></strong><!--]--></th><!--]--></tr><!--]--></thead><tbody><!--[--><tr><!--[--><td><!--[--><code><!--[-->git flush<!--]--></code><!--]--></td><td><!--[-->drops all branches, except master<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git lol<!--]--></code><!--]--></td><td><!--[-->shows log<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git c<!--]--></code><!--]--></td><td><!--[-->commits with message<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git cv<!--]--></code><!--]--></td><td><!--[-->commits without hooks<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git p<!--]--></code><!--]--></td><td><!--[-->pushes<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git pf<!--]--></code><!--]--></td><td><!--[-->push with --force and additional check<!--]--></td><!--]--></tr><tr><!--[--><td><!--[--><code><!--[-->git ignore-now<!--]--></code><!--]--></td><td><!--[-->starts ignoring file from now on<!--]--></td><!--]--></tr><!--]--></tbody><!--]--></table><style>.ct-ca83b5{color:#FF7B72}.ct-e8955a{color:#C9D1D9}.light .ct-e8955a{color:#657B83}.light .ct-ca83b5{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/git/git-aliases-and-useful-commands/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360399}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseTable.38c46255.js" crossorigin></script><script type="module" src="/nuxt/ProseThead.7e525844.js" crossorigin></script><script type="module" src="/nuxt/ProseTr.91c3a4e0.js" crossorigin></script><script type="module" src="/nuxt/ProseTh.25f9816d.js" crossorigin></script><script type="module" src="/nuxt/ProseStrong.e221982f.js" crossorigin></script><script type="module" src="/nuxt/ProseTbody.19692760.js" crossorigin></script><script type="module" src="/nuxt/ProseTd.44b1749b.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/graphql/apollo-client-pagination/_payload.js b/graphql/apollo-client-pagination/_payload.js
index 62622aa..7fb1872 100644
--- a/graphql/apollo-client-pagination/_payload.js
+++ b/graphql/apollo-client-pagination/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:ab,_path:ac},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-k91xxFGA5Y":{_path:ac,_dir:R,_draft:S,_partial:S,_locale:"en",_empty:S,title:ab,description:"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation",excerpt:{type:ad,children:[{type:a,tag:v,props:{},children:[{type:c,value:ae},{type:a,tag:o,props:{},children:[{type:c,value:af}]},{type:c,value:ag},{type:a,tag:ah,props:{href:ai,rel:[aj]},children:[{type:c,value:ak}]}]},{type:a,tag:k,props:{code:T,language:R},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:T}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:al},{type:a,tag:o,props:{},children:[{type:c,value:I}]},{type:c,value:am},{type:a,tag:o,props:{},children:[{type:c,value:J}]},{type:c,value:an}]},{type:a,tag:k,props:{code:U,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:U}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:ao},{type:a,tag:o,props:{},children:[{type:c,value:L}]},{type:c,value:ap}]},{type:a,tag:k,props:{code:V,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:V}]}]}]}]},body:{type:ad,children:[{type:a,tag:v,props:{},children:[{type:c,value:ae},{type:a,tag:o,props:{},children:[{type:c,value:af}]},{type:c,value:ag},{type:a,tag:ah,props:{href:ai,rel:[aj]},children:[{type:c,value:ak}]}]},{type:a,tag:k,props:{code:T,language:R},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"query"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"listItems"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"filter"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"sort"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"limit"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"): "}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"input"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:at},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"name"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:at},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:": ["}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"Item"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"]"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"Int"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:al},{type:a,tag:o,props:{},children:[{type:c,value:I}]},{type:c,value:am},{type:a,tag:o,props:{},children:[{type:c,value:J}]},{type:c,value:an}]},{type:a,tag:k,props:{code:U,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"import"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'@apollo\u002Fclient'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aw}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:"client"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ay}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  cache: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ay}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"});"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:":"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-d80610"},children:[{type:c,value:"TypePolicies"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  Query: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    fields: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F query name"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      listItems: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F apollo will serialize and use keyArgs as unique"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F identifier in cache for every query"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F consider choosing the right fields, "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F i.e. limit and offset won't work here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        keyArgs: ["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'sort'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F primitive type"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'filter'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", ["}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'name'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'type'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F nested fields of `filter`"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        ],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        merge: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:ao},{type:a,tag:o,props:{},children:[{type:c,value:L}]},{type:c,value:ap}]},{type:a,tag:k,props:{code:V,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F** merges all sources with { items: unknown[], totalCount: number } *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:aA},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-e20842"},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:", { "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:aA},children:[{type:c,value:"=\u003E"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F no existing data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"."}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u003C"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F If hook was called multiple times"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F merge cache and incoming data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F apply latest result for totalCount"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aw}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-e20842{color:#D2A8FF}.ct-640d5b{color:#FF7B72}.ct-d80610{color:#FFA657}.ct-2d8226{color:#8B949E}.ct-926fbe{color:#79C0FF}.ct-d1eb42{color:#FF7B72}.ct-4b4e55{color:#A5D6FF}.ct-e1caea{color:#C9D1D9}.ct-15d01a{color:#FF7B72}.ct-dfd676{color:#79C0FF}.ct-877fdf{color:#79C0FF}.ct-5ccade{color:#FFA657}.ct-2f7e13{color:#C9D1D9}.ct-321bed{color:#D2A8FF}.ct-a237a4{color:#C9D1D9}.ct-58cc9f{color:#FF7B72}.light .ct-58cc9f{color:#859900}.light .ct-a237a4{color:#657B83}.light .ct-321bed{color:#268BD2}.light .ct-2f7e13{color:#657B83}.light .ct-5ccade{color:#657B83}.light .ct-877fdf{color:#859900}.light .ct-dfd676{color:#859900}.light .ct-15d01a{color:#859900}.light .ct-e1caea{color:#268BD2}.light .ct-4b4e55{color:#2AA198}.light .ct-d1eb42{color:#073642}.light .ct-926fbe{color:#268BD2}.light .ct-2d8226{color:#93A1A1}.light .ct-d80610{color:#268BD2}.light .ct-640d5b{color:#073642}.light .ct-e20842{color:#268BD2}"}]}],toc:{title:r,searchDepth:aF,depth:aF,links:[]}},_type:"markdown",_id:"content:GraphQL:Apollo Client pagination.md",_source:"content",_file:"GraphQL\u002FApollo Client pagination.md",_extension:"md"}},prerenderedAt:1667812498367}}("element","span","text","ct-a237a4","line"," ","ct-58cc9f","ct-2f7e13","ct-e1caea","ct-2d8226","code","ct-5ccade","  ","    ","code-inline","ct-877fdf","!","",": ","existing","||","p","pre",",","ct-15d01a","      ","?.",", "," {","items","totalCount","ct-4b4e55","const","=","ApolloClient","typePolicies","typescript","mergeItemsWithTotalCount","ct-321bed","ct-d1eb42","ct-926fbe","        ","incoming","graphql",false,"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","import { ApolloClient, InMemoryCache } from '@apollo\u002Fclient';\n\nconst client = new ApolloClient({\n  \u002F\u002F ...\n  cache: new InMemoryCache({ typePolicies }),\n  \u002F\u002F ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      \u002F\u002F query name\n      listItems: {\n        \u002F\u002F apollo will serialize and use keyArgs as unique\n        \u002F\u002F identifier in cache for every query\n        \u002F\u002F consider choosing the right fields, \n        \u002F\u002F i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', \u002F\u002F primitive type\n          'filter', ['name', 'type'] \u002F\u002F nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","\u002F** merges all sources with { items: unknown[], totalCount: number } *\u002F\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) =\u003E {\n    \u002F\u002F no existing data\n    if (!existing || !args?.offset || args.offset \u003C existing.length) {\n      return incoming || [];\n    }\n\n    \u002F\u002F If hook was called multiple times\n    if (existing?.items?.length && args?.offset \u003C existing.items.length) {\n      return existing || [];\n    }\n\n    \u002F\u002F merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    \u002F\u002F apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","(","String","offset","}"," (","args","return","Apollo Client Pagination","\u002Fgraphql\u002Fapollo-client-pagination","root","Say, we have ","gql"," response like this and we wan't to have pagination with it. Let's merge it as it specified in ","a","https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Freact\u002Fcaching\u002Fcache-field-behavior\u002F#the-merge-function","nofollow","official documentation","We will setup "," with "," to merge incoming data in cache:","We will need merge function ",", which will join results of query and cached data for specific key:","Filter","Number","ItemList","ct-dfd676","type","InMemoryCache",";","new","\u002F\u002F ...","          ","ct-640d5b","if"," [];","    }","...",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:ab,_path:ac},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-k91xxFGA5Y":{_path:ac,_dir:R,_draft:S,_partial:S,_locale:"en",_empty:S,title:ab,description:"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation",excerpt:{type:ad,children:[{type:a,tag:v,props:{},children:[{type:c,value:ae},{type:a,tag:o,props:{},children:[{type:c,value:af}]},{type:c,value:ag},{type:a,tag:ah,props:{href:ai,rel:[aj]},children:[{type:c,value:ak}]}]},{type:a,tag:k,props:{code:T,language:R},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:T}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:al},{type:a,tag:o,props:{},children:[{type:c,value:I}]},{type:c,value:am},{type:a,tag:o,props:{},children:[{type:c,value:J}]},{type:c,value:an}]},{type:a,tag:k,props:{code:U,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:U}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:ao},{type:a,tag:o,props:{},children:[{type:c,value:L}]},{type:c,value:ap}]},{type:a,tag:k,props:{code:V,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:V}]}]}]}]},body:{type:ad,children:[{type:a,tag:v,props:{},children:[{type:c,value:ae},{type:a,tag:o,props:{},children:[{type:c,value:af}]},{type:c,value:ag},{type:a,tag:ah,props:{href:ai,rel:[aj]},children:[{type:c,value:ak}]}]},{type:a,tag:k,props:{code:T,language:R},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"query"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"listItems"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"filter"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"sort"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"limit"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"): "}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"input"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:at},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"name"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:at},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:": ["}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"Item"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"]"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"Int"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:al},{type:a,tag:o,props:{},children:[{type:c,value:I}]},{type:c,value:am},{type:a,tag:o,props:{},children:[{type:c,value:J}]},{type:c,value:an}]},{type:a,tag:k,props:{code:U,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"import"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'@apollo\u002Fclient'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aw}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:"client"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ay}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  cache: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ay}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"});"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:":"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-525383"},children:[{type:c,value:"TypePolicies"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  Query: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    fields: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F query name"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      listItems: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F apollo will serialize and use keyArgs as unique"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F identifier in cache for every query"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F consider choosing the right fields, "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F i.e. limit and offset won't work here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        keyArgs: ["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'sort'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F primitive type"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'filter'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", ["}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'name'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'type'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F nested fields of `filter`"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        ],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        merge: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:ao},{type:a,tag:o,props:{},children:[{type:c,value:L}]},{type:c,value:ap}]},{type:a,tag:k,props:{code:V,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F** merges all sources with { items: unknown[], totalCount: number } *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:aA},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-c0b017"},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:", { "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:aA},children:[{type:c,value:"=\u003E"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F no existing data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"."}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u003C"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F If hook was called multiple times"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F merge cache and incoming data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F apply latest result for totalCount"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aw}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-c0b017{color:#D2A8FF}.ct-062754{color:#FF7B72}.ct-525383{color:#FFA657}.ct-4ed952{color:#8B949E}.ct-dbd2b0{color:#79C0FF}.ct-b63a22{color:#FF7B72}.ct-009c3c{color:#A5D6FF}.ct-905c16{color:#C9D1D9}.ct-d6b457{color:#FF7B72}.ct-17feeb{color:#79C0FF}.ct-1fd63d{color:#79C0FF}.ct-bd1313{color:#FFA657}.ct-5ee133{color:#C9D1D9}.ct-7fa1a6{color:#D2A8FF}.ct-912659{color:#C9D1D9}.ct-aeb03e{color:#FF7B72}.light .ct-aeb03e{color:#859900}.light .ct-912659{color:#657B83}.light .ct-7fa1a6{color:#268BD2}.light .ct-5ee133{color:#657B83}.light .ct-bd1313{color:#657B83}.light .ct-1fd63d{color:#859900}.light .ct-17feeb{color:#859900}.light .ct-d6b457{color:#859900}.light .ct-905c16{color:#268BD2}.light .ct-009c3c{color:#2AA198}.light .ct-b63a22{color:#073642}.light .ct-dbd2b0{color:#268BD2}.light .ct-4ed952{color:#93A1A1}.light .ct-525383{color:#268BD2}.light .ct-062754{color:#073642}.light .ct-c0b017{color:#268BD2}"}]}],toc:{title:r,searchDepth:aF,depth:aF,links:[]}},_type:"markdown",_id:"content:GraphQL:Apollo Client pagination.md",_source:"content",_file:"GraphQL\u002FApollo Client pagination.md",_extension:"md"}},prerenderedAt:1667813360490}}("element","span","text","ct-912659","line"," ","ct-aeb03e","ct-5ee133","ct-905c16","ct-4ed952","code","ct-bd1313","  ","    ","code-inline","ct-1fd63d","!","",": ","existing","||","p","pre",",","ct-d6b457","      ","?.",", "," {","items","totalCount","ct-009c3c","const","=","ApolloClient","typePolicies","typescript","mergeItemsWithTotalCount","ct-7fa1a6","ct-b63a22","ct-dbd2b0","        ","incoming","graphql",false,"query listItems(\n  filter: Filter, \n  sort: String,\n  limit: Number,\n  offset: Number,\n): ItemList!\n\ninput Filter {\n  name: String!\n  type: String!\n}\n\ntype ItemList {\n  items: [Item!]!\n  totalCount: Int!\n}\n","import { ApolloClient, InMemoryCache } from '@apollo\u002Fclient';\n\nconst client = new ApolloClient({\n  \u002F\u002F ...\n  cache: new InMemoryCache({ typePolicies }),\n  \u002F\u002F ...\n});\n\nexport const typePolicies: TypePolicies = {\n  Query: {\n    fields: {\n      \u002F\u002F query name\n      listItems: {\n        \u002F\u002F apollo will serialize and use keyArgs as unique\n        \u002F\u002F identifier in cache for every query\n        \u002F\u002F consider choosing the right fields, \n        \u002F\u002F i.e. limit and offset won't work here\n        keyArgs: [\n          'sort', \u002F\u002F primitive type\n          'filter', ['name', 'type'] \u002F\u002F nested fields of `filter`\n        ],\n        merge: mergeItemsWithTotalCount,\n      },\n  }\n}\n","\u002F** merges all sources with { items: unknown[], totalCount: number } *\u002F\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) =\u003E {\n    \u002F\u002F no existing data\n    if (!existing || !args?.offset || args.offset \u003C existing.length) {\n      return incoming || [];\n    }\n\n    \u002F\u002F If hook was called multiple times\n    if (existing?.items?.length && args?.offset \u003C existing.items.length) {\n      return existing || [];\n    }\n\n    \u002F\u002F merge cache and incoming data\n    const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n    \u002F\u002F apply latest result for totalCount\n    const totalCount = incoming?.totalCount || existing?.totalCount;\n\n    return {\n      ...(incoming || existing || {}),\n      items,\n      totalCount,\n    };\n  };\n","(","String","offset","}"," (","args","return","Apollo Client Pagination","\u002Fgraphql\u002Fapollo-client-pagination","root","Say, we have ","gql"," response like this and we wan't to have pagination with it. Let's merge it as it specified in ","a","https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Freact\u002Fcaching\u002Fcache-field-behavior\u002F#the-merge-function","nofollow","official documentation","We will setup "," with "," to merge incoming data in cache:","We will need merge function ",", which will join results of query and cached data for specific key:","Filter","Number","ItemList","ct-17feeb","type","InMemoryCache",";","new","\u002F\u002F ...","          ","ct-062754","if"," [];","    }","...",2))
\ No newline at end of file
diff --git a/graphql/apollo-client-pagination/index.html b/graphql/apollo-client-pagination/index.html
index 543df5a..595408c 100644
--- a/graphql/apollo-client-pagination/index.html
+++ b/graphql/apollo-client-pagination/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Apollo Client Pagination • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation"><meta name="head:count" content="3"><link rel="modulepreload" href="/graphql/apollo-client-pagination/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Apollo Client Pagination • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation"><meta name="head:count" content="3"><link rel="modulepreload" href="/graphql/apollo-client-pagination/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/graphql/apollo-client-pagination" class="router-link-active _active_192pu_81 _link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Apollo Client Pagination</h1><article><div><p><!--[-->Say, we have <code><!--[-->gql<!--]--></code> response like this and we wan&#39;t to have pagination with it. Let&#39;s merge it as it specified in <a href="https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function" rel="nofollow" target="_blank"><!--[-->official documentation<!--]--></a><!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>graphql</span></button><!--[--><pre><code><span class="line"><span class="ct-58cc9f">query</span><span class="ct-a237a4"> </span><span class="ct-321bed">listItems</span><span class="ct-a237a4">(</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">filter</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">Filter</span><span class="ct-2f7e13">, </span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">sort</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">String</span><span class="ct-2f7e13">,</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">limit</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">Number</span><span class="ct-2f7e13">,</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">offset</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">Number</span><span class="ct-2f7e13">,</span></span><span class="line"><span class="ct-a237a4">): </span><span class="ct-321bed">ItemList</span><span class="ct-a237a4">!</span></span><span class="line"></span><span class="line"><span class="ct-58cc9f">input</span><span class="ct-a237a4"> </span><span class="ct-dfd676">Filter</span><span class="ct-a237a4"> {</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">name</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">String</span><span class="ct-15d01a">!</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">type</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">String</span><span class="ct-15d01a">!</span></span><span class="line"><span class="ct-a237a4">}</span></span><span class="line"></span><span class="line"><span class="ct-58cc9f">type</span><span class="ct-a237a4"> </span><span class="ct-dfd676">ItemList</span><span class="ct-a237a4"> {</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">items</span><span class="ct-2f7e13">: [</span><span class="ct-877fdf">Item</span><span class="ct-15d01a">!</span><span class="ct-2f7e13">]</span><span class="ct-15d01a">!</span></span><span class="line"><span class="ct-2f7e13">  </span><span class="ct-5ccade">totalCount</span><span class="ct-2f7e13">: </span><span class="ct-877fdf">Int</span><span class="ct-15d01a">!</span></span><span class="line"><span class="ct-a237a4">}</span></span></code></pre><!--]--></div><p><!--[-->We will setup <code><!--[-->ApolloClient<!--]--></code> with <code><!--[-->typePolicies<!--]--></code> to merge incoming data in cache:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-58cc9f">import</span><span class="ct-a237a4"> { </span><span class="ct-e1caea">ApolloClient</span><span class="ct-a237a4">, </span><span class="ct-e1caea">InMemoryCache</span><span class="ct-a237a4"> } </span><span class="ct-58cc9f">from</span><span class="ct-a237a4"> </span><span class="ct-4b4e55">&#39;@apollo/client&#39;</span><span class="ct-a237a4">;</span></span><span class="line"></span><span class="line"><span class="ct-d1eb42">const</span><span class="ct-a237a4"> </span><span class="ct-926fbe">client</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">=</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">new</span><span class="ct-a237a4"> </span><span class="ct-321bed">ApolloClient</span><span class="ct-a237a4">({</span></span><span class="line"><span class="ct-a237a4">  </span><span class="ct-2d8226">// ...</span></span><span class="line"><span class="ct-a237a4">  cache: </span><span class="ct-58cc9f">new</span><span class="ct-a237a4"> </span><span class="ct-321bed">InMemoryCache</span><span class="ct-a237a4">({ </span><span class="ct-e1caea">typePolicies</span><span class="ct-a237a4"> }),</span></span><span class="line"><span class="ct-a237a4">  </span><span class="ct-2d8226">// ...</span></span><span class="line"><span class="ct-a237a4">});</span></span><span class="line"></span><span class="line"><span class="ct-58cc9f">export</span><span class="ct-a237a4"> </span><span class="ct-d1eb42">const</span><span class="ct-a237a4"> </span><span class="ct-926fbe">typePolicies</span><span class="ct-58cc9f">:</span><span class="ct-a237a4"> </span><span class="ct-d80610">TypePolicies</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">=</span><span class="ct-a237a4"> {</span></span><span class="line"><span class="ct-a237a4">  Query: {</span></span><span class="line"><span class="ct-a237a4">    fields: {</span></span><span class="line"><span class="ct-a237a4">      </span><span class="ct-2d8226">// query name</span></span><span class="line"><span class="ct-a237a4">      listItems: {</span></span><span class="line"><span class="ct-a237a4">        </span><span class="ct-2d8226">// apollo will serialize and use keyArgs as unique</span></span><span class="line"><span class="ct-a237a4">        </span><span class="ct-2d8226">// identifier in cache for every query</span></span><span class="line"><span class="ct-a237a4">        </span><span class="ct-2d8226">// consider choosing the right fields, </span></span><span class="line"><span class="ct-a237a4">        </span><span class="ct-2d8226">// i.e. limit and offset won&#39;t work here</span></span><span class="line"><span class="ct-a237a4">        keyArgs: [</span></span><span class="line"><span class="ct-a237a4">          </span><span class="ct-4b4e55">&#39;sort&#39;</span><span class="ct-a237a4">, </span><span class="ct-2d8226">// primitive type</span></span><span class="line"><span class="ct-a237a4">          </span><span class="ct-4b4e55">&#39;filter&#39;</span><span class="ct-a237a4">, [</span><span class="ct-4b4e55">&#39;name&#39;</span><span class="ct-a237a4">, </span><span class="ct-4b4e55">&#39;type&#39;</span><span class="ct-a237a4">] </span><span class="ct-2d8226">// nested fields of `filter`</span></span><span class="line"><span class="ct-a237a4">        ],</span></span><span class="line"><span class="ct-a237a4">        merge: </span><span class="ct-e1caea">mergeItemsWithTotalCount</span><span class="ct-a237a4">,</span></span><span class="line"><span class="ct-a237a4">      },</span></span><span class="line"><span class="ct-a237a4">  }</span></span><span class="line"><span class="ct-a237a4">}</span></span></code></pre><!--]--></div><p><!--[-->We will need merge function <code><!--[-->mergeItemsWithTotalCount<!--]--></code>, which will join results of query and cached data for specific key:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-2d8226">/** merges all sources with { items: unknown[], totalCount: number } */</span></span><span class="line"><span class="ct-640d5b">const</span><span class="ct-2f7e13"> </span><span class="ct-e20842">mergeItemsWithTotalCount</span><span class="ct-2f7e13"> </span><span class="ct-15d01a">=</span><span class="ct-2f7e13"> (</span><span class="ct-5ccade">existing</span><span class="ct-2f7e13">, </span><span class="ct-5ccade">incoming</span><span class="ct-2f7e13">, { </span><span class="ct-5ccade">args</span><span class="ct-2f7e13"> }) </span><span class="ct-640d5b">=&gt;</span><span class="ct-2f7e13"> {</span></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-2d8226">// no existing data</span></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-58cc9f">if</span><span class="ct-a237a4"> (</span><span class="ct-58cc9f">!</span><span class="ct-e1caea">existing</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">!</span><span class="ct-e1caea">args</span><span class="ct-a237a4">?.</span><span class="ct-e1caea">offset</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> </span><span class="ct-e1caea">args</span><span class="ct-a237a4">.</span><span class="ct-e1caea">offset</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">&lt;</span><span class="ct-a237a4"> </span><span class="ct-e1caea">existing</span></span><span class="line"><span class="ct-a237a4">      </span><span class="ct-58cc9f">return</span><span class="ct-a237a4"> </span><span class="ct-e1caea">incoming</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> [];</span></span><span class="line"><span class="ct-a237a4">    }</span></span><span class="line"></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-2d8226">// If hook was called multiple times</span></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-58cc9f">if</span><span class="ct-a237a4"> (</span><span class="ct-e1caea">existing</span><span class="ct-a237a4">?.</span><span class="ct-e1caea">items</span><span class="ct-a237a4">?.</span></span><span class="line"><span class="ct-a237a4">      </span><span class="ct-58cc9f">return</span><span class="ct-a237a4"> </span><span class="ct-e1caea">existing</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> [];</span></span><span class="line"><span class="ct-a237a4">    }</span></span><span class="line"></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-2d8226">// merge cache and incoming data</span></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-d1eb42">const</span><span class="ct-a237a4"> </span><span class="ct-926fbe">items</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">=</span><span class="ct-a237a4"> [</span><span class="ct-58cc9f">...</span><span class="ct-a237a4">(</span><span class="ct-e1caea">existing</span><span class="ct-a237a4">?.</span><span class="ct-e1caea">items</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> </span></span><span class="line"></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-2d8226">// apply latest result for totalCount</span></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-d1eb42">const</span><span class="ct-a237a4"> </span><span class="ct-926fbe">totalCount</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">=</span><span class="ct-a237a4"> </span><span class="ct-e1caea">incoming</span><span class="ct-a237a4">?.</span><span class="ct-e1caea">totalCount</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> </span><span class="ct-e1caea">existing</span><span class="ct-a237a4">?.</span><span class="ct-e1caea">totalCount</span><span class="ct-a237a4">;</span></span><span class="line"></span><span class="line"><span class="ct-a237a4">    </span><span class="ct-58cc9f">return</span><span class="ct-a237a4"> {</span></span><span class="line"><span class="ct-a237a4">      </span><span class="ct-58cc9f">...</span><span class="ct-a237a4">(</span><span class="ct-e1caea">incoming</span><span class="ct-a237a4"> </span><span class="ct-58cc9f">||</span><span class="ct-a237a4"> </span></span><span class="line"><span class="ct-a237a4">      </span><span class="ct-e1caea">items</span><span class="ct-a237a4">,</span></span><span class="line"><span class="ct-a237a4">      </span><span class="ct-e1caea">totalCount</span><span class="ct-a237a4">,</span></span><span class="line"><span class="ct-a237a4">    };</span></span><span class="line"><span class="ct-a237a4">  };</span></span></code></pre><!--]--></div><style>.ct-e20842{color:#D2A8FF}.ct-640d5b{color:#FF7B72}.ct-d80610{color:#FFA657}.ct-2d8226{color:#8B949E}.ct-926fbe{color:#79C0FF}.ct-d1eb42{color:#FF7B72}.ct-4b4e55{color:#A5D6FF}.ct-e1caea{color:#C9D1D9}.ct-15d01a{color:#FF7B72}.ct-dfd676{color:#79C0FF}.ct-877fdf{color:#79C0FF}.ct-5ccade{color:#FFA657}.ct-2f7e13{color:#C9D1D9}.ct-321bed{color:#D2A8FF}.ct-a237a4{color:#C9D1D9}.ct-58cc9f{color:#FF7B72}.light .ct-58cc9f{color:#859900}.light .ct-a237a4{color:#657B83}.light .ct-321bed{color:#268BD2}.light .ct-2f7e13{color:#657B83}.light .ct-5ccade{color:#657B83}.light .ct-877fdf{color:#859900}.light .ct-dfd676{color:#859900}.light .ct-15d01a{color:#859900}.light .ct-e1caea{color:#268BD2}.light .ct-4b4e55{color:#2AA198}.light .ct-d1eb42{color:#073642}.light .ct-926fbe{color:#268BD2}.light .ct-2d8226{color:#93A1A1}.light .ct-d80610{color:#268BD2}.light .ct-640d5b{color:#073642}.light .ct-e20842{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/graphql/apollo-client-pagination/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498367}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/graphql/apollo-client-pagination" class="router-link-active _active_192pu_81 _link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Apollo Client Pagination</h1><article><div><p><!--[-->Say, we have <code><!--[-->gql<!--]--></code> response like this and we wan&#39;t to have pagination with it. Let&#39;s merge it as it specified in <a href="https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function" rel="nofollow" target="_blank"><!--[-->official documentation<!--]--></a><!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>graphql</span></button><!--[--><pre><code><span class="line"><span class="ct-aeb03e">query</span><span class="ct-912659"> </span><span class="ct-7fa1a6">listItems</span><span class="ct-912659">(</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">filter</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">Filter</span><span class="ct-5ee133">, </span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">sort</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">String</span><span class="ct-5ee133">,</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">limit</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">Number</span><span class="ct-5ee133">,</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">offset</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">Number</span><span class="ct-5ee133">,</span></span><span class="line"><span class="ct-912659">): </span><span class="ct-7fa1a6">ItemList</span><span class="ct-912659">!</span></span><span class="line"></span><span class="line"><span class="ct-aeb03e">input</span><span class="ct-912659"> </span><span class="ct-17feeb">Filter</span><span class="ct-912659"> {</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">name</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">String</span><span class="ct-d6b457">!</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">type</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">String</span><span class="ct-d6b457">!</span></span><span class="line"><span class="ct-912659">}</span></span><span class="line"></span><span class="line"><span class="ct-aeb03e">type</span><span class="ct-912659"> </span><span class="ct-17feeb">ItemList</span><span class="ct-912659"> {</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">items</span><span class="ct-5ee133">: [</span><span class="ct-1fd63d">Item</span><span class="ct-d6b457">!</span><span class="ct-5ee133">]</span><span class="ct-d6b457">!</span></span><span class="line"><span class="ct-5ee133">  </span><span class="ct-bd1313">totalCount</span><span class="ct-5ee133">: </span><span class="ct-1fd63d">Int</span><span class="ct-d6b457">!</span></span><span class="line"><span class="ct-912659">}</span></span></code></pre><!--]--></div><p><!--[-->We will setup <code><!--[-->ApolloClient<!--]--></code> with <code><!--[-->typePolicies<!--]--></code> to merge incoming data in cache:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-aeb03e">import</span><span class="ct-912659"> { </span><span class="ct-905c16">ApolloClient</span><span class="ct-912659">, </span><span class="ct-905c16">InMemoryCache</span><span class="ct-912659"> } </span><span class="ct-aeb03e">from</span><span class="ct-912659"> </span><span class="ct-009c3c">&#39;@apollo/client&#39;</span><span class="ct-912659">;</span></span><span class="line"></span><span class="line"><span class="ct-b63a22">const</span><span class="ct-912659"> </span><span class="ct-dbd2b0">client</span><span class="ct-912659"> </span><span class="ct-aeb03e">=</span><span class="ct-912659"> </span><span class="ct-aeb03e">new</span><span class="ct-912659"> </span><span class="ct-7fa1a6">ApolloClient</span><span class="ct-912659">({</span></span><span class="line"><span class="ct-912659">  </span><span class="ct-4ed952">// ...</span></span><span class="line"><span class="ct-912659">  cache: </span><span class="ct-aeb03e">new</span><span class="ct-912659"> </span><span class="ct-7fa1a6">InMemoryCache</span><span class="ct-912659">({ </span><span class="ct-905c16">typePolicies</span><span class="ct-912659"> }),</span></span><span class="line"><span class="ct-912659">  </span><span class="ct-4ed952">// ...</span></span><span class="line"><span class="ct-912659">});</span></span><span class="line"></span><span class="line"><span class="ct-aeb03e">export</span><span class="ct-912659"> </span><span class="ct-b63a22">const</span><span class="ct-912659"> </span><span class="ct-dbd2b0">typePolicies</span><span class="ct-aeb03e">:</span><span class="ct-912659"> </span><span class="ct-525383">TypePolicies</span><span class="ct-912659"> </span><span class="ct-aeb03e">=</span><span class="ct-912659"> {</span></span><span class="line"><span class="ct-912659">  Query: {</span></span><span class="line"><span class="ct-912659">    fields: {</span></span><span class="line"><span class="ct-912659">      </span><span class="ct-4ed952">// query name</span></span><span class="line"><span class="ct-912659">      listItems: {</span></span><span class="line"><span class="ct-912659">        </span><span class="ct-4ed952">// apollo will serialize and use keyArgs as unique</span></span><span class="line"><span class="ct-912659">        </span><span class="ct-4ed952">// identifier in cache for every query</span></span><span class="line"><span class="ct-912659">        </span><span class="ct-4ed952">// consider choosing the right fields, </span></span><span class="line"><span class="ct-912659">        </span><span class="ct-4ed952">// i.e. limit and offset won&#39;t work here</span></span><span class="line"><span class="ct-912659">        keyArgs: [</span></span><span class="line"><span class="ct-912659">          </span><span class="ct-009c3c">&#39;sort&#39;</span><span class="ct-912659">, </span><span class="ct-4ed952">// primitive type</span></span><span class="line"><span class="ct-912659">          </span><span class="ct-009c3c">&#39;filter&#39;</span><span class="ct-912659">, [</span><span class="ct-009c3c">&#39;name&#39;</span><span class="ct-912659">, </span><span class="ct-009c3c">&#39;type&#39;</span><span class="ct-912659">] </span><span class="ct-4ed952">// nested fields of `filter`</span></span><span class="line"><span class="ct-912659">        ],</span></span><span class="line"><span class="ct-912659">        merge: </span><span class="ct-905c16">mergeItemsWithTotalCount</span><span class="ct-912659">,</span></span><span class="line"><span class="ct-912659">      },</span></span><span class="line"><span class="ct-912659">  }</span></span><span class="line"><span class="ct-912659">}</span></span></code></pre><!--]--></div><p><!--[-->We will need merge function <code><!--[-->mergeItemsWithTotalCount<!--]--></code>, which will join results of query and cached data for specific key:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4ed952">/** merges all sources with { items: unknown[], totalCount: number } */</span></span><span class="line"><span class="ct-062754">const</span><span class="ct-5ee133"> </span><span class="ct-c0b017">mergeItemsWithTotalCount</span><span class="ct-5ee133"> </span><span class="ct-d6b457">=</span><span class="ct-5ee133"> (</span><span class="ct-bd1313">existing</span><span class="ct-5ee133">, </span><span class="ct-bd1313">incoming</span><span class="ct-5ee133">, { </span><span class="ct-bd1313">args</span><span class="ct-5ee133"> }) </span><span class="ct-062754">=&gt;</span><span class="ct-5ee133"> {</span></span><span class="line"><span class="ct-912659">    </span><span class="ct-4ed952">// no existing data</span></span><span class="line"><span class="ct-912659">    </span><span class="ct-aeb03e">if</span><span class="ct-912659"> (</span><span class="ct-aeb03e">!</span><span class="ct-905c16">existing</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> </span><span class="ct-aeb03e">!</span><span class="ct-905c16">args</span><span class="ct-912659">?.</span><span class="ct-905c16">offset</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> </span><span class="ct-905c16">args</span><span class="ct-912659">.</span><span class="ct-905c16">offset</span><span class="ct-912659"> </span><span class="ct-aeb03e">&lt;</span><span class="ct-912659"> </span><span class="ct-905c16">existing</span></span><span class="line"><span class="ct-912659">      </span><span class="ct-aeb03e">return</span><span class="ct-912659"> </span><span class="ct-905c16">incoming</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> [];</span></span><span class="line"><span class="ct-912659">    }</span></span><span class="line"></span><span class="line"><span class="ct-912659">    </span><span class="ct-4ed952">// If hook was called multiple times</span></span><span class="line"><span class="ct-912659">    </span><span class="ct-aeb03e">if</span><span class="ct-912659"> (</span><span class="ct-905c16">existing</span><span class="ct-912659">?.</span><span class="ct-905c16">items</span><span class="ct-912659">?.</span></span><span class="line"><span class="ct-912659">      </span><span class="ct-aeb03e">return</span><span class="ct-912659"> </span><span class="ct-905c16">existing</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> [];</span></span><span class="line"><span class="ct-912659">    }</span></span><span class="line"></span><span class="line"><span class="ct-912659">    </span><span class="ct-4ed952">// merge cache and incoming data</span></span><span class="line"><span class="ct-912659">    </span><span class="ct-b63a22">const</span><span class="ct-912659"> </span><span class="ct-dbd2b0">items</span><span class="ct-912659"> </span><span class="ct-aeb03e">=</span><span class="ct-912659"> [</span><span class="ct-aeb03e">...</span><span class="ct-912659">(</span><span class="ct-905c16">existing</span><span class="ct-912659">?.</span><span class="ct-905c16">items</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> </span></span><span class="line"></span><span class="line"><span class="ct-912659">    </span><span class="ct-4ed952">// apply latest result for totalCount</span></span><span class="line"><span class="ct-912659">    </span><span class="ct-b63a22">const</span><span class="ct-912659"> </span><span class="ct-dbd2b0">totalCount</span><span class="ct-912659"> </span><span class="ct-aeb03e">=</span><span class="ct-912659"> </span><span class="ct-905c16">incoming</span><span class="ct-912659">?.</span><span class="ct-905c16">totalCount</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> </span><span class="ct-905c16">existing</span><span class="ct-912659">?.</span><span class="ct-905c16">totalCount</span><span class="ct-912659">;</span></span><span class="line"></span><span class="line"><span class="ct-912659">    </span><span class="ct-aeb03e">return</span><span class="ct-912659"> {</span></span><span class="line"><span class="ct-912659">      </span><span class="ct-aeb03e">...</span><span class="ct-912659">(</span><span class="ct-905c16">incoming</span><span class="ct-912659"> </span><span class="ct-aeb03e">||</span><span class="ct-912659"> </span></span><span class="line"><span class="ct-912659">      </span><span class="ct-905c16">items</span><span class="ct-912659">,</span></span><span class="line"><span class="ct-912659">      </span><span class="ct-905c16">totalCount</span><span class="ct-912659">,</span></span><span class="line"><span class="ct-912659">    };</span></span><span class="line"><span class="ct-912659">  };</span></span></code></pre><!--]--></div><style>.ct-c0b017{color:#D2A8FF}.ct-062754{color:#FF7B72}.ct-525383{color:#FFA657}.ct-4ed952{color:#8B949E}.ct-dbd2b0{color:#79C0FF}.ct-b63a22{color:#FF7B72}.ct-009c3c{color:#A5D6FF}.ct-905c16{color:#C9D1D9}.ct-d6b457{color:#FF7B72}.ct-17feeb{color:#79C0FF}.ct-1fd63d{color:#79C0FF}.ct-bd1313{color:#FFA657}.ct-5ee133{color:#C9D1D9}.ct-7fa1a6{color:#D2A8FF}.ct-912659{color:#C9D1D9}.ct-aeb03e{color:#FF7B72}.light .ct-aeb03e{color:#859900}.light .ct-912659{color:#657B83}.light .ct-7fa1a6{color:#268BD2}.light .ct-5ee133{color:#657B83}.light .ct-bd1313{color:#657B83}.light .ct-1fd63d{color:#859900}.light .ct-17feeb{color:#859900}.light .ct-d6b457{color:#859900}.light .ct-905c16{color:#268BD2}.light .ct-009c3c{color:#2AA198}.light .ct-b63a22{color:#073642}.light .ct-dbd2b0{color:#268BD2}.light .ct-4ed952{color:#93A1A1}.light .ct-525383{color:#268BD2}.light .ct-062754{color:#073642}.light .ct-c0b017{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/graphql/apollo-client-pagination/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360490}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/graphql/refresh-token-in-apollo-client/_payload.js b/graphql/refresh-token-in-apollo-client/_payload.js
index 5de3424..91ef2ca 100644
--- a/graphql/refresh-token-in-apollo-client/_payload.js
+++ b/graphql/refresh-token-in-apollo-client/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:aN,_path:aO}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-4TVlzFXfLi":{_path:aO,_dir:"graphql",_draft:at,_partial:at,_locale:"en",_empty:at,title:aN,description:au,excerpt:{type:aP,children:[{type:a,tag:ag,props:{},children:[{type:c,value:au}]},{type:a,tag:E,props:{code:av,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:c,value:av}]}]}]},{type:a,tag:ag,props:{},children:[{type:c,value:aQ},{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:aR},{type:a,tag:aj,props:{},children:[{type:c,value:Z}]},{type:c,value:aS}]},{type:a,tag:E,props:{code:aw,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:c,value:aw}]}]}]}]},body:{type:aP,children:[{type:a,tag:ag,props:{},children:[{type:c,value:au}]},{type:a,tag:E,props:{code:av,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:aT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"createApolloClient"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"    { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:aZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  \u003E,"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"ApolloClientBase"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:a_}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    link: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"ApolloLink"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:"setContext"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:"_"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:", { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          headers: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ba}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"HttpLink"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:a_}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        uri: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        fetch: "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:bc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    ]),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bd}]}]}]}]}]},{type:a,tag:ag,props:{},children:[{type:c,value:aQ},{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:aR},{type:a,tag:aj,props:{},children:[{type:c,value:Z}]},{type:c,value:aS}]},{type:a,tag:E,props:{code:aw,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Global singleton for refreshing promise *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:k},children:[{type:c,value:"let"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Checks if GraphQl errors has unauthenticated error *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:be}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u003C{ "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:"ErrorCode"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" }\u003E)"}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:be}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"isArray"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"some"}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"status"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bf}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-b69e3c"},children:[{type:c,value:"401"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F Distinguish unauthorized error here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bd}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Detects if customFetch is sending refresh request *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:bg}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"try"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:bh}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bh}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"operationName"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bf}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"'RefreshToken'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"e"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:"false"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:aT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:bc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  ("}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      { accessToken: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:aZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  ) "}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:bg}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:"Response"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F already refreshing token, wait for it and then use refreshed token"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F or use empty authorization if refreshing failed"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      ("}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"as"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:"Record"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E)?."}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    ) {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bn}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        authorization: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F check for unauthorized errors, if not present, just return result"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aF}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      ) {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          ok: "}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:"unknown"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:br}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:br}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ba}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F If unauthorized, refresh token and try again"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F can't refresh token. logging out"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F success or any non-auth error"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F wait for other request's refreshing query to finish, when retry"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bx}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bx}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bn}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-1b4494{color:#A5D6FF}.ct-50e6c4{color:#79C0FF}.ct-b69e3c{color:#79C0FF}.ct-29d287{color:#FFA657}.ct-a0ec17{color:#79C0FF}.ct-356b7f{color:#C9D1D9}.ct-0f6e5e{color:#8B949E}.ct-f47e40{color:#FFA657}.ct-9d9165{color:#FF7B72}.ct-0e97d6{color:#D2A8FF}.ct-77f781{color:#79C0FF}.ct-4d36d3{color:#79C0FF}.ct-ea52b2{color:#FF7B72}.ct-37732a{color:#FFA657}.ct-fb4541{color:#C9D1D9}.ct-c33345{color:#D2A8FF}.ct-c40f93{color:#FF7B72}.ct-f5cf46{color:#C9D1D9}.ct-908211{color:#FF7B72}.light .ct-908211{color:#859900}.light .ct-f5cf46{color:#657B83}.light .ct-c40f93{color:#073642}.light .ct-c33345{color:#268BD2}.light .ct-fb4541{color:#657B83}.light .ct-37732a{color:#657B83}.light .ct-ea52b2{color:#859900}.light .ct-4d36d3{color:#859900}.light .ct-77f781{color:#859900}.light .ct-0e97d6{color:#268BD2}.light .ct-9d9165{color:#073642}.light .ct-f47e40{color:#268BD2}.light .ct-0f6e5e{color:#93A1A1}.light .ct-356b7f{color:#268BD2}.light .ct-a0ec17{color:#B58900}.light .ct-29d287{color:#268BD2}.light .ct-b69e3c{color:#D33682}.light .ct-50e6c4{color:#268BD2}.light .ct-1b4494{color:#2AA198}"}]}],toc:{title:Y,searchDepth:bB,depth:bB,links:[]}},_type:"markdown",_id:"content:GraphQL:Refresh token in Apollo client.md",_source:"content",_file:"GraphQL\u002FRefresh token in Apollo client.md",_extension:"md"}},prerenderedAt:1667812498426}}("element","span","text","ct-f5cf46","line"," ","ct-fb4541","ct-908211","ct-356b7f","ct-c33345","ct-c40f93","=\u003E","(","ct-ea52b2",":","ct-0f6e5e","      ","ct-37732a","ct-9d9165"," {","string","=",",","            "," (","ct-4d36d3","    ",".","options","return","code","  ","ct-77f781","          ","const","async","        ","...","refreshingPromise","\u003C","headers",";","ct-29d287"," () ","ct-0e97d6","refreshToken","Promise",") ","new","ct-a0ec17","","isRefreshRequestOptions","errors","ct-50e6c4",");","ct-1b4494","!","||","json","              ","p","typescript","pre","code-inline","hasUnauthorizedError","logout",", ","null","catch","uri","if","newAccessToken","resolve",false,"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","export const createApolloClient = (\n  url: string,\n  logout: () =\u003E void,\n  getAuthorizationData: () =\u003E { authorization: string },\n  refreshToken: () =\u003E Promise\u003C\n    { accessToken: string; refreshToken: string } | undefined\n  \u003E,\n) =\u003E\n  new ApolloClientBase({\n    \u002F\u002F ...other options\n    link: ApolloLink.from([\n      \u002F\u002F ...other options\n      setContext(async (_, { headers }) =\u003E {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","\u002F** Global singleton for refreshing promise *\u002F\nlet refreshingPromise: Promise\u003Cstring\u003E | null = null;\n\n\u002F** Checks if GraphQl errors has unauthenticated error *\u002F\nconst hasUnauthorizedError = (errors: Array\u003C{ code?: ErrorCode }\u003E): boolean =\u003E\n  Array.isArray(errors) &&\n  errors.some(error =\u003E {\n    return error.status === 401; \u002F\u002F Distinguish unauthorized error here\n  });\n\n\u002F** Detects if customFetch is sending refresh request *\u002F\nconst isRefreshRequestOptions = (options: RequestInit) =\u003E {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n\u002F** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo *\u002F\nexport const fetchWithTokenRefresh =\n  (\n    logout: () =\u003E void,\n    refreshToken: () =\u003E Promise\u003C\n      { accessToken: string; refreshToken: string } | undefined\n    \u003E,\n  ) =\u003E\n  async (uri: string, options: RequestInit): Promise\u003CResponse\u003E =\u003E {\n    \u002F\u002F already refreshing token, wait for it and then use refreshed token\n    \u002F\u002F or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record\u003Cstring, string\u003E)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() =\u003E {\n          \u002F\u002F refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response =\u003E {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      \u002F\u002F check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =\u003E\n            new Promise\u003Cunknown\u003E(resolve =\u003E {\n              resolve(json);\n            }),\n          text: async () =\u003E\n            new Promise\u003Cstring\u003E(resolve =\u003E {\n              resolve(text);\n            }),\n        };\n      }\n\n      \u002F\u002F If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise\u003Cstring\u003E =\u003E {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() =\u003E {\n            refreshingPromise = null;\n\n            \u002F\u002F can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      \u002F\u002F success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) =\u003E {\n          \u002F\u002F wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () =\u003E {\n          \u002F\u002F refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","ct-f47e40","accessToken","; ","|","\u003E ","&&",") {",": ",")","        ."," {}),","fetch","then","?.","tokens","          });","Refresh Token In Apollo Client","\u002Fgraphql\u002Frefresh-token-in-apollo-client","root","Custom fetch function for this request. You should tune "," and\n"," to match your api.","export","url","void","getAuthorizationData","authorization"," } ","undefined","({","\u002F\u002F ...other options","        };","      }),","fetchWithTokenRefresh","  });","Array","===","RequestInit","body",": () ","await","(() ","\u002F\u002F refreshing token from other request failed, retry without authorization","''","        });","response","();","\u003E(","            }),","      }","          .","throw","Error","'Session expired'",", {","            headers: {","              authorization: ","            },",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:aN,_path:aO}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-4TVlzFXfLi":{_path:aO,_dir:"graphql",_draft:at,_partial:at,_locale:"en",_empty:at,title:aN,description:au,excerpt:{type:aP,children:[{type:a,tag:ag,props:{},children:[{type:c,value:au}]},{type:a,tag:E,props:{code:av,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:c,value:av}]}]}]},{type:a,tag:ag,props:{},children:[{type:c,value:aQ},{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:aR},{type:a,tag:aj,props:{},children:[{type:c,value:Z}]},{type:c,value:aS}]},{type:a,tag:E,props:{code:aw,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:c,value:aw}]}]}]}]},body:{type:aP,children:[{type:a,tag:ag,props:{},children:[{type:c,value:au}]},{type:a,tag:E,props:{code:av,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:aT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"createApolloClient"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"    { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:aZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  \u003E,"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"ApolloClientBase"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:a_}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    link: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"ApolloLink"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:"setContext"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:"_"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:", { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          headers: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ba}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"HttpLink"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:a_}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        uri: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        fetch: "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:bc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    ]),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bd}]}]}]}]}]},{type:a,tag:ag,props:{},children:[{type:c,value:aQ},{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:aR},{type:a,tag:aj,props:{},children:[{type:c,value:Z}]},{type:c,value:aS}]},{type:a,tag:E,props:{code:aw,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Global singleton for refreshing promise *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:k},children:[{type:c,value:"let"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Checks if GraphQl errors has unauthenticated error *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:be}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u003C{ "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:"ErrorCode"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" }\u003E)"}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:be}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"isArray"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"some"}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"status"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bf}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-794d9c"},children:[{type:c,value:"401"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F Distinguish unauthorized error here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bd}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Detects if customFetch is sending refresh request *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:bg}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"try"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:bh}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bh}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"operationName"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bf}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"'RefreshToken'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"e"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:"false"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:aT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:bc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  ("}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      { accessToken: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:aZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  ) "}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:bg}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:"Response"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F already refreshing token, wait for it and then use refreshed token"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F or use empty authorization if refreshing failed"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      ("}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"as"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:"Record"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E)?."}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    ) {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bn}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        authorization: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F check for unauthorized errors, if not present, just return result"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aF}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"      ) {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          ok: "}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:"unknown"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:br}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:br}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ba}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F If unauthorized, refresh token and try again"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"            }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"          })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F can't refresh token. logging out"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F success or any non-auth error"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F wait for other request's refreshing query to finish, when retry"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bx}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"        })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bx}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bn}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"    });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-1732fc{color:#A5D6FF}.ct-7cfe6b{color:#79C0FF}.ct-794d9c{color:#79C0FF}.ct-ce142c{color:#FFA657}.ct-8e385c{color:#79C0FF}.ct-083158{color:#C9D1D9}.ct-d5484c{color:#8B949E}.ct-ca0cf6{color:#FFA657}.ct-00cc54{color:#FF7B72}.ct-b00082{color:#D2A8FF}.ct-aa3ed2{color:#79C0FF}.ct-569fe7{color:#79C0FF}.ct-c5dc1a{color:#FF7B72}.ct-2bba21{color:#FFA657}.ct-8833d9{color:#C9D1D9}.ct-328f45{color:#D2A8FF}.ct-0a39b4{color:#FF7B72}.ct-fb7a00{color:#C9D1D9}.ct-e0ce90{color:#FF7B72}.light .ct-e0ce90{color:#859900}.light .ct-fb7a00{color:#657B83}.light .ct-0a39b4{color:#073642}.light .ct-328f45{color:#268BD2}.light .ct-8833d9{color:#657B83}.light .ct-2bba21{color:#657B83}.light .ct-c5dc1a{color:#859900}.light .ct-569fe7{color:#859900}.light .ct-aa3ed2{color:#859900}.light .ct-b00082{color:#268BD2}.light .ct-00cc54{color:#073642}.light .ct-ca0cf6{color:#268BD2}.light .ct-d5484c{color:#93A1A1}.light .ct-083158{color:#268BD2}.light .ct-8e385c{color:#B58900}.light .ct-ce142c{color:#268BD2}.light .ct-794d9c{color:#D33682}.light .ct-7cfe6b{color:#268BD2}.light .ct-1732fc{color:#2AA198}"}]}],toc:{title:Y,searchDepth:bB,depth:bB,links:[]}},_type:"markdown",_id:"content:GraphQL:Refresh token in Apollo client.md",_source:"content",_file:"GraphQL\u002FRefresh token in Apollo client.md",_extension:"md"}},prerenderedAt:1667813360549}}("element","span","text","ct-fb7a00","line"," ","ct-8833d9","ct-e0ce90","ct-083158","ct-328f45","ct-0a39b4","=\u003E","(","ct-c5dc1a",":","ct-d5484c","      ","ct-2bba21","ct-00cc54"," {","string","=",",","            "," (","ct-569fe7","    ",".","options","return","code","  ","ct-aa3ed2","          ","const","async","        ","...","refreshingPromise","\u003C","headers",";","ct-ce142c"," () ","ct-b00082","refreshToken","Promise",") ","new","ct-8e385c","","isRefreshRequestOptions","errors","ct-7cfe6b",");","ct-1732fc","!","||","json","              ","p","typescript","pre","code-inline","hasUnauthorizedError","logout",", ","null","catch","uri","if","newAccessToken","resolve",false,"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","export const createApolloClient = (\n  url: string,\n  logout: () =\u003E void,\n  getAuthorizationData: () =\u003E { authorization: string },\n  refreshToken: () =\u003E Promise\u003C\n    { accessToken: string; refreshToken: string } | undefined\n  \u003E,\n) =\u003E\n  new ApolloClientBase({\n    \u002F\u002F ...other options\n    link: ApolloLink.from([\n      \u002F\u002F ...other options\n      setContext(async (_, { headers }) =\u003E {\n        return {\n          headers: {\n            ...headers,\n            ...getAuthorizationData(),\n          },\n        };\n      }),\n      new HttpLink({\n        uri: url,\n        fetch: fetchWithTokenRefresh(logout, refreshToken),\n      }),\n    ]),\n  });\n","\u002F** Global singleton for refreshing promise *\u002F\nlet refreshingPromise: Promise\u003Cstring\u003E | null = null;\n\n\u002F** Checks if GraphQl errors has unauthenticated error *\u002F\nconst hasUnauthorizedError = (errors: Array\u003C{ code?: ErrorCode }\u003E): boolean =\u003E\n  Array.isArray(errors) &&\n  errors.some(error =\u003E {\n    return error.status === 401; \u002F\u002F Distinguish unauthorized error here\n  });\n\n\u002F** Detects if customFetch is sending refresh request *\u002F\nconst isRefreshRequestOptions = (options: RequestInit) =\u003E {\n  try {\n    const body = JSON.parse(options?.body as string);\n    return body.operationName === 'RefreshToken';\n  } catch (e) {\n    return false;\n  }\n};\n\n\u002F** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo *\u002F\nexport const fetchWithTokenRefresh =\n  (\n    logout: () =\u003E void,\n    refreshToken: () =\u003E Promise\u003C\n      { accessToken: string; refreshToken: string } | undefined\n    \u003E,\n  ) =\u003E\n  async (uri: string, options: RequestInit): Promise\u003CResponse\u003E =\u003E {\n    \u002F\u002F already refreshing token, wait for it and then use refreshed token\n    \u002F\u002F or use empty authorization if refreshing failed\n    if (\n      !isRefreshRequestOptions(options) &&\n      refreshingPromise &&\n      (options.headers as Record\u003Cstring, string\u003E)?.authorization\n    ) {\n      const newAccessToken = await refreshingPromise\n        .catch(() =\u003E {\n          \u002F\u002F refreshing token from other request failed, retry without authorization\n          return '';\n        });\n      \n      options.headers = {\n        ...(options.headers || {}),\n        authorization: newAccessToken,\n      };\n    }\n\n    return fetch(uri, options).then(async response =\u003E {\n      const text = await response.text();\n      const json = JSON.parse(text);\n\n      \u002F\u002F check for unauthorized errors, if not present, just return result\n      if (\n        isRefreshRequestOptions(options) ||\n        !json?.errors ||\n        !Array.isArray(json.errors) ||\n        !hasUnauthorizedError(json.errors)\n      ) {\n        return {\n          ...response,\n          ok: true,\n          json: async () =\u003E\n            new Promise\u003Cunknown\u003E(resolve =\u003E {\n              resolve(json);\n            }),\n          text: async () =\u003E\n            new Promise\u003Cstring\u003E(resolve =\u003E {\n              resolve(text);\n            }),\n        };\n      }\n\n      \u002F\u002F If unauthorized, refresh token and try again\n      if (!refreshingPromise) {\n        refreshingPromise = refreshToken()\n          .then(async (tokens): Promise\u003Cstring\u003E =\u003E {\n            refreshingPromise = null;\n\n            if (!tokens?.accessToken) {\n              throw new Error('Session expired');\n            }\n\n            return tokens?.accessToken;\n          })\n          .catch(() =\u003E {\n            refreshingPromise = null;\n\n            \u002F\u002F can't refresh token. logging out\n            logout();\n            throw new Error('Session expired');\n          });\n      }\n\n      \u002F\u002F success or any non-auth error\n      return refreshingPromise\n        .then(async (newAccessToken: string) =\u003E {\n          \u002F\u002F wait for other request's refreshing query to finish, when retry\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: newAccessToken,\n            },\n          });\n        })\n        .catch(async () =\u003E {\n          \u002F\u002F refreshing token from other request failed, retry without authorization\n\n          return fetch(uri, {\n            ...options,\n            headers: {\n              ...(options.headers || {}),\n              authorization: '',\n            },\n          });\n        });\n    });\n  };\n\n","ct-ca0cf6","accessToken","; ","|","\u003E ","&&",") {",": ",")","        ."," {}),","fetch","then","?.","tokens","          });","Refresh Token In Apollo Client","\u002Fgraphql\u002Frefresh-token-in-apollo-client","root","Custom fetch function for this request. You should tune "," and\n"," to match your api.","export","url","void","getAuthorizationData","authorization"," } ","undefined","({","\u002F\u002F ...other options","        };","      }),","fetchWithTokenRefresh","  });","Array","===","RequestInit","body",": () ","await","(() ","\u002F\u002F refreshing token from other request failed, retry without authorization","''","        });","response","();","\u003E(","            }),","      }","          .","throw","Error","'Session expired'",", {","            headers: {","              authorization: ","            },",2))
\ No newline at end of file
diff --git a/graphql/refresh-token-in-apollo-client/index.html b/graphql/refresh-token-in-apollo-client/index.html
index 8cbfe4e..5352e07 100644
--- a/graphql/refresh-token-in-apollo-client/index.html
+++ b/graphql/refresh-token-in-apollo-client/index.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Refresh Token In Apollo Client • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."><meta name="head:count" content="3"><link rel="modulepreload" href="/graphql/refresh-token-in-apollo-client/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Refresh Token In Apollo Client • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."><meta name="head:count" content="3"><link rel="modulepreload" href="/graphql/refresh-token-in-apollo-client/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a aria-current="page" href="/graphql/refresh-token-in-apollo-client" class="router-link-active _active_192pu_81 _link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Refresh Token In Apollo Client</h1><article><div><p><!--[-->If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-908211">export</span><span class="ct-f5cf46"> </span><span class="ct-c40f93">const</span><span class="ct-f5cf46"> </span><span class="ct-c33345">createApolloClient</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> (</span></span><span class="line"><span class="ct-fb4541">  </span><span class="ct-37732a">url</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">string</span><span class="ct-fb4541">,</span></span><span class="line"><span class="ct-f5cf46">  </span><span class="ct-c33345">logout</span><span class="ct-908211">:</span><span class="ct-f5cf46"> () </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> </span><span class="ct-77f781">void</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-fb4541">  </span><span class="ct-0e97d6">getAuthorizationData</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> () </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> { </span><span class="ct-37732a">authorization</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">string</span><span class="ct-fb4541"> },</span></span><span class="line"><span class="ct-f5cf46">  </span><span class="ct-c33345">refreshToken</span><span class="ct-908211">:</span><span class="ct-f5cf46"> () </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> </span><span class="ct-f47e40">Promise</span><span class="ct-f5cf46">&lt;</span></span><span class="line"><span class="ct-fb4541">    { </span><span class="ct-37732a">accessToken</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">string</span><span class="ct-fb4541">; </span><span class="ct-37732a">refreshToken</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">string</span><span class="ct-fb4541"> } </span><span class="ct-ea52b2">|</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">undefined</span></span><span class="line"><span class="ct-f5cf46">  &gt;,</span></span><span class="line"><span class="ct-f5cf46">) </span><span class="ct-c40f93">=&gt;</span></span><span class="line"><span class="ct-f5cf46">  </span><span class="ct-908211">new</span><span class="ct-f5cf46"> </span><span class="ct-c33345">ApolloClientBase</span><span class="ct-f5cf46">({</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-0f6e5e">// ...other options</span></span><span class="line"><span class="ct-f5cf46">    link: </span><span class="ct-356b7f">ApolloLink</span><span class="ct-f5cf46">.</span><span class="ct-c33345">from</span><span class="ct-f5cf46">([</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-0f6e5e">// ...other options</span></span><span class="line"><span class="ct-fb4541">      </span><span class="ct-0e97d6">setContext</span><span class="ct-fb4541">(</span><span class="ct-9d9165">async</span><span class="ct-fb4541"> (</span><span class="ct-37732a">_</span><span class="ct-fb4541">, { </span><span class="ct-37732a">headers</span><span class="ct-fb4541"> }) </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-908211">return</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">          headers: {</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">...</span><span class="ct-356b7f">headers</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">...</span><span class="ct-c33345">getAuthorizationData</span><span class="ct-f5cf46">(),</span></span><span class="line"><span class="ct-f5cf46">          },</span></span><span class="line"><span class="ct-f5cf46">        };</span></span><span class="line"><span class="ct-f5cf46">      }),</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-908211">new</span><span class="ct-f5cf46"> </span><span class="ct-c33345">HttpLink</span><span class="ct-f5cf46">({</span></span><span class="line"><span class="ct-f5cf46">        uri: </span><span class="ct-356b7f">url</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">        fetch: </span><span class="ct-c33345">fetchWithTokenRefresh</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">logout</span><span class="ct-f5cf46">, </span><span class="ct-356b7f">refreshToken</span><span class="ct-f5cf46">),</span></span><span class="line"><span class="ct-f5cf46">      }),</span></span><span class="line"><span class="ct-f5cf46">    ]),</span></span><span class="line"><span class="ct-f5cf46">  });</span></span></code></pre><!--]--></div><p><!--[-->Custom fetch function for this request. You should tune <code><!--[-->hasUnauthorizedError<!--]--></code> and
-<code><!--[-->isRefreshRequestOptions<!--]--></code> to match your api.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-0f6e5e">/** Global singleton for refreshing promise */</span></span><span class="line"><span class="ct-c40f93">let</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">refreshingPromise</span><span class="ct-908211">:</span><span class="ct-f5cf46"> </span><span class="ct-f47e40">Promise</span><span class="ct-f5cf46">&lt;</span><span class="ct-77f781">string</span><span class="ct-f5cf46">&gt; </span><span class="ct-908211">|</span><span class="ct-f5cf46"> </span><span class="ct-77f781">null</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-a0ec17">null</span><span class="ct-f5cf46">;</span></span><span class="line"></span><span class="line"><span class="ct-0f6e5e">/** Checks if GraphQl errors has unauthenticated error */</span></span><span class="line"><span class="ct-9d9165">const</span><span class="ct-fb4541"> </span><span class="ct-0e97d6">hasUnauthorizedError</span><span class="ct-fb4541"> </span><span class="ct-ea52b2">=</span><span class="ct-fb4541"> (</span><span class="ct-37732a">errors</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-29d287">Array</span><span class="ct-fb4541">&lt;{ </span><span class="ct-37732a">code</span><span class="ct-ea52b2">?:</span><span class="ct-fb4541"> </span><span class="ct-29d287">ErrorCode</span><span class="ct-fb4541"> }&gt;)</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-9d9165">=&gt;</span></span><span class="line"><span class="ct-f5cf46">  </span><span class="ct-77f781">Array</span><span class="ct-f5cf46">.</span><span class="ct-c33345">isArray</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">errors</span><span class="ct-f5cf46">) </span><span class="ct-908211">&amp;&amp;</span></span><span class="line"><span class="ct-f5cf46">  </span><span class="ct-356b7f">errors</span><span class="ct-f5cf46">.</span><span class="ct-c33345">some</span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">error</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">status</span><span class="ct-f5cf46"> </span><span class="ct-908211">===</span><span class="ct-f5cf46"> </span><span class="ct-b69e3c">401</span><span class="ct-f5cf46">; </span><span class="ct-0f6e5e">// Distinguish unauthorized error here</span></span><span class="line"><span class="ct-f5cf46">  });</span></span><span class="line"></span><span class="line"><span class="ct-0f6e5e">/** Detects if customFetch is sending refresh request */</span></span><span class="line"><span class="ct-9d9165">const</span><span class="ct-fb4541"> </span><span class="ct-0e97d6">isRefreshRequestOptions</span><span class="ct-fb4541"> </span><span class="ct-ea52b2">=</span><span class="ct-fb4541"> (</span><span class="ct-37732a">options</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-29d287">RequestInit</span><span class="ct-fb4541">) </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">  </span><span class="ct-908211">try</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-c40f93">const</span><span class="ct-f5cf46"> </span><span class="ct-50e6c4">body</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-77f781">string</span><span class="ct-f5cf46">);</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">body</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">operationName</span><span class="ct-f5cf46"> </span><span class="ct-908211">===</span><span class="ct-f5cf46"> </span><span class="ct-1b4494">&#39;RefreshToken&#39;</span><span class="ct-f5cf46">;</span></span><span class="line"><span class="ct-f5cf46">  } </span><span class="ct-908211">catch</span><span class="ct-f5cf46"> (</span><span class="ct-356b7f">e</span><span class="ct-f5cf46">) {</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-a0ec17">false</span><span class="ct-f5cf46">;</span></span><span class="line"><span class="ct-f5cf46">  }</span></span><span class="line"><span class="ct-f5cf46">};</span></span><span class="line"></span><span class="line"><span class="ct-0f6e5e">/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */</span></span><span class="line"><span class="ct-908211">export</span><span class="ct-f5cf46"> </span><span class="ct-c40f93">const</span><span class="ct-f5cf46"> </span><span class="ct-50e6c4">fetchWithTokenRefresh</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span></span><span class="line"><span class="ct-f5cf46">  (</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-356b7f">logout</span><span class="ct-f5cf46">: () </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> </span><span class="ct-908211">void</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-356b7f">refreshToken</span><span class="ct-f5cf46">: () </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> </span></span><span class="line"><span class="ct-f5cf46">      { accessToken: </span><span class="ct-356b7f">string</span><span class="ct-f5cf46">; </span><span class="ct-356b7f">refreshToken</span><span class="ct-f5cf46">: </span><span class="ct-356b7f">string</span><span class="ct-f5cf46"> } </span><span class="ct-908211">|</span><span class="ct-f5cf46"> </span><span class="ct-a0ec17">undefined</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-908211">&gt;</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">  ) </span><span class="ct-c40f93">=&gt;</span></span><span class="line"><span class="ct-fb4541">  </span><span class="ct-9d9165">async</span><span class="ct-fb4541"> (</span><span class="ct-37732a">uri</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">string</span><span class="ct-fb4541">, </span><span class="ct-37732a">options</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-29d287">RequestInit</span><span class="ct-fb4541">)</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-29d287">Promise</span><span class="ct-fb4541">&lt;</span><span class="ct-29d287">Response</span><span class="ct-fb4541">&gt; </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-0f6e5e">// already refreshing token, wait for it and then use refreshed token</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-0f6e5e">// or use empty authorization if refreshing failed</span></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-908211">if</span><span class="ct-f5cf46"> (</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-908211">!</span><span class="ct-c33345">isRefreshRequestOptions</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">) </span><span class="ct-908211">&amp;&amp;</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-356b7f">refreshingPromise</span><span class="ct-f5cf46"> </span><span class="ct-908211">&amp;&amp;</span></span><span class="line"><span class="ct-f5cf46">      (</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">headers</span><span class="ct-f5cf46"> </span><span class="ct-908211">as</span><span class="ct-f5cf46"> </span><span class="ct-f47e40">Record</span><span class="ct-f5cf46">&lt;</span><span class="ct-77f781">string</span><span class="ct-f5cf46">, </span><span class="ct-77f781">string</span><span class="ct-f5cf46">&gt;)?.</span><span class="ct-356b7f">authorization</span></span><span class="line"><span class="ct-f5cf46">    ) {</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-c40f93">const</span><span class="ct-f5cf46"> </span><span class="ct-50e6c4">newAccessToken</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-908211">await</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">refreshingPromise</span></span><span class="line"><span class="ct-f5cf46">        .</span><span class="ct-c33345">catch</span><span class="ct-f5cf46">(() </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-0f6e5e">// refreshing token from other request failed, retry without authorization</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-1b4494">&#39;&#39;</span><span class="ct-f5cf46">;</span></span><span class="line"><span class="ct-f5cf46">        });</span></span><span class="line"><span class="ct-f5cf46">      </span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-356b7f">options</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">headers</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-908211">...</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">headers</span><span class="ct-f5cf46"> </span><span class="ct-908211">||</span><span class="ct-f5cf46"> {}),</span></span><span class="line"><span class="ct-f5cf46">        authorization: </span><span class="ct-356b7f">newAccessToken</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">      };</span></span><span class="line"><span class="ct-f5cf46">    }</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">    </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-c33345">fetch</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">uri</span><span class="ct-f5cf46">, </span><span class="ct-356b7f">options</span><span class="ct-f5cf46">).</span><span class="ct-c33345">then</span><span class="ct-f5cf46">(</span><span class="ct-c40f93">async</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-c40f93">const</span><span class="ct-f5cf46"> </span><span class="ct-50e6c4">text</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-908211">await</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">response</span><span class="ct-f5cf46">.</span><span class="ct-c33345">text</span><span class="ct-f5cf46">();</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-c40f93">const</span><span class="ct-f5cf46"> </span><span class="ct-50e6c4">json</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-0f6e5e">// check for unauthorized errors, if not present, just return result</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-908211">if</span><span class="ct-f5cf46"> (</span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-c33345">isRefreshRequestOptions</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">) </span><span class="ct-908211">||</span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-908211">!</span><span class="ct-356b7f">json</span><span class="ct-f5cf46">?.</span><span class="ct-356b7f">errors</span><span class="ct-f5cf46"> </span><span class="ct-908211">||</span></span><span class="line"><span class="ct-f5cf46">        </span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-908211">!</span><span class="ct-c33345">hasUnauthorizedError</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">json</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">errors</span><span class="ct-f5cf46">)</span></span><span class="line"><span class="ct-f5cf46">      ) {</span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-908211">return</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-908211">...</span><span class="ct-356b7f">response</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">          ok: </span><span class="ct-a0ec17">true</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-c33345">json</span><span class="ct-f5cf46">: </span><span class="ct-c40f93">async</span><span class="ct-f5cf46"> () </span><span class="ct-c40f93">=&gt;</span></span><span class="line"><span class="ct-fb4541">            </span><span class="ct-ea52b2">new</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">Promise</span><span class="ct-fb4541">&lt;</span><span class="ct-4d36d3">unknown</span><span class="ct-fb4541">&gt;(</span><span class="ct-37732a">resolve</span><span class="ct-fb4541"> </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">              </span><span class="ct-c33345">resolve</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">json</span><span class="ct-f5cf46">);</span></span><span class="line"><span class="ct-f5cf46">            }),</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-c33345">text</span><span class="ct-f5cf46">: </span><span class="ct-c40f93">async</span><span class="ct-f5cf46"> () </span><span class="ct-c40f93">=&gt;</span></span><span class="line"><span class="ct-fb4541">            </span><span class="ct-ea52b2">new</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">Promise</span><span class="ct-fb4541">&lt;</span><span class="ct-4d36d3">string</span><span class="ct-fb4541">&gt;(</span><span class="ct-37732a">resolve</span><span class="ct-fb4541"> </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">              </span><span class="ct-c33345">resolve</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">text</span><span class="ct-f5cf46">);</span></span><span class="line"><span class="ct-f5cf46">            }),</span></span><span class="line"><span class="ct-f5cf46">        };</span></span><span class="line"><span class="ct-f5cf46">      }</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-0f6e5e">// If unauthorized, refresh token and try again</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-908211">if</span><span class="ct-f5cf46"> (</span><span class="ct-908211">!</span><span class="ct-356b7f">refreshingPromise</span><span class="ct-f5cf46">) {</span></span><span class="line"><span class="ct-f5cf46">        </span><span class="ct-356b7f">refreshingPromise</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-c33345">refreshToken</span><span class="ct-f5cf46">()</span></span><span class="line"><span class="ct-fb4541">          .</span><span class="ct-0e97d6">then</span><span class="ct-fb4541">(</span><span class="ct-9d9165">async</span><span class="ct-fb4541"> (</span><span class="ct-37732a">tokens</span><span class="ct-fb4541">)</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-29d287">Promise</span><span class="ct-fb4541">&lt;</span><span class="ct-4d36d3">string</span><span class="ct-fb4541">&gt; </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-356b7f">refreshingPromise</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-a0ec17">null</span><span class="ct-f5cf46">;</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">if</span><span class="ct-f5cf46"> (</span><span class="ct-908211">!</span><span class="ct-356b7f">tokens</span><span class="ct-f5cf46">?.</span><span class="ct-356b7f">accessToken</span><span class="ct-f5cf46">) {</span></span><span class="line"><span class="ct-f5cf46">              </span><span class="ct-908211">throw</span><span class="ct-f5cf46"> </span><span class="ct-908211">new</span><span class="ct-f5cf46"> </span><span class="ct-77f781">Error</span><span class="ct-f5cf46">(</span><span class="ct-1b4494">&#39;Session expired&#39;</span><span class="ct-f5cf46">);</span></span><span class="line"><span class="ct-f5cf46">            }</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">tokens</span><span class="ct-f5cf46">?.</span><span class="ct-356b7f">accessToken</span><span class="ct-f5cf46">;</span></span><span class="line"><span class="ct-f5cf46">          })</span></span><span class="line"><span class="ct-f5cf46">          .</span><span class="ct-c33345">catch</span><span class="ct-f5cf46">(() </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-356b7f">refreshingPromise</span><span class="ct-f5cf46"> </span><span class="ct-908211">=</span><span class="ct-f5cf46"> </span><span class="ct-a0ec17">null</span><span class="ct-f5cf46">;</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-0f6e5e">// can&#39;t refresh token. logging out</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-c33345">logout</span><span class="ct-f5cf46">();</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">throw</span><span class="ct-f5cf46"> </span><span class="ct-908211">new</span><span class="ct-f5cf46"> </span><span class="ct-77f781">Error</span><span class="ct-f5cf46">(</span><span class="ct-1b4494">&#39;Session expired&#39;</span><span class="ct-f5cf46">);</span></span><span class="line"><span class="ct-f5cf46">          });</span></span><span class="line"><span class="ct-f5cf46">      }</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-0f6e5e">// success or any non-auth error</span></span><span class="line"><span class="ct-f5cf46">      </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-356b7f">refreshingPromise</span></span><span class="line"><span class="ct-fb4541">        .</span><span class="ct-0e97d6">then</span><span class="ct-fb4541">(</span><span class="ct-9d9165">async</span><span class="ct-fb4541"> (</span><span class="ct-37732a">newAccessToken</span><span class="ct-ea52b2">:</span><span class="ct-fb4541"> </span><span class="ct-4d36d3">string</span><span class="ct-fb4541">) </span><span class="ct-9d9165">=&gt;</span><span class="ct-fb4541"> {</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-0f6e5e">// wait for other request&#39;s refreshing query to finish, when retry</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-c33345">fetch</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">uri</span><span class="ct-f5cf46">, {</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">...</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">            headers: {</span></span><span class="line"><span class="ct-f5cf46">              </span><span class="ct-908211">...</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">headers</span><span class="ct-f5cf46"> </span><span class="ct-908211">||</span><span class="ct-f5cf46"> {}),</span></span><span class="line"><span class="ct-f5cf46">              authorization: </span><span class="ct-356b7f">newAccessToken</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">            },</span></span><span class="line"><span class="ct-f5cf46">          });</span></span><span class="line"><span class="ct-f5cf46">        })</span></span><span class="line"><span class="ct-f5cf46">        .</span><span class="ct-c33345">catch</span><span class="ct-f5cf46">(</span><span class="ct-c40f93">async</span><span class="ct-f5cf46"> () </span><span class="ct-c40f93">=&gt;</span><span class="ct-f5cf46"> {</span></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-0f6e5e">// refreshing token from other request failed, retry without authorization</span></span><span class="line"></span><span class="line"><span class="ct-f5cf46">          </span><span class="ct-908211">return</span><span class="ct-f5cf46"> </span><span class="ct-c33345">fetch</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">uri</span><span class="ct-f5cf46">, {</span></span><span class="line"><span class="ct-f5cf46">            </span><span class="ct-908211">...</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">            headers: {</span></span><span class="line"><span class="ct-f5cf46">              </span><span class="ct-908211">...</span><span class="ct-f5cf46">(</span><span class="ct-356b7f">options</span><span class="ct-f5cf46">.</span><span class="ct-356b7f">headers</span><span class="ct-f5cf46"> </span><span class="ct-908211">||</span><span class="ct-f5cf46"> {}),</span></span><span class="line"><span class="ct-f5cf46">              authorization: </span><span class="ct-1b4494">&#39;&#39;</span><span class="ct-f5cf46">,</span></span><span class="line"><span class="ct-f5cf46">            },</span></span><span class="line"><span class="ct-f5cf46">          });</span></span><span class="line"><span class="ct-f5cf46">        });</span></span><span class="line"><span class="ct-f5cf46">    });</span></span><span class="line"><span class="ct-f5cf46">  };</span></span></code></pre><!--]--></div><style>.ct-1b4494{color:#A5D6FF}.ct-50e6c4{color:#79C0FF}.ct-b69e3c{color:#79C0FF}.ct-29d287{color:#FFA657}.ct-a0ec17{color:#79C0FF}.ct-356b7f{color:#C9D1D9}.ct-0f6e5e{color:#8B949E}.ct-f47e40{color:#FFA657}.ct-9d9165{color:#FF7B72}.ct-0e97d6{color:#D2A8FF}.ct-77f781{color:#79C0FF}.ct-4d36d3{color:#79C0FF}.ct-ea52b2{color:#FF7B72}.ct-37732a{color:#FFA657}.ct-fb4541{color:#C9D1D9}.ct-c33345{color:#D2A8FF}.ct-c40f93{color:#FF7B72}.ct-f5cf46{color:#C9D1D9}.ct-908211{color:#FF7B72}.light .ct-908211{color:#859900}.light .ct-f5cf46{color:#657B83}.light .ct-c40f93{color:#073642}.light .ct-c33345{color:#268BD2}.light .ct-fb4541{color:#657B83}.light .ct-37732a{color:#657B83}.light .ct-ea52b2{color:#859900}.light .ct-4d36d3{color:#859900}.light .ct-77f781{color:#859900}.light .ct-0e97d6{color:#268BD2}.light .ct-9d9165{color:#073642}.light .ct-f47e40{color:#268BD2}.light .ct-0f6e5e{color:#93A1A1}.light .ct-356b7f{color:#268BD2}.light .ct-a0ec17{color:#B58900}.light .ct-29d287{color:#268BD2}.light .ct-b69e3c{color:#D33682}.light .ct-50e6c4{color:#268BD2}.light .ct-1b4494{color:#2AA198}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/graphql/refresh-token-in-apollo-client/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498426}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a aria-current="page" href="/graphql/refresh-token-in-apollo-client" class="router-link-active _active_192pu_81 _link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Refresh Token In Apollo Client</h1><article><div><p><!--[-->If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-e0ce90">export</span><span class="ct-fb7a00"> </span><span class="ct-0a39b4">const</span><span class="ct-fb7a00"> </span><span class="ct-328f45">createApolloClient</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> (</span></span><span class="line"><span class="ct-8833d9">  </span><span class="ct-2bba21">url</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-569fe7">string</span><span class="ct-8833d9">,</span></span><span class="line"><span class="ct-fb7a00">  </span><span class="ct-328f45">logout</span><span class="ct-e0ce90">:</span><span class="ct-fb7a00"> () </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> </span><span class="ct-aa3ed2">void</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-8833d9">  </span><span class="ct-b00082">getAuthorizationData</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> () </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> { </span><span class="ct-2bba21">authorization</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-569fe7">string</span><span class="ct-8833d9"> },</span></span><span class="line"><span class="ct-fb7a00">  </span><span class="ct-328f45">refreshToken</span><span class="ct-e0ce90">:</span><span class="ct-fb7a00"> () </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> </span><span class="ct-ca0cf6">Promise</span><span class="ct-fb7a00">&lt;</span></span><span class="line"><span class="ct-8833d9">    { </span><span class="ct-2bba21">accessToken</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-569fe7">string</span><span class="ct-8833d9">; </span><span class="ct-2bba21">refreshToken</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-569fe7">string</span><span class="ct-8833d9"> } </span><span class="ct-c5dc1a">|</span><span class="ct-8833d9"> </span><span class="ct-569fe7">undefined</span></span><span class="line"><span class="ct-fb7a00">  &gt;,</span></span><span class="line"><span class="ct-fb7a00">) </span><span class="ct-0a39b4">=&gt;</span></span><span class="line"><span class="ct-fb7a00">  </span><span class="ct-e0ce90">new</span><span class="ct-fb7a00"> </span><span class="ct-328f45">ApolloClientBase</span><span class="ct-fb7a00">({</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-d5484c">// ...other options</span></span><span class="line"><span class="ct-fb7a00">    link: </span><span class="ct-083158">ApolloLink</span><span class="ct-fb7a00">.</span><span class="ct-328f45">from</span><span class="ct-fb7a00">([</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-d5484c">// ...other options</span></span><span class="line"><span class="ct-8833d9">      </span><span class="ct-b00082">setContext</span><span class="ct-8833d9">(</span><span class="ct-00cc54">async</span><span class="ct-8833d9"> (</span><span class="ct-2bba21">_</span><span class="ct-8833d9">, { </span><span class="ct-2bba21">headers</span><span class="ct-8833d9"> }) </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">          headers: {</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">...</span><span class="ct-083158">headers</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">...</span><span class="ct-328f45">getAuthorizationData</span><span class="ct-fb7a00">(),</span></span><span class="line"><span class="ct-fb7a00">          },</span></span><span class="line"><span class="ct-fb7a00">        };</span></span><span class="line"><span class="ct-fb7a00">      }),</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-e0ce90">new</span><span class="ct-fb7a00"> </span><span class="ct-328f45">HttpLink</span><span class="ct-fb7a00">({</span></span><span class="line"><span class="ct-fb7a00">        uri: </span><span class="ct-083158">url</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">        fetch: </span><span class="ct-328f45">fetchWithTokenRefresh</span><span class="ct-fb7a00">(</span><span class="ct-083158">logout</span><span class="ct-fb7a00">, </span><span class="ct-083158">refreshToken</span><span class="ct-fb7a00">),</span></span><span class="line"><span class="ct-fb7a00">      }),</span></span><span class="line"><span class="ct-fb7a00">    ]),</span></span><span class="line"><span class="ct-fb7a00">  });</span></span></code></pre><!--]--></div><p><!--[-->Custom fetch function for this request. You should tune <code><!--[-->hasUnauthorizedError<!--]--></code> and
+<code><!--[-->isRefreshRequestOptions<!--]--></code> to match your api.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-d5484c">/** Global singleton for refreshing promise */</span></span><span class="line"><span class="ct-0a39b4">let</span><span class="ct-fb7a00"> </span><span class="ct-083158">refreshingPromise</span><span class="ct-e0ce90">:</span><span class="ct-fb7a00"> </span><span class="ct-ca0cf6">Promise</span><span class="ct-fb7a00">&lt;</span><span class="ct-aa3ed2">string</span><span class="ct-fb7a00">&gt; </span><span class="ct-e0ce90">|</span><span class="ct-fb7a00"> </span><span class="ct-aa3ed2">null</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-8e385c">null</span><span class="ct-fb7a00">;</span></span><span class="line"></span><span class="line"><span class="ct-d5484c">/** Checks if GraphQl errors has unauthenticated error */</span></span><span class="line"><span class="ct-00cc54">const</span><span class="ct-8833d9"> </span><span class="ct-b00082">hasUnauthorizedError</span><span class="ct-8833d9"> </span><span class="ct-c5dc1a">=</span><span class="ct-8833d9"> (</span><span class="ct-2bba21">errors</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-ce142c">Array</span><span class="ct-8833d9">&lt;{ </span><span class="ct-2bba21">code</span><span class="ct-c5dc1a">?:</span><span class="ct-8833d9"> </span><span class="ct-ce142c">ErrorCode</span><span class="ct-8833d9"> }&gt;)</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-00cc54">=&gt;</span></span><span class="line"><span class="ct-fb7a00">  </span><span class="ct-aa3ed2">Array</span><span class="ct-fb7a00">.</span><span class="ct-328f45">isArray</span><span class="ct-fb7a00">(</span><span class="ct-083158">errors</span><span class="ct-fb7a00">) </span><span class="ct-e0ce90">&amp;&amp;</span></span><span class="line"><span class="ct-fb7a00">  </span><span class="ct-083158">errors</span><span class="ct-fb7a00">.</span><span class="ct-328f45">some</span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-083158">error</span><span class="ct-fb7a00">.</span><span class="ct-083158">status</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">===</span><span class="ct-fb7a00"> </span><span class="ct-794d9c">401</span><span class="ct-fb7a00">; </span><span class="ct-d5484c">// Distinguish unauthorized error here</span></span><span class="line"><span class="ct-fb7a00">  });</span></span><span class="line"></span><span class="line"><span class="ct-d5484c">/** Detects if customFetch is sending refresh request */</span></span><span class="line"><span class="ct-00cc54">const</span><span class="ct-8833d9"> </span><span class="ct-b00082">isRefreshRequestOptions</span><span class="ct-8833d9"> </span><span class="ct-c5dc1a">=</span><span class="ct-8833d9"> (</span><span class="ct-2bba21">options</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-ce142c">RequestInit</span><span class="ct-8833d9">) </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">  </span><span class="ct-e0ce90">try</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-0a39b4">const</span><span class="ct-fb7a00"> </span><span class="ct-7cfe6b">body</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-aa3ed2">string</span><span class="ct-fb7a00">);</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-083158">body</span><span class="ct-fb7a00">.</span><span class="ct-083158">operationName</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">===</span><span class="ct-fb7a00"> </span><span class="ct-1732fc">&#39;RefreshToken&#39;</span><span class="ct-fb7a00">;</span></span><span class="line"><span class="ct-fb7a00">  } </span><span class="ct-e0ce90">catch</span><span class="ct-fb7a00"> (</span><span class="ct-083158">e</span><span class="ct-fb7a00">) {</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-8e385c">false</span><span class="ct-fb7a00">;</span></span><span class="line"><span class="ct-fb7a00">  }</span></span><span class="line"><span class="ct-fb7a00">};</span></span><span class="line"></span><span class="line"><span class="ct-d5484c">/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */</span></span><span class="line"><span class="ct-e0ce90">export</span><span class="ct-fb7a00"> </span><span class="ct-0a39b4">const</span><span class="ct-fb7a00"> </span><span class="ct-7cfe6b">fetchWithTokenRefresh</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span></span><span class="line"><span class="ct-fb7a00">  (</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-083158">logout</span><span class="ct-fb7a00">: () </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">void</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-083158">refreshToken</span><span class="ct-fb7a00">: () </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> </span></span><span class="line"><span class="ct-fb7a00">      { accessToken: </span><span class="ct-083158">string</span><span class="ct-fb7a00">; </span><span class="ct-083158">refreshToken</span><span class="ct-fb7a00">: </span><span class="ct-083158">string</span><span class="ct-fb7a00"> } </span><span class="ct-e0ce90">|</span><span class="ct-fb7a00"> </span><span class="ct-8e385c">undefined</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-e0ce90">&gt;</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">  ) </span><span class="ct-0a39b4">=&gt;</span></span><span class="line"><span class="ct-8833d9">  </span><span class="ct-00cc54">async</span><span class="ct-8833d9"> (</span><span class="ct-2bba21">uri</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-569fe7">string</span><span class="ct-8833d9">, </span><span class="ct-2bba21">options</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-ce142c">RequestInit</span><span class="ct-8833d9">)</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-ce142c">Promise</span><span class="ct-8833d9">&lt;</span><span class="ct-ce142c">Response</span><span class="ct-8833d9">&gt; </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-d5484c">// already refreshing token, wait for it and then use refreshed token</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-d5484c">// or use empty authorization if refreshing failed</span></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-e0ce90">if</span><span class="ct-fb7a00"> (</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-e0ce90">!</span><span class="ct-328f45">isRefreshRequestOptions</span><span class="ct-fb7a00">(</span><span class="ct-083158">options</span><span class="ct-fb7a00">) </span><span class="ct-e0ce90">&amp;&amp;</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-083158">refreshingPromise</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">&amp;&amp;</span></span><span class="line"><span class="ct-fb7a00">      (</span><span class="ct-083158">options</span><span class="ct-fb7a00">.</span><span class="ct-083158">headers</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">as</span><span class="ct-fb7a00"> </span><span class="ct-ca0cf6">Record</span><span class="ct-fb7a00">&lt;</span><span class="ct-aa3ed2">string</span><span class="ct-fb7a00">, </span><span class="ct-aa3ed2">string</span><span class="ct-fb7a00">&gt;)?.</span><span class="ct-083158">authorization</span></span><span class="line"><span class="ct-fb7a00">    ) {</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-0a39b4">const</span><span class="ct-fb7a00"> </span><span class="ct-7cfe6b">newAccessToken</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">await</span><span class="ct-fb7a00"> </span><span class="ct-083158">refreshingPromise</span></span><span class="line"><span class="ct-fb7a00">        .</span><span class="ct-328f45">catch</span><span class="ct-fb7a00">(() </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-d5484c">// refreshing token from other request failed, retry without authorization</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-1732fc">&#39;&#39;</span><span class="ct-fb7a00">;</span></span><span class="line"><span class="ct-fb7a00">        });</span></span><span class="line"><span class="ct-fb7a00">      </span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-083158">options</span><span class="ct-fb7a00">.</span><span class="ct-083158">headers</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-e0ce90">...</span><span class="ct-fb7a00">(</span><span class="ct-083158">options</span><span class="ct-fb7a00">.</span><span class="ct-083158">headers</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">||</span><span class="ct-fb7a00"> {}),</span></span><span class="line"><span class="ct-fb7a00">        authorization: </span><span class="ct-083158">newAccessToken</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">      };</span></span><span class="line"><span class="ct-fb7a00">    }</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">    </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-328f45">fetch</span><span class="ct-fb7a00">(</span><span class="ct-083158">uri</span><span class="ct-fb7a00">, </span><span class="ct-083158">options</span><span class="ct-fb7a00">).</span><span class="ct-328f45">then</span><span class="ct-fb7a00">(</span><span class="ct-0a39b4">async</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-0a39b4">const</span><span class="ct-fb7a00"> </span><span class="ct-7cfe6b">text</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">await</span><span class="ct-fb7a00"> </span><span class="ct-083158">response</span><span class="ct-fb7a00">.</span><span class="ct-328f45">text</span><span class="ct-fb7a00">();</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-0a39b4">const</span><span class="ct-fb7a00"> </span><span class="ct-7cfe6b">json</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-d5484c">// check for unauthorized errors, if not present, just return result</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-e0ce90">if</span><span class="ct-fb7a00"> (</span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-328f45">isRefreshRequestOptions</span><span class="ct-fb7a00">(</span><span class="ct-083158">options</span><span class="ct-fb7a00">) </span><span class="ct-e0ce90">||</span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-e0ce90">!</span><span class="ct-083158">json</span><span class="ct-fb7a00">?.</span><span class="ct-083158">errors</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">||</span></span><span class="line"><span class="ct-fb7a00">        </span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-e0ce90">!</span><span class="ct-328f45">hasUnauthorizedError</span><span class="ct-fb7a00">(</span><span class="ct-083158">json</span><span class="ct-fb7a00">.</span><span class="ct-083158">errors</span><span class="ct-fb7a00">)</span></span><span class="line"><span class="ct-fb7a00">      ) {</span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-e0ce90">...</span><span class="ct-083158">response</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">          ok: </span><span class="ct-8e385c">true</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-328f45">json</span><span class="ct-fb7a00">: </span><span class="ct-0a39b4">async</span><span class="ct-fb7a00"> () </span><span class="ct-0a39b4">=&gt;</span></span><span class="line"><span class="ct-8833d9">            </span><span class="ct-c5dc1a">new</span><span class="ct-8833d9"> </span><span class="ct-569fe7">Promise</span><span class="ct-8833d9">&lt;</span><span class="ct-569fe7">unknown</span><span class="ct-8833d9">&gt;(</span><span class="ct-2bba21">resolve</span><span class="ct-8833d9"> </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">              </span><span class="ct-328f45">resolve</span><span class="ct-fb7a00">(</span><span class="ct-083158">json</span><span class="ct-fb7a00">);</span></span><span class="line"><span class="ct-fb7a00">            }),</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-328f45">text</span><span class="ct-fb7a00">: </span><span class="ct-0a39b4">async</span><span class="ct-fb7a00"> () </span><span class="ct-0a39b4">=&gt;</span></span><span class="line"><span class="ct-8833d9">            </span><span class="ct-c5dc1a">new</span><span class="ct-8833d9"> </span><span class="ct-569fe7">Promise</span><span class="ct-8833d9">&lt;</span><span class="ct-569fe7">string</span><span class="ct-8833d9">&gt;(</span><span class="ct-2bba21">resolve</span><span class="ct-8833d9"> </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">              </span><span class="ct-328f45">resolve</span><span class="ct-fb7a00">(</span><span class="ct-083158">text</span><span class="ct-fb7a00">);</span></span><span class="line"><span class="ct-fb7a00">            }),</span></span><span class="line"><span class="ct-fb7a00">        };</span></span><span class="line"><span class="ct-fb7a00">      }</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-d5484c">// If unauthorized, refresh token and try again</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-e0ce90">if</span><span class="ct-fb7a00"> (</span><span class="ct-e0ce90">!</span><span class="ct-083158">refreshingPromise</span><span class="ct-fb7a00">) {</span></span><span class="line"><span class="ct-fb7a00">        </span><span class="ct-083158">refreshingPromise</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-328f45">refreshToken</span><span class="ct-fb7a00">()</span></span><span class="line"><span class="ct-8833d9">          .</span><span class="ct-b00082">then</span><span class="ct-8833d9">(</span><span class="ct-00cc54">async</span><span class="ct-8833d9"> (</span><span class="ct-2bba21">tokens</span><span class="ct-8833d9">)</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-ce142c">Promise</span><span class="ct-8833d9">&lt;</span><span class="ct-569fe7">string</span><span class="ct-8833d9">&gt; </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-083158">refreshingPromise</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-8e385c">null</span><span class="ct-fb7a00">;</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">if</span><span class="ct-fb7a00"> (</span><span class="ct-e0ce90">!</span><span class="ct-083158">tokens</span><span class="ct-fb7a00">?.</span><span class="ct-083158">accessToken</span><span class="ct-fb7a00">) {</span></span><span class="line"><span class="ct-fb7a00">              </span><span class="ct-e0ce90">throw</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">new</span><span class="ct-fb7a00"> </span><span class="ct-aa3ed2">Error</span><span class="ct-fb7a00">(</span><span class="ct-1732fc">&#39;Session expired&#39;</span><span class="ct-fb7a00">);</span></span><span class="line"><span class="ct-fb7a00">            }</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-083158">tokens</span><span class="ct-fb7a00">?.</span><span class="ct-083158">accessToken</span><span class="ct-fb7a00">;</span></span><span class="line"><span class="ct-fb7a00">          })</span></span><span class="line"><span class="ct-fb7a00">          .</span><span class="ct-328f45">catch</span><span class="ct-fb7a00">(() </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-083158">refreshingPromise</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">=</span><span class="ct-fb7a00"> </span><span class="ct-8e385c">null</span><span class="ct-fb7a00">;</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-d5484c">// can&#39;t refresh token. logging out</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-328f45">logout</span><span class="ct-fb7a00">();</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">throw</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">new</span><span class="ct-fb7a00"> </span><span class="ct-aa3ed2">Error</span><span class="ct-fb7a00">(</span><span class="ct-1732fc">&#39;Session expired&#39;</span><span class="ct-fb7a00">);</span></span><span class="line"><span class="ct-fb7a00">          });</span></span><span class="line"><span class="ct-fb7a00">      }</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-d5484c">// success or any non-auth error</span></span><span class="line"><span class="ct-fb7a00">      </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-083158">refreshingPromise</span></span><span class="line"><span class="ct-8833d9">        .</span><span class="ct-b00082">then</span><span class="ct-8833d9">(</span><span class="ct-00cc54">async</span><span class="ct-8833d9"> (</span><span class="ct-2bba21">newAccessToken</span><span class="ct-c5dc1a">:</span><span class="ct-8833d9"> </span><span class="ct-569fe7">string</span><span class="ct-8833d9">) </span><span class="ct-00cc54">=&gt;</span><span class="ct-8833d9"> {</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-d5484c">// wait for other request&#39;s refreshing query to finish, when retry</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-328f45">fetch</span><span class="ct-fb7a00">(</span><span class="ct-083158">uri</span><span class="ct-fb7a00">, {</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">...</span><span class="ct-083158">options</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">            headers: {</span></span><span class="line"><span class="ct-fb7a00">              </span><span class="ct-e0ce90">...</span><span class="ct-fb7a00">(</span><span class="ct-083158">options</span><span class="ct-fb7a00">.</span><span class="ct-083158">headers</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">||</span><span class="ct-fb7a00"> {}),</span></span><span class="line"><span class="ct-fb7a00">              authorization: </span><span class="ct-083158">newAccessToken</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">            },</span></span><span class="line"><span class="ct-fb7a00">          });</span></span><span class="line"><span class="ct-fb7a00">        })</span></span><span class="line"><span class="ct-fb7a00">        .</span><span class="ct-328f45">catch</span><span class="ct-fb7a00">(</span><span class="ct-0a39b4">async</span><span class="ct-fb7a00"> () </span><span class="ct-0a39b4">=&gt;</span><span class="ct-fb7a00"> {</span></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-d5484c">// refreshing token from other request failed, retry without authorization</span></span><span class="line"></span><span class="line"><span class="ct-fb7a00">          </span><span class="ct-e0ce90">return</span><span class="ct-fb7a00"> </span><span class="ct-328f45">fetch</span><span class="ct-fb7a00">(</span><span class="ct-083158">uri</span><span class="ct-fb7a00">, {</span></span><span class="line"><span class="ct-fb7a00">            </span><span class="ct-e0ce90">...</span><span class="ct-083158">options</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">            headers: {</span></span><span class="line"><span class="ct-fb7a00">              </span><span class="ct-e0ce90">...</span><span class="ct-fb7a00">(</span><span class="ct-083158">options</span><span class="ct-fb7a00">.</span><span class="ct-083158">headers</span><span class="ct-fb7a00"> </span><span class="ct-e0ce90">||</span><span class="ct-fb7a00"> {}),</span></span><span class="line"><span class="ct-fb7a00">              authorization: </span><span class="ct-1732fc">&#39;&#39;</span><span class="ct-fb7a00">,</span></span><span class="line"><span class="ct-fb7a00">            },</span></span><span class="line"><span class="ct-fb7a00">          });</span></span><span class="line"><span class="ct-fb7a00">        });</span></span><span class="line"><span class="ct-fb7a00">    });</span></span><span class="line"><span class="ct-fb7a00">  };</span></span></code></pre><!--]--></div><style>.ct-1732fc{color:#A5D6FF}.ct-7cfe6b{color:#79C0FF}.ct-794d9c{color:#79C0FF}.ct-ce142c{color:#FFA657}.ct-8e385c{color:#79C0FF}.ct-083158{color:#C9D1D9}.ct-d5484c{color:#8B949E}.ct-ca0cf6{color:#FFA657}.ct-00cc54{color:#FF7B72}.ct-b00082{color:#D2A8FF}.ct-aa3ed2{color:#79C0FF}.ct-569fe7{color:#79C0FF}.ct-c5dc1a{color:#FF7B72}.ct-2bba21{color:#FFA657}.ct-8833d9{color:#C9D1D9}.ct-328f45{color:#D2A8FF}.ct-0a39b4{color:#FF7B72}.ct-fb7a00{color:#C9D1D9}.ct-e0ce90{color:#FF7B72}.light .ct-e0ce90{color:#859900}.light .ct-fb7a00{color:#657B83}.light .ct-0a39b4{color:#073642}.light .ct-328f45{color:#268BD2}.light .ct-8833d9{color:#657B83}.light .ct-2bba21{color:#657B83}.light .ct-c5dc1a{color:#859900}.light .ct-569fe7{color:#859900}.light .ct-aa3ed2{color:#859900}.light .ct-b00082{color:#268BD2}.light .ct-00cc54{color:#073642}.light .ct-ca0cf6{color:#268BD2}.light .ct-d5484c{color:#93A1A1}.light .ct-083158{color:#268BD2}.light .ct-8e385c{color:#B58900}.light .ct-ce142c{color:#268BD2}.light .ct-794d9c{color:#D33682}.light .ct-7cfe6b{color:#268BD2}.light .ct-1732fc{color:#2AA198}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/graphql/refresh-token-in-apollo-client/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360549}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/index.html b/index.html
index 395514a..eeae3ed 100644
--- a/index.html
+++ b/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/index.bfc362d6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeHeader.5039a526.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ArrowRight.4c99b7f0.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiActionButton.8de8506c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeContentList.3f25a970.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/obsidian.8dc2a844.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/desk.fcd75862.svg"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._main_32es8_1{padding-top:40px}@media (max-width:768px){._main_32es8_1{padding-top:0}}._reference_32es8_10{padding-top:20px}._grid_32es8_14{margin:40px 5px 0}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._grid_1i19d_1{border-bottom:2px solid var(--color-line);-moz-column-gap:50px;column-gap:50px;display:grid;grid-template-columns:17fr 10fr}@media (max-width:1024px){._grid_1i19d_1{border-bottom:none;-moz-column-gap:20px;column-gap:20px;grid-template-columns:1fr;grid-template-rows:auto auto}}._image_1i19d_16{align-items:flex-end;display:flex}@media (max-width:1024px){._image_1i19d_16{border-bottom:2px solid var(--color-line);justify-content:center}._image_1i19d_16 ._desk_1i19d_25{max-width:400px}}._title_1i19d_30{font-size:3rem;line-height:3.4rem;margin:.8rem 0}@media (max-width:560px){._title_1i19d_30{font-size:2.5rem;line-height:3rem}}._subtitle_1i19d_42{color:var(--color-text-secondary);max-width:360px}@media (max-width:1024px){._subtitle_1i19d_42{max-width:100%}}._text_1i19d_52{display:flex;flex-direction:column;justify-content:center;max-width:500px;padding-bottom:60px}@media (max-width:768px){._text_1i19d_52{padding-bottom:40px;padding-top:0;text-align:center}}._desk_1i19d_25{width:100%}._buttons_1i19d_71{margin-top:50px}</style><style>._button_aq4bi_1{align-items:center;border-radius:8px;color:#fff;display:inline-flex;justify-content:center;text-decoration:none}._button_aq4bi_1._variant-primary_aq4bi_9{background-color:var(--color-primary)}._button_aq4bi_1._variant-outline_aq4bi_12{box-shadow:var(--color-text) 0 0 0 1px;color:var(--color-text);overflow:hidden;position:relative;transition:all .25s}._button_aq4bi_1._variant-outline_aq4bi_12:after{background:var(--color-primary);border-radius:8px;content:" ";inset:0;opacity:0;position:absolute;transform:scale(0);transition:all .25s;z-index:0}._button_aq4bi_1._variant-outline_aq4bi_12:hover{box-shadow:var(--color-background) 0 0 0 1px}._button_aq4bi_1._variant-outline_aq4bi_12:hover:after{opacity:1;transform:scale(1)}._button_aq4bi_1._size-md_aq4bi_37{height:40px;padding:0 30px}._button_aq4bi_1._size-md_aq4bi_37._prefixed_aq4bi_41,._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding:0 10px 0 20px}._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding-right:0 20px 0 10px}._title_aq4bi_48{flex:1;position:relative;text-align:center;z-index:1}._size-md_aq4bi_37._prefixed_aq4bi_41 ._title_aq4bi_48{padding-left:10px}._size-md_aq4bi_37._suffixed_aq4bi_41 ._title_aq4bi_48{padding-right:10px}._prefix_aq4bi_41,._suffix_aq4bi_41{display:inline-flex;position:relative;z-index:2}</style><style>._row_1ufrv_1{margin-bottom:10px}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/index.3173d051.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeHeader.0c1c0a2b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ArrowRight.5a505e4f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiActionButton.d5ab622f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeContentList.914b1d24.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="prefetch" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/obsidian.8dc2a844.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/desk.91eb5d74.svg"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._main_32es8_1{padding-top:40px}@media (max-width:768px){._main_32es8_1{padding-top:0}}._reference_32es8_10{padding-top:20px}._grid_32es8_14{margin:40px 5px 0}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._grid_1i19d_1{border-bottom:2px solid var(--color-line);-moz-column-gap:50px;column-gap:50px;display:grid;grid-template-columns:17fr 10fr}@media (max-width:1024px){._grid_1i19d_1{border-bottom:none;-moz-column-gap:20px;column-gap:20px;grid-template-columns:1fr;grid-template-rows:auto auto}}._image_1i19d_16{align-items:flex-end;display:flex}@media (max-width:1024px){._image_1i19d_16{border-bottom:2px solid var(--color-line);justify-content:center}._image_1i19d_16 ._desk_1i19d_25{max-width:400px}}._title_1i19d_30{font-size:3rem;line-height:3.4rem;margin:.8rem 0}@media (max-width:560px){._title_1i19d_30{font-size:2.5rem;line-height:3rem}}._subtitle_1i19d_42{color:var(--color-text-secondary);max-width:360px}@media (max-width:1024px){._subtitle_1i19d_42{max-width:100%}}._text_1i19d_52{display:flex;flex-direction:column;justify-content:center;max-width:500px;padding-bottom:60px}@media (max-width:768px){._text_1i19d_52{padding-bottom:40px;padding-top:0;text-align:center}}._desk_1i19d_25{width:100%}._buttons_1i19d_71{margin-top:50px}</style><style>._button_aq4bi_1{align-items:center;border-radius:8px;color:#fff;display:inline-flex;justify-content:center;text-decoration:none}._button_aq4bi_1._variant-primary_aq4bi_9{background-color:var(--color-primary)}._button_aq4bi_1._variant-outline_aq4bi_12{box-shadow:var(--color-text) 0 0 0 1px;color:var(--color-text);overflow:hidden;position:relative;transition:all .25s}._button_aq4bi_1._variant-outline_aq4bi_12:after{background:var(--color-primary);border-radius:8px;content:" ";inset:0;opacity:0;position:absolute;transform:scale(0);transition:all .25s;z-index:0}._button_aq4bi_1._variant-outline_aq4bi_12:hover{box-shadow:var(--color-background) 0 0 0 1px}._button_aq4bi_1._variant-outline_aq4bi_12:hover:after{opacity:1;transform:scale(1)}._button_aq4bi_1._size-md_aq4bi_37{height:40px;padding:0 30px}._button_aq4bi_1._size-md_aq4bi_37._prefixed_aq4bi_41,._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding:0 10px 0 20px}._button_aq4bi_1._size-md_aq4bi_37._suffixed_aq4bi_41{padding-right:0 20px 0 10px}._title_aq4bi_48{flex:1;position:relative;text-align:center;z-index:1}._size-md_aq4bi_37._prefixed_aq4bi_41 ._title_aq4bi_48{padding-left:10px}._size-md_aq4bi_37._suffixed_aq4bi_41 ._title_aq4bi_48{padding-right:10px}._prefix_aq4bi_41,._suffix_aq4bi_41{display:inline-flex;position:relative;z-index:2}</style><style>._row_1ufrv_1{margin-bottom:10px}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><!--[--><!--[--><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><main class="_main_32es8_1"><section><div class="_grid_1i19d_1"><div class="_text_1i19d_52"><h1 class="_title_1i19d_30">Welcome to my Obsidian Garden</h1><p class="_subtitle_1i19d_42"><img src="/nuxt/obsidian.8dc2a844.svg" alt="" width="14" height="14"><a href="https://obsidian.md" rel="noopener noreferrer" target="_blank">Obsidian</a> is a note-taking app, that I use to store chunks of code and technical documentation. </p><div class="_buttons_1i19d_71"><a href="https://github.com/muerwre" rel="noopener noreferrer" target="_blank" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41"><!----><span class="_title_aq4bi_48"><!--[--> Visit my Github <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path d="m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"></path></svg><!--]--></span></a></div></div><div class="_image_1i19d_16"><img src="/nuxt/desk.fcd75862.svg" class="_desk_1i19d_25" alt="It&#39;s me, muerwre"></div></div></section><div class="_reference_32es8_10"><h1>Cheatsheet</h1><div class="_grid_32es8_14"><div class="masonry-wall" style="display:flex;gap:10px;"><!--[--><div class="masonry-column" data-index="0" style="display:flex;flex-basis:0px;flex-direction:column;flex-grow:1;gap:10px;"><!--[--><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></div><!--]--></div><!--]--></div></div></div></main><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div><!--]--><!--]--></div><script type="module">import p from "/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812490900}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/index.bfc362d6.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/HomeHeader.5039a526.js" crossorigin></script><script type="module" src="/nuxt/UiActionButton.8de8506c.js" crossorigin></script><script type="module" src="/nuxt/ArrowRight.4c99b7f0.js" crossorigin></script><script type="module" src="/nuxt/HomeContentList.3f25a970.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><!--[--><!--[--><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><main class="_main_32es8_1"><section><div class="_grid_1i19d_1"><div class="_text_1i19d_52"><h1 class="_title_1i19d_30">Welcome to my Obsidian Garden</h1><p class="_subtitle_1i19d_42"><img src="/nuxt/obsidian.8dc2a844.svg" alt="" width="14" height="14"><a href="https://obsidian.md" rel="noopener noreferrer" target="_blank">Obsidian</a> is a note-taking app, that I use to store chunks of code and technical documentation. </p><div class="_buttons_1i19d_71"><a href="https://github.com/muerwre" rel="noopener noreferrer" target="_blank" class="_button_aq4bi_1 _variant-outline_aq4bi_12 _size-md_aq4bi_37 _suffixed_aq4bi_41"><!----><span class="_title_aq4bi_48"><!--[--> Visit my Github <!--]--></span><span class="_suffix_aq4bi_41"><!--[--><svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewbox="0 0 48 48" fill="currentColor"><path d="m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"></path></svg><!--]--></span></a></div></div><div class="_image_1i19d_16"><img src="/nuxt/desk.91eb5d74.svg" class="_desk_1i19d_25" alt="It&#39;s me, muerwre"></div></div></section><div class="_reference_32es8_10"><h1>Cheatsheet</h1><div class="_grid_32es8_14"><div class="masonry-wall" style="display:flex;gap:10px;"><!--[--><div class="masonry-column" data-index="0" style="display:flex;flex-basis:0px;flex-direction:column;flex-grow:1;gap:10px;"><!--[--><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><!--]--></div><div class="masonry-item"><!--[--><div class="_row_1ufrv_1"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></div><!--]--></div><!--]--></div></div></div></main><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div><!--]--><!--]--></div><script type="module">import p from "/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813353301}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/index.3173d051.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/HomeHeader.0c1c0a2b.js" crossorigin></script><script type="module" src="/nuxt/UiActionButton.d5ab622f.js" crossorigin></script><script type="module" src="/nuxt/ArrowRight.5a505e4f.js" crossorigin></script><script type="module" src="/nuxt/HomeContentList.914b1d24.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/linux/gitea-for-git-hosting/_payload.js b/linux/gitea-for-git-hosting/_payload.js
index b3b6e1f..67ac2fe 100644
--- a/linux/gitea-for-git-hosting/_payload.js
+++ b/linux/gitea-for-git-hosting/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:t,_path:u},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-t1CslyFV8V":{_path:u,_dir:"linux",_draft:n,_partial:n,_locale:"en",_empty:n,title:t,description:"Self-hosted #git repositories with gitea and #docker.",excerpt:{type:v,children:[{type:a,tag:w,props:{},children:[{type:c,value:x},{type:a,tag:y,props:{href:z,rel:[A]},children:[{type:c,value:k}]},{type:c,value:B}]},{type:a,tag:C,props:{id:o},children:[{type:c,value:p}]},{type:a,tag:m,props:{code:q,language:D},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:c,value:q}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{},children:[{type:c,value:x},{type:a,tag:y,props:{href:z,rel:[A]},children:[{type:c,value:k}]},{type:c,value:B}]},{type:a,tag:C,props:{id:o},children:[{type:c,value:p}]},{type:a,tag:m,props:{code:q,language:D},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"3\""}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"external"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:"ct-231705"},children:[{type:c,value:"false"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"server"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"image"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"gitea\u002Fgitea:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"container_name"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"environment"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"USER_UID=1000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"USER_GID=1000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"restart"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"always"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"volumes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:".\u002Fvar\u002Flib\u002Fgitea:\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:".\u002Fetc\u002Fgitea:\u002Fetc\u002Fgitea"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u002Fetc\u002Ftimezone:\u002Fetc\u002Ftimezone:ro"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u002Fetc\u002Flocaltime:\u002Fetc\u002Flocaltime:ro"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ports"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"3000:3000\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"222:22\""}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-231705{color:#79C0FF}.ct-7a640c{color:#A5D6FF}.ct-e171ba{color:#C9D1D9}.ct-eb8891{color:#7EE787}.light .ct-eb8891{color:#268BD2}.light .ct-e171ba{color:#657B83}.light .ct-7a640c{color:#2AA198}.light .ct-231705{color:#B58900}"}]}],toc:{title:r,searchDepth:s,depth:s,links:[{id:o,depth:s,text:p}]}},_type:"markdown",_id:"content:Linux:Gitea for git hosting.md",_source:"content",_file:"Linux\u002FGitea for git hosting.md",_extension:"md"}},prerenderedAt:1667812498538}}("element","span","text","ct-e171ba","line","ct-eb8891","ct-7a640c","      - ",":","    ","gitea",": ","code",false,"setting-up-with-docker-compose","Setting up with docker-compose","version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea\u002Fgitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - .\u002Fvar\u002Flib\u002Fgitea:\u002Fdata\n      - .\u002Fetc\u002Fgitea:\u002Fetc\u002Fgitea\n      - \u002Fetc\u002Ftimezone:\u002Fetc\u002Ftimezone:ro\n      - \u002Fetc\u002Flocaltime:\u002Fetc\u002Flocaltime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","",2,"Gitea For Git Hosting","\u002Flinux\u002Fgitea-for-git-hosting","root","p","Self-hosted #git repositories with ","a","https:\u002F\u002Fgitea.io\u002Fru-ru\u002F","nofollow"," and #docker.","h2","yaml","pre","networks","  "))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:t,_path:u},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-t1CslyFV8V":{_path:u,_dir:"linux",_draft:n,_partial:n,_locale:"en",_empty:n,title:t,description:"Self-hosted #git repositories with gitea and #docker.",excerpt:{type:v,children:[{type:a,tag:w,props:{},children:[{type:c,value:x},{type:a,tag:y,props:{href:z,rel:[A]},children:[{type:c,value:k}]},{type:c,value:B}]},{type:a,tag:C,props:{id:o},children:[{type:c,value:p}]},{type:a,tag:m,props:{code:q,language:D},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:c,value:q}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{},children:[{type:c,value:x},{type:a,tag:y,props:{href:z,rel:[A]},children:[{type:c,value:k}]},{type:c,value:B}]},{type:a,tag:C,props:{id:o},children:[{type:c,value:p}]},{type:a,tag:m,props:{code:q,language:D},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"3\""}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"external"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:"ct-44ee9b"},children:[{type:c,value:"false"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"server"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"image"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"gitea\u002Fgitea:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"container_name"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"environment"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"USER_UID=1000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"USER_GID=1000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"restart"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"always"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"volumes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:".\u002Fvar\u002Flib\u002Fgitea:\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:".\u002Fetc\u002Fgitea:\u002Fetc\u002Fgitea"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u002Fetc\u002Ftimezone:\u002Fetc\u002Ftimezone:ro"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u002Fetc\u002Flocaltime:\u002Fetc\u002Flocaltime:ro"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ports"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"3000:3000\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"222:22\""}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-44ee9b{color:#79C0FF}.ct-bf8a5d{color:#A5D6FF}.ct-4ae203{color:#C9D1D9}.ct-6d4af6{color:#7EE787}.light .ct-6d4af6{color:#268BD2}.light .ct-4ae203{color:#657B83}.light .ct-bf8a5d{color:#2AA198}.light .ct-44ee9b{color:#B58900}"}]}],toc:{title:r,searchDepth:s,depth:s,links:[{id:o,depth:s,text:p}]}},_type:"markdown",_id:"content:Linux:Gitea for git hosting.md",_source:"content",_file:"Linux\u002FGitea for git hosting.md",_extension:"md"}},prerenderedAt:1667813360658}}("element","span","text","ct-4ae203","line","ct-6d4af6","ct-bf8a5d","      - ",":","    ","gitea",": ","code",false,"setting-up-with-docker-compose","Setting up with docker-compose","version: \"3\"\n\nnetworks:\n  gitea:\n    external: false\nservices:\n  server:\n    image: gitea\u002Fgitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n    restart: always\n    networks:\n      - gitea\n    volumes:\n      - .\u002Fvar\u002Flib\u002Fgitea:\u002Fdata\n      - .\u002Fetc\u002Fgitea:\u002Fetc\u002Fgitea\n      - \u002Fetc\u002Ftimezone:\u002Fetc\u002Ftimezone:ro\n      - \u002Fetc\u002Flocaltime:\u002Fetc\u002Flocaltime:ro\n    ports:\n      - \"3000:3000\"\n      - \"222:22\"\n","",2,"Gitea For Git Hosting","\u002Flinux\u002Fgitea-for-git-hosting","root","p","Self-hosted #git repositories with ","a","https:\u002F\u002Fgitea.io\u002Fru-ru\u002F","nofollow"," and #docker.","h2","yaml","pre","networks","  "))
\ No newline at end of file
diff --git a/linux/gitea-for-git-hosting/index.html b/linux/gitea-for-git-hosting/index.html
index 5d69002..5f3cca4 100644
--- a/linux/gitea-for-git-hosting/index.html
+++ b/linux/gitea-for-git-hosting/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Gitea For Git Hosting • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Self-hosted #git repositories with gitea and #docker."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/gitea-for-git-hosting/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Gitea For Git Hosting • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Self-hosted #git repositories with gitea and #docker."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/gitea-for-git-hosting/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/linux/gitea-for-git-hosting" class="router-link-active _active_192pu_81 _link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Gitea For Git Hosting</h1><article><div><p><!--[-->Self-hosted #git repositories with <a href="https://gitea.io/ru-ru/" rel="nofollow" target="_blank"><!--[-->gitea<!--]--></a> and #docker.<!--]--></p><h2 id="setting-up-with-docker-compose"><a href="#setting-up-with-docker-compose"><!--[-->Setting up with docker-compose<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-eb8891">version</span><span class="ct-e171ba">: </span><span class="ct-7a640c">&quot;3&quot;</span></span><span class="line"></span><span class="line"><span class="ct-eb8891">networks</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">  </span><span class="ct-eb8891">gitea</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">external</span><span class="ct-e171ba">: </span><span class="ct-231705">false</span></span><span class="line"><span class="ct-eb8891">services</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">  </span><span class="ct-eb8891">server</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">image</span><span class="ct-e171ba">: </span><span class="ct-7a640c">gitea/gitea:latest</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">container_name</span><span class="ct-e171ba">: </span><span class="ct-7a640c">gitea</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">environment</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">USER_UID=1000</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">USER_GID=1000</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">restart</span><span class="ct-e171ba">: </span><span class="ct-7a640c">always</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">networks</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">gitea</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">volumes</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">./var/lib/gitea:/data</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">./etc/gitea:/etc/gitea</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">/etc/timezone:/etc/timezone:ro</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">/etc/localtime:/etc/localtime:ro</span></span><span class="line"><span class="ct-e171ba">    </span><span class="ct-eb8891">ports</span><span class="ct-e171ba">:</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">&quot;3000:3000&quot;</span></span><span class="line"><span class="ct-e171ba">      - </span><span class="ct-7a640c">&quot;222:22&quot;</span></span></code></pre><!--]--></div><style>.ct-231705{color:#79C0FF}.ct-7a640c{color:#A5D6FF}.ct-e171ba{color:#C9D1D9}.ct-eb8891{color:#7EE787}.light .ct-eb8891{color:#268BD2}.light .ct-e171ba{color:#657B83}.light .ct-7a640c{color:#2AA198}.light .ct-231705{color:#B58900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/gitea-for-git-hosting/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498538}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/linux/gitea-for-git-hosting" class="router-link-active _active_192pu_81 _link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Gitea For Git Hosting</h1><article><div><p><!--[-->Self-hosted #git repositories with <a href="https://gitea.io/ru-ru/" rel="nofollow" target="_blank"><!--[-->gitea<!--]--></a> and #docker.<!--]--></p><h2 id="setting-up-with-docker-compose"><a href="#setting-up-with-docker-compose"><!--[-->Setting up with docker-compose<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-6d4af6">version</span><span class="ct-4ae203">: </span><span class="ct-bf8a5d">&quot;3&quot;</span></span><span class="line"></span><span class="line"><span class="ct-6d4af6">networks</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">  </span><span class="ct-6d4af6">gitea</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">external</span><span class="ct-4ae203">: </span><span class="ct-44ee9b">false</span></span><span class="line"><span class="ct-6d4af6">services</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">  </span><span class="ct-6d4af6">server</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">image</span><span class="ct-4ae203">: </span><span class="ct-bf8a5d">gitea/gitea:latest</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">container_name</span><span class="ct-4ae203">: </span><span class="ct-bf8a5d">gitea</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">environment</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">USER_UID=1000</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">USER_GID=1000</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">restart</span><span class="ct-4ae203">: </span><span class="ct-bf8a5d">always</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">networks</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">gitea</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">volumes</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">./var/lib/gitea:/data</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">./etc/gitea:/etc/gitea</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">/etc/timezone:/etc/timezone:ro</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">/etc/localtime:/etc/localtime:ro</span></span><span class="line"><span class="ct-4ae203">    </span><span class="ct-6d4af6">ports</span><span class="ct-4ae203">:</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">&quot;3000:3000&quot;</span></span><span class="line"><span class="ct-4ae203">      - </span><span class="ct-bf8a5d">&quot;222:22&quot;</span></span></code></pre><!--]--></div><style>.ct-44ee9b{color:#79C0FF}.ct-bf8a5d{color:#A5D6FF}.ct-4ae203{color:#C9D1D9}.ct-6d4af6{color:#7EE787}.light .ct-6d4af6{color:#268BD2}.light .ct-4ae203{color:#657B83}.light .ct-bf8a5d{color:#2AA198}.light .ct-44ee9b{color:#B58900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/gitea-for-git-hosting/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360658}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/linux/google-photos-alternative-with-photoprism/_payload.js b/linux/google-photos-alternative-with-photoprism/_payload.js
index ff3f06f..1d28cdf 100644
--- a/linux/google-photos-alternative-with-photoprism/_payload.js
+++ b/linux/google-photos-alternative-with-photoprism/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:C,_path:D},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-N7FETNtB3c":{_path:D,_dir:"linux",_draft:v,_partial:v,_locale:"en",_empty:v,title:C,description:"Photo Prism is a free alternative to Google photos, can be set up with #docker.",excerpt:{type:E,children:[{type:a,tag:r,props:{},children:[{type:a,tag:n,props:{href:F,rel:[o]},children:[{type:c,value:G}]},{type:c,value:H}]},{type:a,tag:I,props:{id:w},children:[{type:c,value:x}]},{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:n,props:{href:K,rel:[o]},children:[{type:c,value:L}]},{type:c,value:M},{type:a,tag:n,props:{href:N,rel:[o]},children:[{type:c,value:O}]},{type:c,value:P}]},{type:a,tag:s,props:{code:y,language:Q},children:[{type:a,tag:R,props:{},children:[{type:a,tag:s,props:{__ignoreMap:z},children:[{type:c,value:y}]}]}]}]},body:{type:E,children:[{type:a,tag:r,props:{},children:[{type:a,tag:n,props:{href:F,rel:[o]},children:[{type:c,value:G}]},{type:c,value:H}]},{type:a,tag:I,props:{id:w},children:[{type:c,value:x}]},{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:n,props:{href:K,rel:[o]},children:[{type:c,value:L}]},{type:c,value:M},{type:a,tag:n,props:{href:N,rel:[o]},children:[{type:c,value:O}]},{type:c,value:P}]},{type:a,tag:s,props:{code:y,language:Q},children:[{type:a,tag:R,props:{},children:[{type:a,tag:s,props:{__ignoreMap:z},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"'3.5'"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism__app"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism\u002Fphotoprism:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"depends_on"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ports"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"2342:2342"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:_},children:[{type:c,value:"# HTTP port (host:container)"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_ADMIN_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"password\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_URL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"https:\u002F\u002Fservice.url\u002F\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_ORIGINALS_LIMIT"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:"ct-07fb9d"},children:[{type:c,value:"5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_HTTP_COMPRESSION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"gzip\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DEBUG"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"          "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_PUBLIC"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_READONLY"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_EXPERIMENTAL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_CHOWN"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_WEBDAV"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_SETTINGS"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_FACES"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DARKTABLE_PRESETS"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DETECT_NSFW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"           "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_UPLOAD_NSFW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"true\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"            "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_DRIVER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"mysql\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"       "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_SERVER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"mariadb:3306\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_NAME"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"photoprism\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_USER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"root\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"         "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"insecure\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_TITLE"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"PhotoPrism\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_CAPTION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"Browse Your Life\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_DESCRIPTION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_AUTHOR"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"HOME"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"working_dir"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Foriginals:\u002Fphotoprism\u002Foriginals\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"    "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Fimports:\u002Fphotoprism\u002Fimport\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Fstorage:\u002Fphotoprism\u002Fstorage\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism__db"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"mariadb:10.6"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"command"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdatabase:\u002Fvar\u002Flib\u002Fmysql\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:_},children:[{type:c,value:"# Important, don't remove"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_ROOT_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_DATABASE"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_USER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ae}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-07fb9d{color:#79C0FF}.ct-cdd322{color:#8B949E}.ct-0f2d67{color:#A5D6FF}.ct-f8a7f1{color:#C9D1D9}.ct-0cbc4d{color:#7EE787}.light .ct-0cbc4d{color:#268BD2}.light .ct-f8a7f1{color:#657B83}.light .ct-0f2d67{color:#2AA198}.light .ct-cdd322{color:#93A1A1}.light .ct-07fb9d{color:#D33682}"}]}],toc:{title:z,searchDepth:B,depth:B,links:[{id:w,depth:B,text:x}]}},_type:"markdown",_id:"content:Linux:Google photos alternative with Photoprism.md",_source:"content",_file:"Linux\u002FGoogle photos alternative with Photoprism.md",_extension:"md"}},prerenderedAt:1667812498571}}("element","span","text","ct-f8a7f1","line","ct-0cbc4d","ct-0f2d67",": ","      ","\"false\"",":","    ","    ","a","nofollow","      ","      - ","p","code","      - "," ",false,"docker-compose-file-to-run-it","Docker compose file to run it","version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism\u002Fphotoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https:\u002F\u002Fservice.url\u002F\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"\u002Fphotoprism\"\n    working_dir: \"\u002Fphotoprism\"\n    volumes:\n      - \".\u002Fdata\u002Foriginals:\u002Fphotoprism\u002Foriginals\"    \n      - \".\u002Fdata\u002Fimports:\u002Fphotoprism\u002Fimport\"\n      - \".\u002Fdata\u002Fstorage:\u002Fphotoprism\u002Fstorage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \".\u002Fdatabase:\u002Fvar\u002Flib\u002Fmysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","","photoprism",2,"Google Photos Alternative With Photoprism","\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism","root","https:\u002F\u002Fphotoprism.app\u002F","Photo Prism"," is a free alternative to Google photos, can be set up with #docker.","h2","Check out current ","https:\u002F\u002Fdl.photoprism.app\u002Fdocker\u002Fdocker-compose.yml","example"," at photoprism's ","https:\u002F\u002Fdocs.photoprism.app\u002Fgetting-started\u002Fdocker-compose\u002F","documentation",".","yaml","pre","container_name","image","mariadb","restart","unless-stopped","security_opt","seccomp:unconfined","apparmor:unconfined","ct-cdd322","environment","     ","\"\"","\"\u002Fphotoprism\"","volumes","insecure"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:C,_path:D},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-N7FETNtB3c":{_path:D,_dir:"linux",_draft:v,_partial:v,_locale:"en",_empty:v,title:C,description:"Photo Prism is a free alternative to Google photos, can be set up with #docker.",excerpt:{type:E,children:[{type:a,tag:r,props:{},children:[{type:a,tag:n,props:{href:F,rel:[o]},children:[{type:c,value:G}]},{type:c,value:H}]},{type:a,tag:I,props:{id:w},children:[{type:c,value:x}]},{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:n,props:{href:K,rel:[o]},children:[{type:c,value:L}]},{type:c,value:M},{type:a,tag:n,props:{href:N,rel:[o]},children:[{type:c,value:O}]},{type:c,value:P}]},{type:a,tag:s,props:{code:y,language:Q},children:[{type:a,tag:R,props:{},children:[{type:a,tag:s,props:{__ignoreMap:z},children:[{type:c,value:y}]}]}]}]},body:{type:E,children:[{type:a,tag:r,props:{},children:[{type:a,tag:n,props:{href:F,rel:[o]},children:[{type:c,value:G}]},{type:c,value:H}]},{type:a,tag:I,props:{id:w},children:[{type:c,value:x}]},{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:n,props:{href:K,rel:[o]},children:[{type:c,value:L}]},{type:c,value:M},{type:a,tag:n,props:{href:N,rel:[o]},children:[{type:c,value:O}]},{type:c,value:P}]},{type:a,tag:s,props:{code:y,language:Q},children:[{type:a,tag:R,props:{},children:[{type:a,tag:s,props:{__ignoreMap:z},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"'3.5'"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism__app"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism\u002Fphotoprism:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"depends_on"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ports"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"2342:2342"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:_},children:[{type:c,value:"# HTTP port (host:container)"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_ADMIN_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"password\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_URL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"https:\u002F\u002Fservice.url\u002F\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_ORIGINALS_LIMIT"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:"ct-28b1e5"},children:[{type:c,value:"5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_HTTP_COMPRESSION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"gzip\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DEBUG"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"          "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_PUBLIC"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_READONLY"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_EXPERIMENTAL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_CHOWN"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_WEBDAV"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_SETTINGS"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_FACES"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DARKTABLE_PRESETS"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DETECT_NSFW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"           "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_UPLOAD_NSFW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"true\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"            "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_DRIVER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"mysql\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"       "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_SERVER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"mariadb:3306\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_NAME"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"photoprism\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_USER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"root\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"         "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"insecure\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_TITLE"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"PhotoPrism\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_CAPTION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"Browse Your Life\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_DESCRIPTION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_AUTHOR"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"HOME"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"working_dir"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Foriginals:\u002Fphotoprism\u002Foriginals\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"    "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Fimports:\u002Fphotoprism\u002Fimport\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Fstorage:\u002Fphotoprism\u002Fstorage\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism__db"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"mariadb:10.6"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"command"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdatabase:\u002Fvar\u002Flib\u002Fmysql\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:_},children:[{type:c,value:"# Important, don't remove"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_ROOT_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_DATABASE"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_USER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ae}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-28b1e5{color:#79C0FF}.ct-771931{color:#8B949E}.ct-94e896{color:#A5D6FF}.ct-0a7899{color:#C9D1D9}.ct-d3d9ac{color:#7EE787}.light .ct-d3d9ac{color:#268BD2}.light .ct-0a7899{color:#657B83}.light .ct-94e896{color:#2AA198}.light .ct-771931{color:#93A1A1}.light .ct-28b1e5{color:#D33682}"}]}],toc:{title:z,searchDepth:B,depth:B,links:[{id:w,depth:B,text:x}]}},_type:"markdown",_id:"content:Linux:Google photos alternative with Photoprism.md",_source:"content",_file:"Linux\u002FGoogle photos alternative with Photoprism.md",_extension:"md"}},prerenderedAt:1667813360689}}("element","span","text","ct-0a7899","line","ct-d3d9ac","ct-94e896",": ","      ","\"false\"",":","    ","    ","a","nofollow","      ","      - ","p","code","      - "," ",false,"docker-compose-file-to-run-it","Docker compose file to run it","version: '3.5'\n\nservices:\n  photoprism:\n    container_name: photoprism__app\n    image: photoprism\u002Fphotoprism:latest\n    depends_on:\n      - mariadb\n    restart: unless-stopped\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    ports:\n      - 2342:2342 # HTTP port (host:container)\n    environment:\n      PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n      PHOTOPRISM_SITE_URL: \"https:\u002F\u002Fservice.url\u002F\"\n      PHOTOPRISM_ORIGINALS_LIMIT: 5000\n      PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n      PHOTOPRISM_DEBUG: \"false\"          \n      PHOTOPRISM_PUBLIC: \"false\"      \n      PHOTOPRISM_READONLY: \"false\"    \n      PHOTOPRISM_EXPERIMENTAL: \"false\"\n      PHOTOPRISM_DISABLE_CHOWN: \"false\"\n      PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n      PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n      PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n      PHOTOPRISM_DISABLE_FACES: \"false\"     \n      PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n      PHOTOPRISM_DARKTABLE_PRESETS: \"false\"     \n      PHOTOPRISM_DETECT_NSFW: \"false\"           \n      PHOTOPRISM_UPLOAD_NSFW: \"true\"            \n      PHOTOPRISM_DATABASE_DRIVER: \"mysql\"       \n      PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n      PHOTOPRISM_DATABASE_NAME: \"photoprism\"    \n      PHOTOPRISM_DATABASE_USER: \"root\"         \n      PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n      PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n      PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n      PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"\u002Fphotoprism\"\n    working_dir: \"\u002Fphotoprism\"\n    volumes:\n      - \".\u002Fdata\u002Foriginals:\u002Fphotoprism\u002Foriginals\"    \n      - \".\u002Fdata\u002Fimports:\u002Fphotoprism\u002Fimport\"\n      - \".\u002Fdata\u002Fstorage:\u002Fphotoprism\u002Fstorage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \".\u002Fdatabase:\u002Fvar\u002Flib\u002Fmysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","","photoprism",2,"Google Photos Alternative With Photoprism","\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism","root","https:\u002F\u002Fphotoprism.app\u002F","Photo Prism"," is a free alternative to Google photos, can be set up with #docker.","h2","Check out current ","https:\u002F\u002Fdl.photoprism.app\u002Fdocker\u002Fdocker-compose.yml","example"," at photoprism's ","https:\u002F\u002Fdocs.photoprism.app\u002Fgetting-started\u002Fdocker-compose\u002F","documentation",".","yaml","pre","container_name","image","mariadb","restart","unless-stopped","security_opt","seccomp:unconfined","apparmor:unconfined","ct-771931","environment","     ","\"\"","\"\u002Fphotoprism\"","volumes","insecure"))
\ No newline at end of file
diff --git a/linux/google-photos-alternative-with-photoprism/index.html b/linux/google-photos-alternative-with-photoprism/index.html
index 9220764..d459093 100644
--- a/linux/google-photos-alternative-with-photoprism/index.html
+++ b/linux/google-photos-alternative-with-photoprism/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Google Photos Alternative With Photoprism • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Photo Prism is a free alternative to Google photos, can be set up with #docker."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/google-photos-alternative-with-photoprism/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Google Photos Alternative With Photoprism • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Photo Prism is a free alternative to Google photos, can be set up with #docker."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/google-photos-alternative-with-photoprism/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/google-photos-alternative-with-photoprism" class="router-link-active _active_192pu_81 _link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Google Photos Alternative With Photoprism</h1><article><div><p><!--[--><a href="https://photoprism.app/" rel="nofollow" target="_blank"><!--[-->Photo Prism<!--]--></a> is a free alternative to Google photos, can be set up with #docker.<!--]--></p><h2 id="docker-compose-file-to-run-it"><a href="#docker-compose-file-to-run-it"><!--[-->Docker compose file to run it<!--]--></a></h2><p><!--[-->Check out current <a href="https://dl.photoprism.app/docker/docker-compose.yml" rel="nofollow" target="_blank"><!--[-->example<!--]--></a> at photoprism&#39;s <a href="https://docs.photoprism.app/getting-started/docker-compose/" rel="nofollow" target="_blank"><!--[-->documentation<!--]--></a>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-0cbc4d">version</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&#39;3.5&#39;</span></span><span class="line"></span><span class="line"><span class="ct-0cbc4d">services</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">  </span><span class="ct-0cbc4d">photoprism</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">container_name</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">photoprism__app</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">image</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">photoprism/photoprism:latest</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">depends_on</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">mariadb</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">restart</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">unless-stopped</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">security_opt</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">seccomp:unconfined</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">apparmor:unconfined</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">ports</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">2342:2342</span><span class="ct-f8a7f1"> </span><span class="ct-cdd322"># HTTP port (host:container)</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">environment</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_ADMIN_PASSWORD</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;password&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_SITE_URL</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;https://service.url/&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_ORIGINALS_LIMIT</span><span class="ct-f8a7f1">: </span><span class="ct-07fb9d">5000</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_HTTP_COMPRESSION</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;gzip&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DEBUG</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1">          </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_PUBLIC</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1">      </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_READONLY</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1">    </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_EXPERIMENTAL</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DISABLE_CHOWN</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DISABLE_WEBDAV</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1"> </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DISABLE_SETTINGS</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DISABLE_TENSORFLOW</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DISABLE_FACES</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1">     </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DISABLE_CLASSIFICATION</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DARKTABLE_PRESETS</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1">     </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DETECT_NSFW</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;false&quot;</span><span class="ct-f8a7f1">           </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_UPLOAD_NSFW</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;true&quot;</span><span class="ct-f8a7f1">            </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DATABASE_DRIVER</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;mysql&quot;</span><span class="ct-f8a7f1">       </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DATABASE_SERVER</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;mariadb:3306&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DATABASE_NAME</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;photoprism&quot;</span><span class="ct-f8a7f1">    </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DATABASE_USER</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;root&quot;</span><span class="ct-f8a7f1">         </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_DATABASE_PASSWORD</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;insecure&quot;</span><span class="ct-f8a7f1"> </span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_SITE_TITLE</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;PhotoPrism&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_SITE_CAPTION</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;Browse Your Life&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_SITE_DESCRIPTION</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">PHOTOPRISM_SITE_AUTHOR</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;&quot;</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">HOME</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;/photoprism&quot;</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">working_dir</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">&quot;/photoprism&quot;</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">volumes</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">&quot;./data/originals:/photoprism/originals&quot;</span><span class="ct-f8a7f1">    </span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">&quot;./data/imports:/photoprism/import&quot;</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">&quot;./data/storage:/photoprism/storage&quot;</span></span><span class="line"><span class="ct-f8a7f1">  </span><span class="ct-0cbc4d">mariadb</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">container_name</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">photoprism__db</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">restart</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">unless-stopped</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">image</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">mariadb:10.6</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">security_opt</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">seccomp:unconfined</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">apparmor:unconfined</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">command</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">volumes</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      - </span><span class="ct-0f2d67">&quot;./database:/var/lib/mysql&quot;</span><span class="ct-f8a7f1"> </span><span class="ct-cdd322"># Important, don&#39;t remove</span></span><span class="line"><span class="ct-f8a7f1">    </span><span class="ct-0cbc4d">environment</span><span class="ct-f8a7f1">:</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">MYSQL_ROOT_PASSWORD</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">insecure</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">MYSQL_DATABASE</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">photoprism</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">MYSQL_USER</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">photoprism</span></span><span class="line"><span class="ct-f8a7f1">      </span><span class="ct-0cbc4d">MYSQL_PASSWORD</span><span class="ct-f8a7f1">: </span><span class="ct-0f2d67">insecure</span></span></code></pre><!--]--></div><style>.ct-07fb9d{color:#79C0FF}.ct-cdd322{color:#8B949E}.ct-0f2d67{color:#A5D6FF}.ct-f8a7f1{color:#C9D1D9}.ct-0cbc4d{color:#7EE787}.light .ct-0cbc4d{color:#268BD2}.light .ct-f8a7f1{color:#657B83}.light .ct-0f2d67{color:#2AA198}.light .ct-cdd322{color:#93A1A1}.light .ct-07fb9d{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/google-photos-alternative-with-photoprism/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498571}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/google-photos-alternative-with-photoprism" class="router-link-active _active_192pu_81 _link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Google Photos Alternative With Photoprism</h1><article><div><p><!--[--><a href="https://photoprism.app/" rel="nofollow" target="_blank"><!--[-->Photo Prism<!--]--></a> is a free alternative to Google photos, can be set up with #docker.<!--]--></p><h2 id="docker-compose-file-to-run-it"><a href="#docker-compose-file-to-run-it"><!--[-->Docker compose file to run it<!--]--></a></h2><p><!--[-->Check out current <a href="https://dl.photoprism.app/docker/docker-compose.yml" rel="nofollow" target="_blank"><!--[-->example<!--]--></a> at photoprism&#39;s <a href="https://docs.photoprism.app/getting-started/docker-compose/" rel="nofollow" target="_blank"><!--[-->documentation<!--]--></a>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>yaml</span></button><!--[--><pre><code><span class="line"><span class="ct-d3d9ac">version</span><span class="ct-0a7899">: </span><span class="ct-94e896">&#39;3.5&#39;</span></span><span class="line"></span><span class="line"><span class="ct-d3d9ac">services</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">  </span><span class="ct-d3d9ac">photoprism</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">container_name</span><span class="ct-0a7899">: </span><span class="ct-94e896">photoprism__app</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">image</span><span class="ct-0a7899">: </span><span class="ct-94e896">photoprism/photoprism:latest</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">depends_on</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">mariadb</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">restart</span><span class="ct-0a7899">: </span><span class="ct-94e896">unless-stopped</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">security_opt</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">seccomp:unconfined</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">apparmor:unconfined</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">ports</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">2342:2342</span><span class="ct-0a7899"> </span><span class="ct-771931"># HTTP port (host:container)</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">environment</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_ADMIN_PASSWORD</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;password&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_SITE_URL</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;https://service.url/&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_ORIGINALS_LIMIT</span><span class="ct-0a7899">: </span><span class="ct-28b1e5">5000</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_HTTP_COMPRESSION</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;gzip&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DEBUG</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899">          </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_PUBLIC</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899">      </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_READONLY</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899">    </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_EXPERIMENTAL</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DISABLE_CHOWN</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DISABLE_WEBDAV</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899"> </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DISABLE_SETTINGS</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DISABLE_TENSORFLOW</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DISABLE_FACES</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899">     </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DISABLE_CLASSIFICATION</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DARKTABLE_PRESETS</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899">     </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DETECT_NSFW</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;false&quot;</span><span class="ct-0a7899">           </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_UPLOAD_NSFW</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;true&quot;</span><span class="ct-0a7899">            </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DATABASE_DRIVER</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;mysql&quot;</span><span class="ct-0a7899">       </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DATABASE_SERVER</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;mariadb:3306&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DATABASE_NAME</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;photoprism&quot;</span><span class="ct-0a7899">    </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DATABASE_USER</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;root&quot;</span><span class="ct-0a7899">         </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_DATABASE_PASSWORD</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;insecure&quot;</span><span class="ct-0a7899"> </span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_SITE_TITLE</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;PhotoPrism&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_SITE_CAPTION</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;Browse Your Life&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_SITE_DESCRIPTION</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">PHOTOPRISM_SITE_AUTHOR</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;&quot;</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">HOME</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;/photoprism&quot;</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">working_dir</span><span class="ct-0a7899">: </span><span class="ct-94e896">&quot;/photoprism&quot;</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">volumes</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">&quot;./data/originals:/photoprism/originals&quot;</span><span class="ct-0a7899">    </span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">&quot;./data/imports:/photoprism/import&quot;</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">&quot;./data/storage:/photoprism/storage&quot;</span></span><span class="line"><span class="ct-0a7899">  </span><span class="ct-d3d9ac">mariadb</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">container_name</span><span class="ct-0a7899">: </span><span class="ct-94e896">photoprism__db</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">restart</span><span class="ct-0a7899">: </span><span class="ct-94e896">unless-stopped</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">image</span><span class="ct-0a7899">: </span><span class="ct-94e896">mariadb:10.6</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">security_opt</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">seccomp:unconfined</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">apparmor:unconfined</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">command</span><span class="ct-0a7899">: </span><span class="ct-94e896">mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">volumes</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      - </span><span class="ct-94e896">&quot;./database:/var/lib/mysql&quot;</span><span class="ct-0a7899"> </span><span class="ct-771931"># Important, don&#39;t remove</span></span><span class="line"><span class="ct-0a7899">    </span><span class="ct-d3d9ac">environment</span><span class="ct-0a7899">:</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">MYSQL_ROOT_PASSWORD</span><span class="ct-0a7899">: </span><span class="ct-94e896">insecure</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">MYSQL_DATABASE</span><span class="ct-0a7899">: </span><span class="ct-94e896">photoprism</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">MYSQL_USER</span><span class="ct-0a7899">: </span><span class="ct-94e896">photoprism</span></span><span class="line"><span class="ct-0a7899">      </span><span class="ct-d3d9ac">MYSQL_PASSWORD</span><span class="ct-0a7899">: </span><span class="ct-94e896">insecure</span></span></code></pre><!--]--></div><style>.ct-28b1e5{color:#79C0FF}.ct-771931{color:#8B949E}.ct-94e896{color:#A5D6FF}.ct-0a7899{color:#C9D1D9}.ct-d3d9ac{color:#7EE787}.light .ct-d3d9ac{color:#268BD2}.light .ct-0a7899{color:#657B83}.light .ct-94e896{color:#2AA198}.light .ct-771931{color:#93A1A1}.light .ct-28b1e5{color:#D33682}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/google-photos-alternative-with-photoprism/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360689}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/linux/resume-or-start-screen-session/_payload.js b/linux/resume-or-start-screen-session/_payload.js
index b0d59e1..1778237 100644
--- a/linux/resume-or-start-screen-session/_payload.js
+++ b/linux/resume-or-start-screen-session/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:j,_path:k},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-KZPaWw5ajQ":{_path:k,_dir:"linux",_draft:f,_partial:f,_locale:"en",_empty:f,title:j,description:"Running this script will enter currently running screen session or will start new one.",excerpt:{type:l,children:[{type:a,tag:m,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:d,props:{code:g,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:d,props:{__ignoreMap:h},children:[{type:b,value:g}]}]}]}]},body:{type:l,children:[{type:a,tag:m,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:d,props:{code:g,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:d,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:"line"},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"( screen -r bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" ( screen -d bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"&&"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" screen -r bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" screen -SAm bash bash ) )"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-0b3b6a{color:#FF7B72}.ct-7ba6e5{color:#C9D1D9}.light .ct-7ba6e5{color:#657B83}.light .ct-0b3b6a{color:#859900}"}]}],toc:{title:h,searchDepth:u,depth:u,links:[]}},_type:"markdown",_id:"content:Linux:Resume or start screen session.md",_source:"content",_file:"Linux\u002FResume or start screen session.md",_extension:"md"}},prerenderedAt:1667812498637}}("element","text","span","code","ct-7ba6e5",false,"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","","ct-0b3b6a","Resume Or Start Screen Session","\u002Flinux\u002Fresume-or-start-screen-session","root","p","Running this script will enter currently running ","code-inline","screen"," session or will start new one.","shell","pre","||",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:j,_path:k},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-KZPaWw5ajQ":{_path:k,_dir:"linux",_draft:f,_partial:f,_locale:"en",_empty:f,title:j,description:"Running this script will enter currently running screen session or will start new one.",excerpt:{type:l,children:[{type:a,tag:m,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:d,props:{code:g,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:d,props:{__ignoreMap:h},children:[{type:b,value:g}]}]}]}]},body:{type:l,children:[{type:a,tag:m,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:d,props:{code:g,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:d,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:"line"},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"( screen -r bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" ( screen -d bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"&&"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" screen -r bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" screen -SAm bash bash ) )"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-6e070d{color:#FF7B72}.ct-ec5763{color:#C9D1D9}.light .ct-ec5763{color:#657B83}.light .ct-6e070d{color:#859900}"}]}],toc:{title:h,searchDepth:u,depth:u,links:[]}},_type:"markdown",_id:"content:Linux:Resume or start screen session.md",_source:"content",_file:"Linux\u002FResume or start screen session.md",_extension:"md"}},prerenderedAt:1667813360747}}("element","text","span","code","ct-ec5763",false,"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","","ct-6e070d","Resume Or Start Screen Session","\u002Flinux\u002Fresume-or-start-screen-session","root","p","Running this script will enter currently running ","code-inline","screen"," session or will start new one.","shell","pre","||",2))
\ No newline at end of file
diff --git a/linux/resume-or-start-screen-session/index.html b/linux/resume-or-start-screen-session/index.html
index 578e507..69a8b59 100644
--- a/linux/resume-or-start-screen-session/index.html
+++ b/linux/resume-or-start-screen-session/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Resume Or Start Screen Session • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Running this script will enter currently running screen session or will start new one."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/resume-or-start-screen-session/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Resume Or Start Screen Session • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Running this script will enter currently running screen session or will start new one."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/resume-or-start-screen-session/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/resume-or-start-screen-session" class="router-link-active _active_192pu_81 _link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Resume Or Start Screen Session</h1><article><div><p><!--[-->Running this script will enter currently running <code><!--[-->screen<!--]--></code> session or will start new one.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-7ba6e5">( screen -r bash </span><span class="ct-0b3b6a">||</span><span class="ct-7ba6e5"> ( screen -d bash </span><span class="ct-0b3b6a">&amp;&amp;</span><span class="ct-7ba6e5"> screen -r bash </span><span class="ct-0b3b6a">||</span><span class="ct-7ba6e5"> screen -SAm bash bash ) )</span></span></code></pre><!--]--></div><style>.ct-0b3b6a{color:#FF7B72}.ct-7ba6e5{color:#C9D1D9}.light .ct-7ba6e5{color:#657B83}.light .ct-0b3b6a{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/resume-or-start-screen-session/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498637}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/resume-or-start-screen-session" class="router-link-active _active_192pu_81 _link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Resume Or Start Screen Session</h1><article><div><p><!--[-->Running this script will enter currently running <code><!--[-->screen<!--]--></code> session or will start new one.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-ec5763">( screen -r bash </span><span class="ct-6e070d">||</span><span class="ct-ec5763"> ( screen -d bash </span><span class="ct-6e070d">&amp;&amp;</span><span class="ct-ec5763"> screen -r bash </span><span class="ct-6e070d">||</span><span class="ct-ec5763"> screen -SAm bash bash ) )</span></span></code></pre><!--]--></div><style>.ct-6e070d{color:#FF7B72}.ct-ec5763{color:#C9D1D9}.light .ct-ec5763{color:#657B83}.light .ct-6e070d{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/resume-or-start-screen-session/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360747}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/linux/rsync-file-with-ssh/_payload.js b/linux/rsync-file-with-ssh/_payload.js
index 5e5fd15..d878f9b 100644
--- a/linux/rsync-file-with-ssh/_payload.js
+++ b/linux/rsync-file-with-ssh/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:p,_path:q},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3kXgAF354y":{_path:q,_dir:"linux",_draft:l,_partial:l,_locale:"en",_empty:l,title:p,description:m,excerpt:{type:r,children:[{type:a,tag:s,props:{},children:[{type:c,value:m}]},{type:a,tag:k,props:{code:n,language:t},children:[{type:a,tag:u,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:c,value:n}]}]}]}]},body:{type:r,children:[{type:a,tag:s,props:{},children:[{type:c,value:m}]},{type:a,tag:k,props:{code:n,language:t},children:[{type:a,tag:u,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:"ct-d9e339"},children:[{type:c,value:"#!\u002Fbin\u002Fbash"}]}]},{type:a,tag:b,props:{class:d},children:[]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"PORT=22"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"USER=user"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"HOST=example.com"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"REMOTE_PATH=\u002Ftmp"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"REMOTE_FILE=sample.text"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"DEST_PATH=.\u002F"}]}]},{type:a,tag:b,props:{class:d},children:[]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"rsync -a -e "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"ssh -p "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"PORT"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:e},children:[{type:c,value:" -P -v \\"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"USER"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"@"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"HOST"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:":"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"REMOTE_PATH"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\u002F"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"REMOTE_FILE"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:e},children:[{type:c,value:" \\"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"DEST_PATH"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-87da56{color:#C9D1D9}.ct-d9fe04{color:#C9D1D9}.ct-39eea0{color:#A5D6FF}.ct-ac1646{color:#C9D1D9}.ct-d9e339{color:#8B949E}.light .ct-d9e339{color:#93A1A1}.light .ct-ac1646{color:#657B83}.light .ct-39eea0{color:#2AA198}.light .ct-d9fe04{color:#859900}.light .ct-87da56{color:#268BD2}"}]}],toc:{title:o,searchDepth:w,depth:w,links:[]}},_type:"markdown",_id:"content:Linux:Rsync file with SSH.md",_source:"content",_file:"Linux\u002FRsync file with SSH.md",_extension:"md"}},prerenderedAt:1667812498669}}("element","span","text","line","ct-ac1646","ct-39eea0","ct-d9fe04","$","ct-87da56","\"","code",false,"Downloads file from #SSH with rsync and puts it in current folder.","#!\u002Fbin\u002Fbash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=\u002Ftmp\nREMOTE_FILE=sample.text\nDEST_PATH=.\u002F\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH\u002F$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","","Rsync File With SSH","\u002Flinux\u002Frsync-file-with-ssh","root","p","bash","pre","    ",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:p,_path:q},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3kXgAF354y":{_path:q,_dir:"linux",_draft:l,_partial:l,_locale:"en",_empty:l,title:p,description:m,excerpt:{type:r,children:[{type:a,tag:s,props:{},children:[{type:c,value:m}]},{type:a,tag:k,props:{code:n,language:t},children:[{type:a,tag:u,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:c,value:n}]}]}]}]},body:{type:r,children:[{type:a,tag:s,props:{},children:[{type:c,value:m}]},{type:a,tag:k,props:{code:n,language:t},children:[{type:a,tag:u,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:"ct-6afeff"},children:[{type:c,value:"#!\u002Fbin\u002Fbash"}]}]},{type:a,tag:b,props:{class:d},children:[]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"PORT=22"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"USER=user"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"HOST=example.com"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"REMOTE_PATH=\u002Ftmp"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"REMOTE_FILE=sample.text"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"DEST_PATH=.\u002F"}]}]},{type:a,tag:b,props:{class:d},children:[]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"rsync -a -e "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"ssh -p "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"PORT"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:e},children:[{type:c,value:" -P -v \\"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"USER"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"@"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"HOST"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:":"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"REMOTE_PATH"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\u002F"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"REMOTE_FILE"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:e},children:[{type:c,value:" \\"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"DEST_PATH"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-6fbdab{color:#C9D1D9}.ct-f36261{color:#C9D1D9}.ct-092e9e{color:#A5D6FF}.ct-4da16e{color:#C9D1D9}.ct-6afeff{color:#8B949E}.light .ct-6afeff{color:#93A1A1}.light .ct-4da16e{color:#657B83}.light .ct-092e9e{color:#2AA198}.light .ct-f36261{color:#859900}.light .ct-6fbdab{color:#268BD2}"}]}],toc:{title:o,searchDepth:w,depth:w,links:[]}},_type:"markdown",_id:"content:Linux:Rsync file with SSH.md",_source:"content",_file:"Linux\u002FRsync file with SSH.md",_extension:"md"}},prerenderedAt:1667813360774}}("element","span","text","line","ct-4da16e","ct-092e9e","ct-f36261","$","ct-6fbdab","\"","code",false,"Downloads file from #SSH with rsync and puts it in current folder.","#!\u002Fbin\u002Fbash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=\u002Ftmp\nREMOTE_FILE=sample.text\nDEST_PATH=.\u002F\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n    \"$USER@$HOST:$REMOTE_PATH\u002F$REMOTE_FILE\" \\\n    \"$DEST_PATH\"\n","","Rsync File With SSH","\u002Flinux\u002Frsync-file-with-ssh","root","p","bash","pre","    ",2))
\ No newline at end of file
diff --git a/linux/rsync-file-with-ssh/index.html b/linux/rsync-file-with-ssh/index.html
index 33a65b9..9f7c63d 100644
--- a/linux/rsync-file-with-ssh/index.html
+++ b/linux/rsync-file-with-ssh/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Rsync File With SSH • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Downloads file from #SSH with rsync and puts it in current folder."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/rsync-file-with-ssh/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Rsync File With SSH • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Downloads file from #SSH with rsync and puts it in current folder."><meta name="head:count" content="3"><link rel="modulepreload" href="/linux/rsync-file-with-ssh/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/rsync-file-with-ssh" class="router-link-active _active_192pu_81 _link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Rsync File With SSH</h1><article><div><p><!--[-->Downloads file from #SSH with rsync and puts it in current folder.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-d9e339">#!/bin/bash</span></span><span class="line"></span><span class="line"><span class="ct-ac1646">PORT=22</span></span><span class="line"><span class="ct-ac1646">USER=user</span></span><span class="line"><span class="ct-ac1646">HOST=example.com</span></span><span class="line"><span class="ct-ac1646">REMOTE_PATH=/tmp</span></span><span class="line"><span class="ct-ac1646">REMOTE_FILE=sample.text</span></span><span class="line"><span class="ct-ac1646">DEST_PATH=./</span></span><span class="line"></span><span class="line"><span class="ct-ac1646">rsync -a -e </span><span class="ct-39eea0">&quot;ssh -p </span><span class="ct-d9fe04">$</span><span class="ct-87da56">PORT</span><span class="ct-39eea0">&quot;</span><span class="ct-ac1646"> -P -v \</span></span><span class="line"><span class="ct-ac1646">    </span><span class="ct-39eea0">&quot;</span><span class="ct-d9fe04">$</span><span class="ct-87da56">USER</span><span class="ct-39eea0">@</span><span class="ct-d9fe04">$</span><span class="ct-87da56">HOST</span><span class="ct-39eea0">:</span><span class="ct-d9fe04">$</span><span class="ct-87da56">REMOTE_PATH</span><span class="ct-39eea0">/</span><span class="ct-d9fe04">$</span><span class="ct-87da56">REMOTE_FILE</span><span class="ct-39eea0">&quot;</span><span class="ct-ac1646"> \</span></span><span class="line"><span class="ct-ac1646">    </span><span class="ct-39eea0">&quot;</span><span class="ct-d9fe04">$</span><span class="ct-87da56">DEST_PATH</span><span class="ct-39eea0">&quot;</span></span></code></pre><!--]--></div><style>.ct-87da56{color:#C9D1D9}.ct-d9fe04{color:#C9D1D9}.ct-39eea0{color:#A5D6FF}.ct-ac1646{color:#C9D1D9}.ct-d9e339{color:#8B949E}.light .ct-d9e339{color:#93A1A1}.light .ct-ac1646{color:#657B83}.light .ct-39eea0{color:#2AA198}.light .ct-d9fe04{color:#859900}.light .ct-87da56{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/rsync-file-with-ssh/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498669}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/rsync-file-with-ssh" class="router-link-active _active_192pu_81 _link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Rsync File With SSH</h1><article><div><p><!--[-->Downloads file from #SSH with rsync and puts it in current folder.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-6afeff">#!/bin/bash</span></span><span class="line"></span><span class="line"><span class="ct-4da16e">PORT=22</span></span><span class="line"><span class="ct-4da16e">USER=user</span></span><span class="line"><span class="ct-4da16e">HOST=example.com</span></span><span class="line"><span class="ct-4da16e">REMOTE_PATH=/tmp</span></span><span class="line"><span class="ct-4da16e">REMOTE_FILE=sample.text</span></span><span class="line"><span class="ct-4da16e">DEST_PATH=./</span></span><span class="line"></span><span class="line"><span class="ct-4da16e">rsync -a -e </span><span class="ct-092e9e">&quot;ssh -p </span><span class="ct-f36261">$</span><span class="ct-6fbdab">PORT</span><span class="ct-092e9e">&quot;</span><span class="ct-4da16e"> -P -v \</span></span><span class="line"><span class="ct-4da16e">    </span><span class="ct-092e9e">&quot;</span><span class="ct-f36261">$</span><span class="ct-6fbdab">USER</span><span class="ct-092e9e">@</span><span class="ct-f36261">$</span><span class="ct-6fbdab">HOST</span><span class="ct-092e9e">:</span><span class="ct-f36261">$</span><span class="ct-6fbdab">REMOTE_PATH</span><span class="ct-092e9e">/</span><span class="ct-f36261">$</span><span class="ct-6fbdab">REMOTE_FILE</span><span class="ct-092e9e">&quot;</span><span class="ct-4da16e"> \</span></span><span class="line"><span class="ct-4da16e">    </span><span class="ct-092e9e">&quot;</span><span class="ct-f36261">$</span><span class="ct-6fbdab">DEST_PATH</span><span class="ct-092e9e">&quot;</span></span></code></pre><!--]--></div><style>.ct-6fbdab{color:#C9D1D9}.ct-f36261{color:#C9D1D9}.ct-092e9e{color:#A5D6FF}.ct-4da16e{color:#C9D1D9}.ct-6afeff{color:#8B949E}.light .ct-6afeff{color:#93A1A1}.light .ct-4da16e{color:#657B83}.light .ct-092e9e{color:#2AA198}.light .ct-f36261{color:#859900}.light .ct-6fbdab{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/rsync-file-with-ssh/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360774}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/linux/setting-up-nginx/_payload.js b/linux/setting-up-nginx/_payload.js
index f22b99f..45c7430 100644
--- a/linux/setting-up-nginx/_payload.js
+++ b/linux/setting-up-nginx/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:P,_path:Q},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-jVEFIZPtgx":{_path:Q,_dir:"linux",_draft:C,_partial:C,_locale:"en",_empty:C,title:P,description:j,excerpt:{type:R,children:[{type:a,tag:l,props:{id:D},children:[{type:c,value:E}]},{type:a,tag:h,props:{code:F,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:F}]}]}]},{type:a,tag:l,props:{id:G},children:[{type:c,value:H}]},{type:a,tag:h,props:{code:I,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:I}]}]}]},{type:a,tag:l,props:{id:J},children:[{type:c,value:K}]},{type:a,tag:S,props:{},children:[{type:c,value:T},{type:a,tag:o,props:{},children:[{type:c,value:U}]},{type:c,value:V},{type:a,tag:o,props:{},children:[{type:c,value:W}]},{type:c,value:X},{type:a,tag:o,props:{},children:[{type:c,value:Y}]},{type:c,value:Z},{type:a,tag:_,props:{href:s,rel:[$]},children:[{type:c,value:s}]},{type:c,value:aa}]},{type:a,tag:h,props:{code:L,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:L}]}]}]}]},body:{type:R,children:[{type:a,tag:l,props:{id:D},children:[{type:c,value:E}]},{type:a,tag:h,props:{code:F,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ad},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# First attempt to serve request as file, then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# as directory, then fall back to displaying a 404."}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:"ct-dd96a9"},children:[{type:c,value:g}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:l,props:{id:G},children:[{type:c,value:H}]},{type:a,tag:h,props:{code:I,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" client_max_body_size "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"200M;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:l,props:{id:J},children:[{type:c,value:K}]},{type:a,tag:S,props:{},children:[{type:c,value:T},{type:a,tag:o,props:{},children:[{type:c,value:U}]},{type:c,value:V},{type:a,tag:o,props:{},children:[{type:c,value:W}]},{type:c,value:X},{type:a,tag:o,props:{},children:[{type:c,value:Y}]},{type:c,value:Z},{type:a,tag:_,props:{href:s,rel:[$]},children:[{type:c,value:s}]},{type:c,value:aa}]},{type:a,tag:h,props:{code:L,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"80;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"return"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-53c2fa"},children:[{type:c,value:"301"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" https:\u002F\u002Fnext.vault48.org"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"request_uri"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"443 ssl http2;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"[::]:443 ssl http2;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# managed by Certbot"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_certificate "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Ffullchain.pem; "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_certificate_key "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fprivkey.pem; "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_trusted_certificate "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fchain.pem;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ad},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" proxy_redirect "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"off;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"Host "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"host"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"X-Real-IP "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"remote_addr"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"X-Forwarded-For "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"proxy_add_x_forwarded_for"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" proxy_pass "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"http:\u002F\u002F127.0.0.1:8080;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-5af68c{color:#C9D1D9}.ct-207f57{color:#C9D1D9}.ct-53c2fa{color:#79C0FF}.ct-d5b9b4{color:#FF7B72}.ct-dd96a9{color:#FF7B72}.ct-129576{color:#FFA657}.ct-07132d{color:#FF7B72}.ct-27e5ba{color:#C9D1D9}.ct-af5f1b{color:#8B949E}.ct-f74bf7{color:#C9D1D9}.ct-8e1f14{color:#FF7B72}.light .ct-8e1f14{color:#073642}.light .ct-f74bf7{color:#657B83}.light .ct-af5f1b{color:#93A1A1}.light .ct-27e5ba{color:#657B83}.light .ct-07132d{color:#073642}.light .ct-129576{color:#657B83}.light .ct-dd96a9{color:#657B83}.light .ct-d5b9b4{color:#859900}.light .ct-53c2fa{color:#D33682}.light .ct-207f57{color:#859900}.light .ct-5af68c{color:#268BD2}"}]}],toc:{title:j,searchDepth:r,depth:r,links:[{id:D,depth:r,text:E},{id:G,depth:r,text:H},{id:J,depth:r,text:K}]}},_type:"markdown",_id:"content:Linux:Setting up NGINX.md",_source:"content",_file:"Linux\u002FSetting up NGINX.md",_extension:"md"}},prerenderedAt:1667812498702}}("element","span","text","ct-f74bf7","line","ct-d5b9b4"," ","code","  ","","ct-af5f1b","h2","nginx","pre","code-inline","ct-27e5ba","   ",2,"https:\u002F\u002Fnext.vault48.org","ct-8e1f14","server"," {","# ...","}","ct-207f57","$","ct-5af68c",";",false,"fallback-url-for-spa-s","Fallback url for SPA-s","server {\n  # ...\n  location \u002F {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri\u002F =404;\n  }\n  # ...\n}\n","set-up-for-uploads","Set up for uploads","server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","reverse-proxy-for-https","Reverse proxy for https","server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https:\u002F\u002Fnext.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Ffullchain.pem; \n  ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fprivkey.pem; \n  ssl_trusted_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fchain.pem;\n  \n  server_name next.vault48.org;\n  \n  location \u002F {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http:\u002F\u002F127.0.0.1:8080;\n  }\n}\n","    "," listen "," proxy_set_header ","Setting Up NGINX","\u002Flinux\u002Fsetting-up-nginx","root","p","Given config forwards ","https"," traffic to ","http"," on port ","8080"," for ","a","nofollow","\nwith http2 support if possible.","ct-07132d","location","ct-129576","\u002F ","{","  }"," server_name ","next.vault48.org;"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:P,_path:Q},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-jVEFIZPtgx":{_path:Q,_dir:"linux",_draft:C,_partial:C,_locale:"en",_empty:C,title:P,description:j,excerpt:{type:R,children:[{type:a,tag:l,props:{id:D},children:[{type:c,value:E}]},{type:a,tag:h,props:{code:F,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:F}]}]}]},{type:a,tag:l,props:{id:G},children:[{type:c,value:H}]},{type:a,tag:h,props:{code:I,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:I}]}]}]},{type:a,tag:l,props:{id:J},children:[{type:c,value:K}]},{type:a,tag:S,props:{},children:[{type:c,value:T},{type:a,tag:o,props:{},children:[{type:c,value:U}]},{type:c,value:V},{type:a,tag:o,props:{},children:[{type:c,value:W}]},{type:c,value:X},{type:a,tag:o,props:{},children:[{type:c,value:Y}]},{type:c,value:Z},{type:a,tag:_,props:{href:s,rel:[$]},children:[{type:c,value:s}]},{type:c,value:aa}]},{type:a,tag:h,props:{code:L,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:L}]}]}]}]},body:{type:R,children:[{type:a,tag:l,props:{id:D},children:[{type:c,value:E}]},{type:a,tag:h,props:{code:F,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ad},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# First attempt to serve request as file, then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# as directory, then fall back to displaying a 404."}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:"ct-23016c"},children:[{type:c,value:g}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:l,props:{id:G},children:[{type:c,value:H}]},{type:a,tag:h,props:{code:I,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" client_max_body_size "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"200M;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:l,props:{id:J},children:[{type:c,value:K}]},{type:a,tag:S,props:{},children:[{type:c,value:T},{type:a,tag:o,props:{},children:[{type:c,value:U}]},{type:c,value:V},{type:a,tag:o,props:{},children:[{type:c,value:W}]},{type:c,value:X},{type:a,tag:o,props:{},children:[{type:c,value:Y}]},{type:c,value:Z},{type:a,tag:_,props:{href:s,rel:[$]},children:[{type:c,value:s}]},{type:c,value:aa}]},{type:a,tag:h,props:{code:L,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"80;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"return"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-33f2c5"},children:[{type:c,value:"301"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" https:\u002F\u002Fnext.vault48.org"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"request_uri"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"443 ssl http2;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"[::]:443 ssl http2;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# managed by Certbot"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_certificate "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Ffullchain.pem; "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_certificate_key "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fprivkey.pem; "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_trusted_certificate "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fchain.pem;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ad},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" proxy_redirect "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"off;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"Host "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"host"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"X-Real-IP "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"remote_addr"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"X-Forwarded-For "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"proxy_add_x_forwarded_for"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" proxy_pass "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"http:\u002F\u002F127.0.0.1:8080;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-fcbbc9{color:#C9D1D9}.ct-68f237{color:#C9D1D9}.ct-33f2c5{color:#79C0FF}.ct-a62e3a{color:#FF7B72}.ct-23016c{color:#FF7B72}.ct-aaa72d{color:#FFA657}.ct-b2aa81{color:#FF7B72}.ct-de728c{color:#C9D1D9}.ct-812103{color:#8B949E}.ct-0eeca1{color:#C9D1D9}.ct-1605b4{color:#FF7B72}.light .ct-1605b4{color:#073642}.light .ct-0eeca1{color:#657B83}.light .ct-812103{color:#93A1A1}.light .ct-de728c{color:#657B83}.light .ct-b2aa81{color:#073642}.light .ct-aaa72d{color:#657B83}.light .ct-23016c{color:#657B83}.light .ct-a62e3a{color:#859900}.light .ct-33f2c5{color:#D33682}.light .ct-68f237{color:#859900}.light .ct-fcbbc9{color:#268BD2}"}]}],toc:{title:j,searchDepth:r,depth:r,links:[{id:D,depth:r,text:E},{id:G,depth:r,text:H},{id:J,depth:r,text:K}]}},_type:"markdown",_id:"content:Linux:Setting up NGINX.md",_source:"content",_file:"Linux\u002FSetting up NGINX.md",_extension:"md"}},prerenderedAt:1667813360801}}("element","span","text","ct-0eeca1","line","ct-a62e3a"," ","code","  ","","ct-812103","h2","nginx","pre","code-inline","ct-de728c","   ",2,"https:\u002F\u002Fnext.vault48.org","ct-1605b4","server"," {","# ...","}","ct-68f237","$","ct-fcbbc9",";",false,"fallback-url-for-spa-s","Fallback url for SPA-s","server {\n  # ...\n  location \u002F {\n    # First attempt to serve request as file, then\n    # as directory, then fall back to displaying a 404.\n    try_files $uri $uri\u002F =404;\n  }\n  # ...\n}\n","set-up-for-uploads","Set up for uploads","server {\n  # ...\n  client_max_body_size 200M;\n  # ...\n}\n","reverse-proxy-for-https","Reverse proxy for https","server {\n  listen 80;\n  server_name next.vault48.org;\n  return 301 https:\u002F\u002Fnext.vault48.org$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  \n  # managed by Certbot\n  ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Ffullchain.pem; \n  ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fprivkey.pem; \n  ssl_trusted_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fchain.pem;\n  \n  server_name next.vault48.org;\n  \n  location \u002F {\n    proxy_redirect off;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    \n    proxy_pass http:\u002F\u002F127.0.0.1:8080;\n  }\n}\n","    "," listen "," proxy_set_header ","Setting Up NGINX","\u002Flinux\u002Fsetting-up-nginx","root","p","Given config forwards ","https"," traffic to ","http"," on port ","8080"," for ","a","nofollow","\nwith http2 support if possible.","ct-b2aa81","location","ct-aaa72d","\u002F ","{","  }"," server_name ","next.vault48.org;"))
\ No newline at end of file
diff --git a/linux/setting-up-nginx/index.html b/linux/setting-up-nginx/index.html
index 56c6ac4..cbb2e2d 100644
--- a/linux/setting-up-nginx/index.html
+++ b/linux/setting-up-nginx/index.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Setting Up NGINX • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/linux/setting-up-nginx/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Setting Up NGINX • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/linux/setting-up-nginx/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/setting-up-nginx" class="router-link-active _active_192pu_81 _link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Setting Up NGINX</h1><article><div><h2 id="fallback-url-for-spa-s"><a href="#fallback-url-for-spa-s"><!--[-->Fallback url for SPA-s<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-8e1f14">server</span><span class="ct-f74bf7"> {</span></span><span class="line"><span class="ct-f74bf7">  </span><span class="ct-af5f1b"># ...</span></span><span class="line"><span class="ct-27e5ba">  </span><span class="ct-07132d">location</span><span class="ct-27e5ba"> </span><span class="ct-129576">/ </span><span class="ct-27e5ba">{</span></span><span class="line"><span class="ct-f74bf7">    </span><span class="ct-af5f1b"># First attempt to serve request as file, then</span></span><span class="line"><span class="ct-f74bf7">    </span><span class="ct-af5f1b"># as directory, then fall back to displaying a 404.</span></span><span class="line"><span class="ct-f74bf7">   </span><span class="ct-dd96a9"> </span></span><span class="line"><span class="ct-f74bf7">  }</span></span><span class="line"><span class="ct-f74bf7">  </span><span class="ct-af5f1b"># ...</span></span><span class="line"><span class="ct-f74bf7">}</span></span></code></pre><!--]--></div><h2 id="set-up-for-uploads"><a href="#set-up-for-uploads"><!--[-->Set up for uploads<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-8e1f14">server</span><span class="ct-f74bf7"> {</span></span><span class="line"><span class="ct-f74bf7">  </span><span class="ct-af5f1b"># ...</span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> client_max_body_size </span><span class="ct-f74bf7">200M;</span></span><span class="line"><span class="ct-f74bf7">  </span><span class="ct-af5f1b"># ...</span></span><span class="line"><span class="ct-f74bf7">}</span></span></code></pre><!--]--></div><h2 id="reverse-proxy-for-https"><a href="#reverse-proxy-for-https"><!--[-->Reverse proxy for https<!--]--></a></h2><p><!--[-->Given config forwards <code><!--[-->https<!--]--></code> traffic to <code><!--[-->http<!--]--></code> on port <code><!--[-->8080<!--]--></code> for <a href="https://next.vault48.org" rel="nofollow" target="_blank"><!--[-->https://next.vault48.org<!--]--></a>
-with http2 support if possible.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-8e1f14">server</span><span class="ct-f74bf7"> {</span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> listen </span><span class="ct-f74bf7">80;</span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> server_name </span><span class="ct-f74bf7">next.vault48.org;</span></span><span class="line"><span class="ct-f74bf7">  </span><span class="ct-d5b9b4">return</span><span class="ct-f74bf7"> </span><span class="ct-53c2fa">301</span><span class="ct-f74bf7"> https://next.vault48.org</span><span class="ct-207f57">$</span><span class="ct-5af68c">request_uri</span><span class="ct-f74bf7">;</span></span><span class="line"><span class="ct-f74bf7">}</span></span><span class="line"></span><span class="line"><span class="ct-8e1f14">server</span><span class="ct-f74bf7"> {</span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> listen </span><span class="ct-f74bf7">443 ssl http2;</span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> listen </span><span class="ct-f74bf7">[::]:443 ssl http2;</span></span><span class="line"><span class="ct-f74bf7">  </span></span><span class="line"><span class="ct-f74bf7">  </span><span class="ct-af5f1b"># managed by Certbot</span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> ssl_certificate </span><span class="ct-f74bf7">/etc/letsencrypt/live/vault48.org/fullchain.pem; </span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> ssl_certificate_key </span><span class="ct-f74bf7">/etc/letsencrypt/live/vault48.org/privkey.pem; </span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> ssl_trusted_certificate </span><span class="ct-f74bf7">/etc/letsencrypt/live/vault48.org/chain.pem;</span></span><span class="line"><span class="ct-f74bf7">  </span></span><span class="line"><span class="ct-f74bf7"> </span><span class="ct-d5b9b4"> server_name </span><span class="ct-f74bf7">next.vault48.org;</span></span><span class="line"><span class="ct-f74bf7">  </span></span><span class="line"><span class="ct-27e5ba">  </span><span class="ct-07132d">location</span><span class="ct-27e5ba"> </span><span class="ct-129576">/ </span><span class="ct-27e5ba">{</span></span><span class="line"><span class="ct-f74bf7">   </span><span class="ct-d5b9b4"> proxy_redirect </span><span class="ct-f74bf7">off;</span></span><span class="line"><span class="ct-f74bf7">   </span><span class="ct-d5b9b4"> proxy_set_header </span><span class="ct-f74bf7">Host </span><span class="ct-207f57">$</span><span class="ct-5af68c">host</span><span class="ct-f74bf7">;</span></span><span class="line"><span class="ct-f74bf7">   </span><span class="ct-d5b9b4"> proxy_set_header </span><span class="ct-f74bf7">X-Real-IP </span><span class="ct-207f57">$</span><span class="ct-5af68c">remote_addr</span><span class="ct-f74bf7">;</span></span><span class="line"><span class="ct-f74bf7">   </span><span class="ct-d5b9b4"> proxy_set_header </span><span class="ct-f74bf7">X-Forwarded-For </span><span class="ct-207f57">$</span><span class="ct-5af68c">proxy_add_x_forwarded_for</span><span class="ct-f74bf7">;</span></span><span class="line"><span class="ct-f74bf7">    </span></span><span class="line"><span class="ct-f74bf7">   </span><span class="ct-d5b9b4"> proxy_pass </span><span class="ct-f74bf7">http://127.0.0.1:8080;</span></span><span class="line"><span class="ct-f74bf7">  }</span></span><span class="line"><span class="ct-f74bf7">}</span></span></code></pre><!--]--></div><style>.ct-5af68c{color:#C9D1D9}.ct-207f57{color:#C9D1D9}.ct-53c2fa{color:#79C0FF}.ct-d5b9b4{color:#FF7B72}.ct-dd96a9{color:#FF7B72}.ct-129576{color:#FFA657}.ct-07132d{color:#FF7B72}.ct-27e5ba{color:#C9D1D9}.ct-af5f1b{color:#8B949E}.ct-f74bf7{color:#C9D1D9}.ct-8e1f14{color:#FF7B72}.light .ct-8e1f14{color:#073642}.light .ct-f74bf7{color:#657B83}.light .ct-af5f1b{color:#93A1A1}.light .ct-27e5ba{color:#657B83}.light .ct-07132d{color:#073642}.light .ct-129576{color:#657B83}.light .ct-dd96a9{color:#657B83}.light .ct-d5b9b4{color:#859900}.light .ct-53c2fa{color:#D33682}.light .ct-207f57{color:#859900}.light .ct-5af68c{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/setting-up-nginx/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498702}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/setting-up-nginx" class="router-link-active _active_192pu_81 _link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Setting Up NGINX</h1><article><div><h2 id="fallback-url-for-spa-s"><a href="#fallback-url-for-spa-s"><!--[-->Fallback url for SPA-s<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-1605b4">server</span><span class="ct-0eeca1"> {</span></span><span class="line"><span class="ct-0eeca1">  </span><span class="ct-812103"># ...</span></span><span class="line"><span class="ct-de728c">  </span><span class="ct-b2aa81">location</span><span class="ct-de728c"> </span><span class="ct-aaa72d">/ </span><span class="ct-de728c">{</span></span><span class="line"><span class="ct-0eeca1">    </span><span class="ct-812103"># First attempt to serve request as file, then</span></span><span class="line"><span class="ct-0eeca1">    </span><span class="ct-812103"># as directory, then fall back to displaying a 404.</span></span><span class="line"><span class="ct-0eeca1">   </span><span class="ct-23016c"> </span></span><span class="line"><span class="ct-0eeca1">  }</span></span><span class="line"><span class="ct-0eeca1">  </span><span class="ct-812103"># ...</span></span><span class="line"><span class="ct-0eeca1">}</span></span></code></pre><!--]--></div><h2 id="set-up-for-uploads"><a href="#set-up-for-uploads"><!--[-->Set up for uploads<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-1605b4">server</span><span class="ct-0eeca1"> {</span></span><span class="line"><span class="ct-0eeca1">  </span><span class="ct-812103"># ...</span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> client_max_body_size </span><span class="ct-0eeca1">200M;</span></span><span class="line"><span class="ct-0eeca1">  </span><span class="ct-812103"># ...</span></span><span class="line"><span class="ct-0eeca1">}</span></span></code></pre><!--]--></div><h2 id="reverse-proxy-for-https"><a href="#reverse-proxy-for-https"><!--[-->Reverse proxy for https<!--]--></a></h2><p><!--[-->Given config forwards <code><!--[-->https<!--]--></code> traffic to <code><!--[-->http<!--]--></code> on port <code><!--[-->8080<!--]--></code> for <a href="https://next.vault48.org" rel="nofollow" target="_blank"><!--[-->https://next.vault48.org<!--]--></a>
+with http2 support if possible.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-1605b4">server</span><span class="ct-0eeca1"> {</span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> listen </span><span class="ct-0eeca1">80;</span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> server_name </span><span class="ct-0eeca1">next.vault48.org;</span></span><span class="line"><span class="ct-0eeca1">  </span><span class="ct-a62e3a">return</span><span class="ct-0eeca1"> </span><span class="ct-33f2c5">301</span><span class="ct-0eeca1"> https://next.vault48.org</span><span class="ct-68f237">$</span><span class="ct-fcbbc9">request_uri</span><span class="ct-0eeca1">;</span></span><span class="line"><span class="ct-0eeca1">}</span></span><span class="line"></span><span class="line"><span class="ct-1605b4">server</span><span class="ct-0eeca1"> {</span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> listen </span><span class="ct-0eeca1">443 ssl http2;</span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> listen </span><span class="ct-0eeca1">[::]:443 ssl http2;</span></span><span class="line"><span class="ct-0eeca1">  </span></span><span class="line"><span class="ct-0eeca1">  </span><span class="ct-812103"># managed by Certbot</span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> ssl_certificate </span><span class="ct-0eeca1">/etc/letsencrypt/live/vault48.org/fullchain.pem; </span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> ssl_certificate_key </span><span class="ct-0eeca1">/etc/letsencrypt/live/vault48.org/privkey.pem; </span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> ssl_trusted_certificate </span><span class="ct-0eeca1">/etc/letsencrypt/live/vault48.org/chain.pem;</span></span><span class="line"><span class="ct-0eeca1">  </span></span><span class="line"><span class="ct-0eeca1"> </span><span class="ct-a62e3a"> server_name </span><span class="ct-0eeca1">next.vault48.org;</span></span><span class="line"><span class="ct-0eeca1">  </span></span><span class="line"><span class="ct-de728c">  </span><span class="ct-b2aa81">location</span><span class="ct-de728c"> </span><span class="ct-aaa72d">/ </span><span class="ct-de728c">{</span></span><span class="line"><span class="ct-0eeca1">   </span><span class="ct-a62e3a"> proxy_redirect </span><span class="ct-0eeca1">off;</span></span><span class="line"><span class="ct-0eeca1">   </span><span class="ct-a62e3a"> proxy_set_header </span><span class="ct-0eeca1">Host </span><span class="ct-68f237">$</span><span class="ct-fcbbc9">host</span><span class="ct-0eeca1">;</span></span><span class="line"><span class="ct-0eeca1">   </span><span class="ct-a62e3a"> proxy_set_header </span><span class="ct-0eeca1">X-Real-IP </span><span class="ct-68f237">$</span><span class="ct-fcbbc9">remote_addr</span><span class="ct-0eeca1">;</span></span><span class="line"><span class="ct-0eeca1">   </span><span class="ct-a62e3a"> proxy_set_header </span><span class="ct-0eeca1">X-Forwarded-For </span><span class="ct-68f237">$</span><span class="ct-fcbbc9">proxy_add_x_forwarded_for</span><span class="ct-0eeca1">;</span></span><span class="line"><span class="ct-0eeca1">    </span></span><span class="line"><span class="ct-0eeca1">   </span><span class="ct-a62e3a"> proxy_pass </span><span class="ct-0eeca1">http://127.0.0.1:8080;</span></span><span class="line"><span class="ct-0eeca1">  }</span></span><span class="line"><span class="ct-0eeca1">}</span></span></code></pre><!--]--></div><style>.ct-fcbbc9{color:#C9D1D9}.ct-68f237{color:#C9D1D9}.ct-33f2c5{color:#79C0FF}.ct-a62e3a{color:#FF7B72}.ct-23016c{color:#FF7B72}.ct-aaa72d{color:#FFA657}.ct-b2aa81{color:#FF7B72}.ct-de728c{color:#C9D1D9}.ct-812103{color:#8B949E}.ct-0eeca1{color:#C9D1D9}.ct-1605b4{color:#FF7B72}.light .ct-1605b4{color:#073642}.light .ct-0eeca1{color:#657B83}.light .ct-812103{color:#93A1A1}.light .ct-de728c{color:#657B83}.light .ct-b2aa81{color:#073642}.light .ct-aaa72d{color:#657B83}.light .ct-23016c{color:#657B83}.light .ct-a62e3a{color:#859900}.light .ct-33f2c5{color:#D33682}.light .ct-68f237{color:#859900}.light .ct-fcbbc9{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/setting-up-nginx/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360801}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/linux/ssh/_payload.js b/linux/ssh/_payload.js
index c67377f..39b51d3 100644
--- a/linux/ssh/_payload.js
+++ b/linux/ssh/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:k,_path:l}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-501XFnutIe":{_path:l,_dir:"linux",_draft:f,_partial:f,_locale:"en",_empty:f,title:k,description:c,excerpt:{type:m,children:[{type:a,tag:n,props:{id:g},children:[{type:b,value:h}]},{type:a,tag:o,props:{},children:[{type:b,value:p},{type:a,tag:d,props:{},children:[{type:b,value:q}]},{type:b,value:r},{type:a,tag:d,props:{},children:[{type:b,value:s}]},{type:b,value:t}]},{type:a,tag:e,props:{code:i},children:[{type:a,tag:u,props:{},children:[{type:a,tag:e,props:{__ignoreMap:c},children:[{type:b,value:i}]}]}]}]},body:{type:m,children:[{type:a,tag:n,props:{id:g},children:[{type:b,value:h}]},{type:a,tag:o,props:{},children:[{type:b,value:p},{type:a,tag:d,props:{},children:[{type:b,value:q}]},{type:b,value:r},{type:a,tag:d,props:{},children:[{type:b,value:s}]},{type:b,value:t}]},{type:a,tag:e,props:{code:i},children:[{type:a,tag:u,props:{},children:[{type:a,tag:e,props:{__ignoreMap:c},children:[{type:a,tag:v,props:{class:"line"},children:[{type:a,tag:v,props:{},children:[{type:b,value:"Host router\n    HostName 192.168.0.1\n    IdentityFile ~\u002F.ssh\u002Fid_rsa\n    User root\n    Port 22522"}]}]}]}]}]}],toc:{title:c,searchDepth:j,depth:j,links:[{id:g,depth:j,text:h}]}},_type:"markdown",_id:"content:Linux:SSH.md",_source:"content",_file:"Linux\u002FSSH.md",_extension:"md"}},prerenderedAt:1667812498755}}("element","text","","code-inline","code",false,"config-aliases-for-ssh-hosts","Config aliases for #SSH hosts","Host router\n    HostName 192.168.0.1\n    IdentityFile ~\u002F.ssh\u002Fid_rsa\n    User root\n    Port 22522\n",2,"SSH","\u002Flinux\u002Fssh","root","h2","p","#SSH config can be used to made aliases for different hosts. Should be put at ","~\u002F.ssh\u002Fconfig",". To simply call ","ssh router"," without parameters, use this:","pre","span"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:k,_path:l}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-501XFnutIe":{_path:l,_dir:"linux",_draft:f,_partial:f,_locale:"en",_empty:f,title:k,description:c,excerpt:{type:m,children:[{type:a,tag:n,props:{id:g},children:[{type:b,value:h}]},{type:a,tag:o,props:{},children:[{type:b,value:p},{type:a,tag:d,props:{},children:[{type:b,value:q}]},{type:b,value:r},{type:a,tag:d,props:{},children:[{type:b,value:s}]},{type:b,value:t}]},{type:a,tag:e,props:{code:i},children:[{type:a,tag:u,props:{},children:[{type:a,tag:e,props:{__ignoreMap:c},children:[{type:b,value:i}]}]}]}]},body:{type:m,children:[{type:a,tag:n,props:{id:g},children:[{type:b,value:h}]},{type:a,tag:o,props:{},children:[{type:b,value:p},{type:a,tag:d,props:{},children:[{type:b,value:q}]},{type:b,value:r},{type:a,tag:d,props:{},children:[{type:b,value:s}]},{type:b,value:t}]},{type:a,tag:e,props:{code:i},children:[{type:a,tag:u,props:{},children:[{type:a,tag:e,props:{__ignoreMap:c},children:[{type:a,tag:v,props:{class:"line"},children:[{type:a,tag:v,props:{},children:[{type:b,value:"Host router\n    HostName 192.168.0.1\n    IdentityFile ~\u002F.ssh\u002Fid_rsa\n    User root\n    Port 22522"}]}]}]}]}]}],toc:{title:c,searchDepth:j,depth:j,links:[{id:g,depth:j,text:h}]}},_type:"markdown",_id:"content:Linux:SSH.md",_source:"content",_file:"Linux\u002FSSH.md",_extension:"md"}},prerenderedAt:1667813360847}}("element","text","","code-inline","code",false,"config-aliases-for-ssh-hosts","Config aliases for #SSH hosts","Host router\n    HostName 192.168.0.1\n    IdentityFile ~\u002F.ssh\u002Fid_rsa\n    User root\n    Port 22522\n",2,"SSH","\u002Flinux\u002Fssh","root","h2","p","#SSH config can be used to made aliases for different hosts. Should be put at ","~\u002F.ssh\u002Fconfig",". To simply call ","ssh router"," without parameters, use this:","pre","span"))
\ No newline at end of file
diff --git a/linux/ssh/index.html b/linux/ssh/index.html
index 0e08eac..6af379e 100644
--- a/linux/ssh/index.html
+++ b/linux/ssh/index.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>SSH • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/linux/ssh/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>SSH • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/linux/ssh/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
 <body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a aria-current="page" href="/linux/ssh" class="router-link-active _active_192pu_81 _link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>SSH</h1><article><div><h2 id="config-aliases-for-ssh-hosts"><a href="#config-aliases-for-ssh-hosts"><!--[-->Config aliases for #SSH hosts<!--]--></a></h2><p><!--[-->#SSH config can be used to made aliases for different hosts. Should be put at <code><!--[-->~/.ssh/config<!--]--></code>. To simply call <code><!--[-->ssh router<!--]--></code> without parameters, use this:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><!----></button><!--[--><pre><code><span class="line"><span>Host router
     HostName 192.168.0.1
     IdentityFile ~/.ssh/id_rsa
     User root
-    Port 22522</span></span></code></pre><!--]--></div></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/ssh/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498755}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+    Port 22522</span></span></code></pre><!--]--></div></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/linux/ssh/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360847}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/nuxt/ArrowRight.4c99b7f0.js b/nuxt/ArrowRight.5a505e4f.js
similarity index 81%
rename from nuxt/ArrowRight.4c99b7f0.js
rename to nuxt/ArrowRight.5a505e4f.js
index e0bfa41..c4cd00f 100644
--- a/nuxt/ArrowRight.4c99b7f0.js
+++ b/nuxt/ArrowRight.5a505e4f.js
@@ -1 +1 @@
-import{k as e,o as t,e as o,f as s}from"./entry.f8ff8132.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{d:"m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"},null,-1),r=[c];function a(h,d){return t(),o("svg",_,r)}const l=e(n,[["render",a]]);export{l as default};
+import{k as e,o as t,e as o,f as s}from"./entry.67e3e390.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{d:"m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"},null,-1),r=[c];function a(h,d){return t(),o("svg",_,r)}const l=e(n,[["render",a]]);export{l as default};
diff --git a/nuxt/BioCareer.96a55a4c.js b/nuxt/BioCareer.79116453.js
similarity index 66%
rename from nuxt/BioCareer.96a55a4c.js
rename to nuxt/BioCareer.79116453.js
index 5bd6008..1e71d4b 100644
--- a/nuxt/BioCareer.96a55a4c.js
+++ b/nuxt/BioCareer.79116453.js
@@ -1 +1 @@
-import{k as e,o,e as t,f as n}from"./entry.f8ff8132.js";const c={},_=n("h2",null,"Career",-1),s=[_];function r(a,l){return o(),t("div",null,s)}const f=e(c,[["render",r]]);export{f as default};
+import{k as e,o,e as t,f as n}from"./entry.67e3e390.js";const c={},_=n("h2",null,"Career",-1),s=[_];function r(a,l){return o(),t("div",null,s)}const f=e(c,[["render",r]]);export{f as default};
diff --git a/nuxt/BioHeading.40d2dead.js b/nuxt/BioHeading.40d2dead.js
new file mode 100644
index 0000000..0e9671c
--- /dev/null
+++ b/nuxt/BioHeading.40d2dead.js
@@ -0,0 +1 @@
+import{k as t,o as a,e as r,f as e,h as o,V as c,W as n}from"./entry.67e3e390.js";const l=""+new URL("howdy.386ec27b.svg",import.meta.url).href,d={},i=e("div",null,[e("img",{src:l})],-1),_=n("<h1>Howdy!</h1><p> My name is <b>Fedor Katurov</b>, I&#39;m a fullstack developer from Siberia. </p><p> I develop frontend applications with <b>React</b>, <b>Vue</b> and numerous other frameworks for the most of my time, but I&#39;m also capable of doing <b>Typescript</b> and <b>Golang</b> backend. </p>",3),m=[_];function p(s,f){return a(),r("div",{class:o(s.$style.grid)},[i,e("div",{class:o(s.$style.text)},m,2)],2)}const b={$style:c},h=t(d,[["render",p],["__cssModules",b]]);export{h as default};
diff --git a/nuxt/BioHeading.fc552931.js b/nuxt/BioHeading.fc552931.js
deleted file mode 100644
index 5b832f5..0000000
--- a/nuxt/BioHeading.fc552931.js
+++ /dev/null
@@ -1 +0,0 @@
-import{k as t,o as a,e as r,f as e,h as o,V as n,W as c}from"./entry.f8ff8132.js";const l=""+new URL("howdy.824e8e62.svg",import.meta.url).href,d={},i=e("div",null,[e("img",{src:l})],-1),_=c("<h1>Howdy!</h1><p> My name is <b>Fedor Katurov</b>, I&#39;m a fullstack developer from Siberia. </p><p> I develop frontend applications with <b>React</b>, <b>Vue</b> and numerous other frameworks for the most of my time, but I&#39;m also capable of doing <b>Typescript</b> and <b>Golang</b> backend. </p>",3),m=[_];function p(s,b){return a(),r("div",{class:o(s.$style.grid)},[i,e("div",{class:o(s.$style.text)},m,2)],2)}const f={$style:n},h=t(d,[["render",p],["__cssModules",f]]);export{h as default};
diff --git a/nuxt/BioProjectCard.4bb88134.js b/nuxt/BioProjectCard.168802cd.js
similarity index 81%
rename from nuxt/BioProjectCard.4bb88134.js
rename to nuxt/BioProjectCard.168802cd.js
index 55ea294..e1cf739 100644
--- a/nuxt/BioProjectCard.4bb88134.js
+++ b/nuxt/BioProjectCard.168802cd.js
@@ -1 +1 @@
-import{a as _,o as f,c as h,w as s,f as e,h as n,t as a,i as l,T as i,b as p,k as y,a1 as $}from"./entry.f8ff8132.js";import g from"./IconsCode.51acf16d.js";import v from"./UiActionButton.8de8506c.js";import C from"./ArrowRight.4c99b7f0.js";import k from"./UiCard.fe784af1.js";const b=["src","alt"],w=_({__name:"BioProjectCard",props:{name:null,description:null,url:null,source:null,image:null},setup(o){return(t,B)=>{const r=p,u=g,c=v,m=C,d=k;return f(),h(d,null,{default:s(()=>[e("div",{class:n(t.$style.card)},[e("div",{class:n(t.$style.thumbnail)},[e("img",{src:o.image,class:n(t.$style.image),alt:o.name},null,10,b)],2),e("div",{class:n(t.$style.content)},[e("div",{class:n(t.$style.head)},[e("h3",{class:n(t.$style.title)},a(o.name),3),e("div",{class:n(t.$style.url)},[l(r,{to:o.url},{default:s(()=>[i(a(o.url),1)]),_:1},8,["to"])],2)],2),e("div",{class:n(t.$style.description)},a(o.description),3)],2),e("div",{class:n(t.$style.buttons)},[l(c,{href:o.source,variant:"outline",_target:"blank"},{suffix:s(()=>[l(u,{width:"22",height:"22",fill:"currentColor"})]),default:s(()=>[i(" Source Code ")]),_:1},8,["href"]),l(c,{href:o.url,variant:"outline",_target:"blank"},{suffix:s(()=>[l(m,{width:"22",height:"22",fill:"currentColor"})]),default:s(()=>[i(" Visit ")]),_:1},8,["href"])],2)],2)]),_:1})}}}),x={$style:$},S=y(w,[["__cssModules",x]]);export{S as default};
+import{a as _,o as f,c as h,w as s,f as e,h as n,t as a,i as l,T as i,b as p,k as y,a1 as $}from"./entry.67e3e390.js";import g from"./IconsCode.118b44a8.js";import v from"./UiActionButton.d5ab622f.js";import C from"./ArrowRight.5a505e4f.js";import k from"./UiCard.c1974320.js";const b=["src","alt"],w=_({__name:"BioProjectCard",props:{name:null,description:null,url:null,source:null,image:null},setup(o){return(t,B)=>{const r=p,u=g,c=v,m=C,d=k;return f(),h(d,null,{default:s(()=>[e("div",{class:n(t.$style.card)},[e("div",{class:n(t.$style.thumbnail)},[e("img",{src:o.image,class:n(t.$style.image),alt:o.name},null,10,b)],2),e("div",{class:n(t.$style.content)},[e("div",{class:n(t.$style.head)},[e("h3",{class:n(t.$style.title)},a(o.name),3),e("div",{class:n(t.$style.url)},[l(r,{to:o.url},{default:s(()=>[i(a(o.url),1)]),_:1},8,["to"])],2)],2),e("div",{class:n(t.$style.description)},a(o.description),3)],2),e("div",{class:n(t.$style.buttons)},[l(c,{href:o.source,variant:"outline",_target:"blank"},{suffix:s(()=>[l(u,{width:"22",height:"22",fill:"currentColor"})]),default:s(()=>[i(" Source Code ")]),_:1},8,["href"]),l(c,{href:o.url,variant:"outline",_target:"blank"},{suffix:s(()=>[l(m,{width:"22",height:"22",fill:"currentColor"})]),default:s(()=>[i(" Visit ")]),_:1},8,["href"])],2)],2)]),_:1})}}}),x={$style:$},S=y(w,[["__cssModules",x]]);export{S as default};
diff --git a/nuxt/BioProjects.9611713f.js b/nuxt/BioProjects.7d47d393.js
similarity index 65%
rename from nuxt/BioProjects.9611713f.js
rename to nuxt/BioProjects.7d47d393.js
index bd390c6..0a48599 100644
--- a/nuxt/BioProjects.9611713f.js
+++ b/nuxt/BioProjects.7d47d393.js
@@ -1 +1 @@
-import c from"./BioProjectCard.4bb88134.js";import{a as i,o as s,e as t,f as r,R as l,S as m,c as _,u,h as n,Z as p,k as d,$ as f}from"./entry.f8ff8132.js";import"./IconsCode.51acf16d.js";import"./UiActionButton.8de8506c.js";import"./ArrowRight.4c99b7f0.js";import"./UiCard.fe784af1.js";const g=r("h2",null,"Pet Projects",-1),B=i({__name:"BioProjects",setup(y){return(o,h)=>{const a=c;return s(),t("div",{class:n(o.$style.projects)},[g,r("div",{class:n(o.$style.grid)},[(s(!0),t(l,null,m(u(p),e=>(s(),_(a,{key:e.name,name:e.name,description:e.description,url:e.pageUrl,source:e.codeUrl,image:e.image},null,8,["name","description","url","source","image"]))),128))],2)],2)}}}),k={$style:f},U=d(B,[["__cssModules",k]]);export{U as default};
+import c from"./BioProjectCard.168802cd.js";import{a as i,o as s,e as t,f as r,R as l,S as m,c as _,u,h as n,Z as p,k as d,$ as f}from"./entry.67e3e390.js";import"./IconsCode.118b44a8.js";import"./UiActionButton.d5ab622f.js";import"./ArrowRight.5a505e4f.js";import"./UiCard.c1974320.js";const g=r("h2",null,"Pet Projects",-1),B=i({__name:"BioProjects",setup(y){return(o,h)=>{const a=c;return s(),t("div",{class:n(o.$style.projects)},[g,r("div",{class:n(o.$style.grid)},[(s(!0),t(l,null,m(u(p),e=>(s(),_(a,{key:e.name,name:e.name,description:e.description,url:e.pageUrl,source:e.codeUrl,image:e.image},null,8,["name","description","url","source","image"]))),128))],2)],2)}}}),k={$style:f},U=d(B,[["__cssModules",k]]);export{U as default};
diff --git a/nuxt/BioSkills.1cbb9b74.js b/nuxt/BioSkills.7301a037.js
similarity index 73%
rename from nuxt/BioSkills.1cbb9b74.js
rename to nuxt/BioSkills.7301a037.js
index 28f7ed8..ca25a61 100644
--- a/nuxt/BioSkills.1cbb9b74.js
+++ b/nuxt/BioSkills.7301a037.js
@@ -1 +1 @@
-import r from"./BioSkillsCard.dcf6f14b.js";import{a,o as t,e as n,f as s,R as c,S as _,c as p,w as m,u,h as d,X as f,k as h,Y as B}from"./entry.f8ff8132.js";import"./UiStars.0b5a97ee.js";import"./IconStar.c0f2126f.js";import"./UiCard.fe784af1.js";const k=s("h2",null,"Skills",-1),v=["src"],x=a({__name:"BioSkills",setup(C){return(l,S)=>{const i=r;return t(),n("div",null,[k,s("div",{class:d(l.$style.list)},[(t(!0),n(c,null,_(u(f),e=>{var o;return t(),p(i,{title:e.title,level:e.level,description:(o=e.description)!=null?o:"",key:e.title},{default:m(()=>[s("img",{src:e.icon,width:"48",height:"48"},null,8,v)]),_:2},1032,["title","level","description"])}),128))],2)])}}}),y={$style:B},E=h(x,[["__cssModules",y]]);export{E as default};
+import r from"./BioSkillsCard.24be210d.js";import{a,o as t,e as n,f as s,R as c,S as _,c as p,w as m,u,h as d,X as f,k as h,Y as B}from"./entry.67e3e390.js";import"./UiStars.ad96952a.js";import"./IconStar.67abd07c.js";import"./UiCard.c1974320.js";const k=s("h2",null,"Skills",-1),v=["src"],x=a({__name:"BioSkills",setup(C){return(l,S)=>{const i=r;return t(),n("div",null,[k,s("div",{class:d(l.$style.list)},[(t(!0),n(c,null,_(u(f),e=>{var o;return t(),p(i,{title:e.title,level:e.level,description:(o=e.description)!=null?o:"",key:e.title},{default:m(()=>[s("img",{src:e.icon,width:"48",height:"48"},null,8,v)]),_:2},1032,["title","level","description"])}),128))],2)])}}}),y={$style:B},E=h(x,[["__cssModules",y]]);export{E as default};
diff --git a/nuxt/BioSkillsCard.dcf6f14b.js b/nuxt/BioSkillsCard.24be210d.js
similarity index 64%
rename from nuxt/BioSkillsCard.dcf6f14b.js
rename to nuxt/BioSkillsCard.24be210d.js
index f914d5c..9511f2b 100644
--- a/nuxt/BioSkillsCard.dcf6f14b.js
+++ b/nuxt/BioSkillsCard.24be210d.js
@@ -1 +1 @@
-import i from"./UiStars.0b5a97ee.js";import c from"./UiCard.fe784af1.js";import{a as r,o as d,c as u,w as _,f as t,h as e,r as m,t as l,i as p,k as f,a0 as y}from"./entry.f8ff8132.js";import"./IconStar.c0f2126f.js";const $=r({__name:"BioSkillsCard",props:{title:null,description:null,level:null},setup(o){return(s,C)=>{const n=i,a=c;return d(),u(a,null,{default:_(()=>[t("div",{class:e(s.$style.grid)},[t("div",{class:e(s.$style.icon)},[m(s.$slots,"default")],2),t("div",{class:e(s.$style.text)},[t("h3",{class:e(s.$style.title)},l(o.title),3),p(n,{count:o.level},null,8,["count"])],2)],2),t("div",{class:e(s.$style.description)},l(o.description),3)]),_:3})}}}),v={$style:y},g=f($,[["__cssModules",v]]);export{g as default};
+import i from"./UiStars.ad96952a.js";import c from"./UiCard.c1974320.js";import{a as r,o as d,c as u,w as _,f as t,h as e,r as m,t as l,i as p,k as f,a0 as y}from"./entry.67e3e390.js";import"./IconStar.67abd07c.js";const $=r({__name:"BioSkillsCard",props:{title:null,description:null,level:null},setup(o){return(s,C)=>{const n=i,a=c;return d(),u(a,null,{default:_(()=>[t("div",{class:e(s.$style.grid)},[t("div",{class:e(s.$style.icon)},[m(s.$slots,"default")],2),t("div",{class:e(s.$style.text)},[t("h3",{class:e(s.$style.title)},l(o.title),3),p(n,{count:o.level},null,8,["count"])],2)],2),t("div",{class:e(s.$style.description)},l(o.description),3)]),_:3})}}}),v={$style:y},g=f($,[["__cssModules",v]]);export{g as default};
diff --git a/nuxt/ContentList.4822352c.js b/nuxt/ContentList.9cb0e4d7.js
similarity index 92%
rename from nuxt/ContentList.4822352c.js
rename to nuxt/ContentList.9cb0e4d7.js
index 7bc43a8..f30c2e7 100644
--- a/nuxt/ContentList.4822352c.js
+++ b/nuxt/ContentList.9cb0e4d7.js
@@ -1 +1 @@
-import{a as i,l as m,m as f,p as c}from"./entry.f8ff8132.js";const l=i({name:"ContentList",props:{path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0}},render(o){const e=m(),{path:p,query:a}=o,r={...a||{},path:p||(a==null?void 0:a.path)||"/"},u=(t,n)=>f("pre",null,JSON.stringify({message:"You should use slots with <ContentList>",slot:t,data:n},null,2));return f(c,r,{default:e!=null&&e.default?({data:t,refresh:n,isPartial:d})=>e==null?void 0:e.default({list:t,refresh:n,isPartial:d,...this.$attrs}):({data:t})=>u("default",t),empty:t=>e!=null&&e.empty?e.empty(t):({data:n})=>u("default",n),"not-found":t=>{var n;return e!=null&&e["not-found"]?(n=e==null?void 0:e["not-found"])==null?void 0:n.call(e,t):({data:d})=>u("not-found",d)}})}});export{l as default};
+import{a as i,l as m,m as f,p as c}from"./entry.67e3e390.js";const l=i({name:"ContentList",props:{path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0}},render(o){const e=m(),{path:p,query:a}=o,r={...a||{},path:p||(a==null?void 0:a.path)||"/"},u=(t,n)=>f("pre",null,JSON.stringify({message:"You should use slots with <ContentList>",slot:t,data:n},null,2));return f(c,r,{default:e!=null&&e.default?({data:t,refresh:n,isPartial:d})=>e==null?void 0:e.default({list:t,refresh:n,isPartial:d,...this.$attrs}):({data:t})=>u("default",t),empty:t=>e!=null&&e.empty?e.empty(t):({data:n})=>u("default",n),"not-found":t=>{var n;return e!=null&&e["not-found"]?(n=e==null?void 0:e["not-found"])==null?void 0:n.call(e,t):({data:d})=>u("not-found",d)}})}});export{l as default};
diff --git a/nuxt/ContentNavigation.0dd1020e.js b/nuxt/ContentNavigation.34b892d1.js
similarity index 52%
rename from nuxt/ContentNavigation.0dd1020e.js
rename to nuxt/ContentNavigation.34b892d1.js
index badfc26..91409e0 100644
--- a/nuxt/ContentNavigation.0dd1020e.js
+++ b/nuxt/ContentNavigation.34b892d1.js
@@ -1 +1 @@
-import{a as l,q as E,s as g,v as T,e as L,x as I,m as h,y as P,z as c,d as e,_ as r,A as D,B as R,C as V,D as y,E as b,l as B,b as x}from"./entry.f8ff8132.js";import{f as N}from"./navigation.b4be76a2.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.4822352c.js";import"./ContentSlot.1089f928.js";import"./DocumentDrivenEmpty.5bf46e6a.js";import"./DocumentDrivenNotFound.ef779f55.js";import"./Markdown.b05e9d28.js";const j=l({emits:{error(t){return!0}},setup(t,{slots:i,emit:o}){const n=E(null),_=g();return T(a=>{if(!_.isHydrating)return o("error",a),n.value=a,!1}),()=>{var a,u;return n.value?(a=i.error)==null?void 0:a.call(i,{error:n}):(u=i.default)==null?void 0:u.call(i)}}}),z=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),C=l({name:"ServerPlaceholder",render(){return L("div")}}),M=Object.freeze(Object.defineProperty({__proto__:null,default:C},Symbol.toStringTag,{value:"Module"})),k=l({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:String,default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"}},setup(t,{slots:i}){const o=q({duration:t.duration,throttle:t.throttle}),n=g();return n.hook("page:start",o.start),n.hook("page:finish",o.finish),I(()=>o.clear),()=>h("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:`${o.progress.value}%`,height:`${t.height}px`,opacity:o.isLoading.value?1:0,background:t.color,backgroundSize:`${100/o.progress.value*100}% auto`,transition:"width 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},i)}});function q(t){const i=E(0),o=E(!1),n=P(()=>1e4/t.duration);let _=null,a=null;function u(){p(),i.value=0,o.value=!0,t.throttle?a=setTimeout(v,t.throttle):v()}function f(){i.value=100,A()}function p(){clearInterval(_),clearTimeout(a),_=null,a=null}function S(O){i.value=Math.min(100,i.value+O)}function A(){p(),setTimeout(()=>{o.value=!1,setTimeout(()=>{i.value=0},400)},500)}function v(){_=setInterval(()=>{S(n.value)},100)}return{progress:i,isLoading:o,start:u,finish:f,clear:p}}const H=Object.freeze(Object.defineProperty({__proto__:null,default:k},Symbol.toStringTag,{value:"Module"})),$=t=>Object.fromEntries(Object.entries(t).filter(([,i])=>i!==void 0)),d=(t,i)=>(o,n)=>(c(()=>t({...$(o),...n.attrs},n)),()=>{var _,a;return i?(a=(_=n.slots).default)==null?void 0:a.call(_):null}),s={accesskey:String,autocapitalize:String,autofocus:{type:Boolean,default:void 0},class:String,contenteditable:{type:Boolean,default:void 0},contextmenu:String,dir:String,draggable:{type:Boolean,default:void 0},enterkeyhint:String,exportparts:String,hidden:{type:Boolean,default:void 0},id:String,inputmode:String,is:String,itemid:String,itemprop:String,itemref:String,itemscope:String,itemtype:String,lang:String,nonce:String,part:String,slot:String,spellcheck:{type:Boolean,default:void 0},style:String,tabindex:String,title:String,translate:String},w=l({name:"Script",inheritAttrs:!1,props:{...s,async:Boolean,crossorigin:{type:[Boolean,String],default:void 0},defer:Boolean,fetchpriority:String,integrity:String,nomodule:Boolean,nonce:String,referrerpolicy:String,src:String,type:String,charset:String,language:String,body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _;const o={...t},n=(((_=i.default)==null?void 0:_.call(i))||[]).filter(({children:a})=>a).map(({children:a})=>a).join("");return n&&(o.children=n),{script:[o]}})}),U=l({name:"NoScript",inheritAttrs:!1,props:{...s,title:String,body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _;const o={...t},n=(((_=i.default)==null?void 0:_.call(i))||[]).filter(({children:a})=>a).map(({children:a})=>a).join("");return n&&(o.children=n),{noscript:[o]}})}),F=l({name:"Link",inheritAttrs:!1,props:{...s,as:String,crossorigin:String,disabled:Boolean,fetchpriority:String,href:String,hreflang:String,imagesizes:String,imagesrcset:String,integrity:String,media:String,prefetch:{type:Boolean,default:void 0},referrerpolicy:String,rel:String,sizes:String,title:String,type:String,methods:String,target:String,body:Boolean,renderPriority:[String,Number]},setup:d(t=>({link:[t]}))}),G=l({name:"Base",inheritAttrs:!1,props:{...s,href:String,target:String},setup:d(t=>({base:t}))}),J=l({name:"Title",inheritAttrs:!1,setup:d((t,{slots:i})=>{var n,_,a;return{title:((a=(_=(n=i.default)==null?void 0:n.call(i))==null?void 0:_[0])==null?void 0:a.children)||null}})}),K=l({name:"Meta",inheritAttrs:!1,props:{...s,charset:String,content:String,httpEquiv:String,name:String,body:Boolean,renderPriority:[String,Number]},setup:d(t=>{const i={...t};return i.httpEquiv&&(i["http-equiv"]=i.httpEquiv,delete i.httpEquiv),{meta:[i]}})}),Q=l({name:"Style",inheritAttrs:!1,props:{...s,type:String,media:String,nonce:String,title:String,scoped:{type:Boolean,default:void 0},body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _,a,u;const o={...t},n=(u=(a=(_=i.default)==null?void 0:_.call(i))==null?void 0:a[0])==null?void 0:u.children;return n&&(o.children=n),{style:[o]}})}),W=l({name:"Head",inheritAttrs:!1,setup:(t,i)=>()=>{var o,n;return(n=(o=i.slots).default)==null?void 0:n.call(o)}}),X=l({name:"Html",inheritAttrs:!1,props:{...s,manifest:String,version:String,xmlns:String,renderPriority:[String,Number]},setup:d(t=>({htmlAttrs:t}),!0)}),Y=l({name:"Body",inheritAttrs:!1,props:{...s,renderPriority:[String,Number]},setup:d(t=>({bodyAttrs:t}),!0)}),m=Object.freeze(Object.defineProperty({__proto__:null,Script:w,NoScript:U,Link:F,Base:G,Title:J,Meta:K,Style:Q,Head:W,Html:X,Body:Y},Symbol.toStringTag,{value:"Module"}));e(()=>r(()=>import("./ProseA.989de2dc.js"),["ProseA.989de2dc.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseCode.e3af85ab.js"),["ProseCode.e3af85ab.js","UiIconCopy.85420456.js","entry.f8ff8132.js","entry.97aae52d.css","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioCareer.96a55a4c.js"),["BioCareer.96a55a4c.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioHeading.fc552931.js"),["BioHeading.fc552931.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioProjectCard.4bb88134.js"),["BioProjectCard.4bb88134.js","entry.f8ff8132.js","entry.97aae52d.css","IconsCode.51acf16d.js","UiActionButton.8de8506c.js","ArrowRight.4c99b7f0.js","UiCard.fe784af1.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioProjects.9611713f.js"),["BioProjects.9611713f.js","BioProjectCard.4bb88134.js","entry.f8ff8132.js","entry.97aae52d.css","IconsCode.51acf16d.js","UiActionButton.8de8506c.js","ArrowRight.4c99b7f0.js","UiCard.fe784af1.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioSkills.1cbb9b74.js"),["BioSkills.1cbb9b74.js","BioSkillsCard.dcf6f14b.js","UiStars.0b5a97ee.js","IconStar.c0f2126f.js","entry.f8ff8132.js","entry.97aae52d.css","UiCard.fe784af1.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioSkillsCard.dcf6f14b.js"),["BioSkillsCard.dcf6f14b.js","UiStars.0b5a97ee.js","IconStar.c0f2126f.js","entry.f8ff8132.js","entry.97aae52d.css","UiCard.fe784af1.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeContentList.3f25a970.js"),["HomeContentList.3f25a970.js","entry.f8ff8132.js","entry.97aae52d.css","navigation.b4be76a2.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeHeader.5039a526.js"),["HomeHeader.5039a526.js","entry.f8ff8132.js","entry.97aae52d.css","ArrowRight.4c99b7f0.js","UiActionButton.8de8506c.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeReference.e315914b.js"),["HomeReference.e315914b.js","entry.f8ff8132.js","entry.97aae52d.css","navigation.b4be76a2.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ArrowRight.4c99b7f0.js"),["ArrowRight.4c99b7f0.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./IconStar.c0f2126f.js"),["IconStar.c0f2126f.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./IconsCode.51acf16d.js"),["IconsCode.51acf16d.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js").then(t=>t.M),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js").then(t=>t.S),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutFooter.01993b55.js"),["LayoutFooter.01993b55.js","entry.f8ff8132.js","entry.97aae52d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutMainMenu.73696950.js"),["LayoutMainMenu.73696950.js","entry.f8ff8132.js","entry.97aae52d.css","navigation.b4be76a2.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.ax),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutMainMenuToggle.46044f42.js"),["LayoutMainMenuToggle.46044f42.js","entry.f8ff8132.js","entry.97aae52d.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.dfe6c45f.js"),["LayoutThemeToggle.dfe6c45f.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiActionButton.8de8506c.js"),["UiActionButton.8de8506c.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiCard.fe784af1.js"),["UiCard.fe784af1.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiIconCopy.85420456.js"),["UiIconCopy.85420456.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiStars.0b5a97ee.js"),["UiStars.0b5a97ee.js","IconStar.c0f2126f.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.aw),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ContentList.4822352c.js"),["ContentList.4822352c.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>tt),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.av),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.au),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.at),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ContentSlot.1089f928.js"),["ContentSlot.1089f928.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./DocumentDrivenEmpty.5bf46e6a.js"),["DocumentDrivenEmpty.5bf46e6a.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./DocumentDrivenNotFound.ef779f55.js"),["DocumentDrivenNotFound.ef779f55.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./Markdown.b05e9d28.js"),["Markdown.b05e9d28.js","ContentSlot.1089f928.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseBlockquote.934e49f9.js"),["ProseBlockquote.934e49f9.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseCodeInline.25efea15.js"),["ProseCodeInline.25efea15.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseEm.dcb566d5.js"),["ProseEm.dcb566d5.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH1.aae753c9.js"),["ProseH1.aae753c9.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH2.e5674627.js"),["ProseH2.e5674627.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH3.ed0e0070.js"),["ProseH3.ed0e0070.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH4.8c1e2a49.js"),["ProseH4.8c1e2a49.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH5.f46443f6.js"),["ProseH5.f46443f6.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH6.1d12eb9f.js"),["ProseH6.1d12eb9f.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseHr.3c09cbb6.js"),["ProseHr.3c09cbb6.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseImg.f4223a04.js"),["ProseImg.f4223a04.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseLi.f5f48b70.js"),["ProseLi.f5f48b70.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseOl.8ecd42ef.js"),["ProseOl.8ecd42ef.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseP.1e37594f.js"),["ProseP.1e37594f.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseStrong.f3ca6279.js"),["ProseStrong.f3ca6279.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTable.848e00bb.js"),["ProseTable.848e00bb.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTbody.52634c80.js"),["ProseTbody.52634c80.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTd.340aed92.js"),["ProseTd.340aed92.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTh.898f7f75.js"),["ProseTh.898f7f75.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseThead.e6b0aae2.js"),["ProseThead.e6b0aae2.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTr.c191348d.js"),["ProseTr.c191348d.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseUl.7c14583d.js"),["ProseUl.7c14583d.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./welcome.a5e8ab71.js"),["welcome.a5e8ab71.js","entry.f8ff8132.js","entry.97aae52d.css","navigation.b4be76a2.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.4822352c.js","ContentSlot.1089f928.js","DocumentDrivenEmpty.5bf46e6a.js","DocumentDrivenNotFound.ef779f55.js","Markdown.b05e9d28.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.ay),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>z),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js").then(t=>t.c),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>M),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.as),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>H),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./component.vue3.4bbb1026.js"),["component.vue3.4bbb1026.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.f8ff8132.js").then(t=>t.az),["entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Script));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.NoScript));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Link));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Base));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Title));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Meta));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Style));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Head));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Html));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Body));const Z=l({name:"ContentNavigation",props:{query:{type:Object,required:!1,default:void 0}},async setup(t){const{query:i}=D(t),o=P(()=>{var _;return typeof((_=i.value)==null?void 0:_.params)=="function"?i.value.params():i.value});if(!o.value&&R("dd-navigation").value){const{navigation:_}=V();return{navigation:_}}const{data:n}=await y(`content-navigation-${b(o.value)}`,()=>N(o.value));return{navigation:n}},render(t){const i=B(),{navigation:o}=t,n=u=>h(x,{to:u._path},()=>u.title),_=(u,f)=>h("ul",f?{"data-level":f}:null,u.map(p=>p.children?h("li",null,[n(p),_(p.children,f+1)]):h("li",null,n(p)))),a=u=>_(u,0);return i!=null&&i.default?i.default({navigation:o,...this.$attrs}):a(o)}}),tt=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{Z as default};
+import{a as l,q as E,s as g,v as T,e as L,x as I,m as h,y as P,z as c,d as e,_ as r,A as D,B as R,C as V,D as y,E as b,l as B,b as x}from"./entry.67e3e390.js";import{f as N}from"./navigation.e6541d9a.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.9cb0e4d7.js";import"./ContentSlot.7d84bf08.js";import"./DocumentDrivenEmpty.a80465d8.js";import"./DocumentDrivenNotFound.0314c024.js";import"./Markdown.e057438e.js";const j=l({emits:{error(t){return!0}},setup(t,{slots:i,emit:o}){const n=E(null),_=g();return T(a=>{if(!_.isHydrating)return o("error",a),n.value=a,!1}),()=>{var a,u;return n.value?(a=i.error)==null?void 0:a.call(i,{error:n}):(u=i.default)==null?void 0:u.call(i)}}}),z=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),C=l({name:"ServerPlaceholder",render(){return L("div")}}),M=Object.freeze(Object.defineProperty({__proto__:null,default:C},Symbol.toStringTag,{value:"Module"})),k=l({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:String,default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"}},setup(t,{slots:i}){const o=q({duration:t.duration,throttle:t.throttle}),n=g();return n.hook("page:start",o.start),n.hook("page:finish",o.finish),I(()=>o.clear),()=>h("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:`${o.progress.value}%`,height:`${t.height}px`,opacity:o.isLoading.value?1:0,background:t.color,backgroundSize:`${100/o.progress.value*100}% auto`,transition:"width 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},i)}});function q(t){const i=E(0),o=E(!1),n=P(()=>1e4/t.duration);let _=null,a=null;function u(){p(),i.value=0,o.value=!0,t.throttle?a=setTimeout(v,t.throttle):v()}function f(){i.value=100,A()}function p(){clearInterval(_),clearTimeout(a),_=null,a=null}function S(O){i.value=Math.min(100,i.value+O)}function A(){p(),setTimeout(()=>{o.value=!1,setTimeout(()=>{i.value=0},400)},500)}function v(){_=setInterval(()=>{S(n.value)},100)}return{progress:i,isLoading:o,start:u,finish:f,clear:p}}const H=Object.freeze(Object.defineProperty({__proto__:null,default:k},Symbol.toStringTag,{value:"Module"})),$=t=>Object.fromEntries(Object.entries(t).filter(([,i])=>i!==void 0)),d=(t,i)=>(o,n)=>(c(()=>t({...$(o),...n.attrs},n)),()=>{var _,a;return i?(a=(_=n.slots).default)==null?void 0:a.call(_):null}),s={accesskey:String,autocapitalize:String,autofocus:{type:Boolean,default:void 0},class:String,contenteditable:{type:Boolean,default:void 0},contextmenu:String,dir:String,draggable:{type:Boolean,default:void 0},enterkeyhint:String,exportparts:String,hidden:{type:Boolean,default:void 0},id:String,inputmode:String,is:String,itemid:String,itemprop:String,itemref:String,itemscope:String,itemtype:String,lang:String,nonce:String,part:String,slot:String,spellcheck:{type:Boolean,default:void 0},style:String,tabindex:String,title:String,translate:String},w=l({name:"Script",inheritAttrs:!1,props:{...s,async:Boolean,crossorigin:{type:[Boolean,String],default:void 0},defer:Boolean,fetchpriority:String,integrity:String,nomodule:Boolean,nonce:String,referrerpolicy:String,src:String,type:String,charset:String,language:String,body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _;const o={...t},n=(((_=i.default)==null?void 0:_.call(i))||[]).filter(({children:a})=>a).map(({children:a})=>a).join("");return n&&(o.children=n),{script:[o]}})}),U=l({name:"NoScript",inheritAttrs:!1,props:{...s,title:String,body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _;const o={...t},n=(((_=i.default)==null?void 0:_.call(i))||[]).filter(({children:a})=>a).map(({children:a})=>a).join("");return n&&(o.children=n),{noscript:[o]}})}),F=l({name:"Link",inheritAttrs:!1,props:{...s,as:String,crossorigin:String,disabled:Boolean,fetchpriority:String,href:String,hreflang:String,imagesizes:String,imagesrcset:String,integrity:String,media:String,prefetch:{type:Boolean,default:void 0},referrerpolicy:String,rel:String,sizes:String,title:String,type:String,methods:String,target:String,body:Boolean,renderPriority:[String,Number]},setup:d(t=>({link:[t]}))}),G=l({name:"Base",inheritAttrs:!1,props:{...s,href:String,target:String},setup:d(t=>({base:t}))}),J=l({name:"Title",inheritAttrs:!1,setup:d((t,{slots:i})=>{var n,_,a;return{title:((a=(_=(n=i.default)==null?void 0:n.call(i))==null?void 0:_[0])==null?void 0:a.children)||null}})}),K=l({name:"Meta",inheritAttrs:!1,props:{...s,charset:String,content:String,httpEquiv:String,name:String,body:Boolean,renderPriority:[String,Number]},setup:d(t=>{const i={...t};return i.httpEquiv&&(i["http-equiv"]=i.httpEquiv,delete i.httpEquiv),{meta:[i]}})}),Q=l({name:"Style",inheritAttrs:!1,props:{...s,type:String,media:String,nonce:String,title:String,scoped:{type:Boolean,default:void 0},body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _,a,u;const o={...t},n=(u=(a=(_=i.default)==null?void 0:_.call(i))==null?void 0:a[0])==null?void 0:u.children;return n&&(o.children=n),{style:[o]}})}),W=l({name:"Head",inheritAttrs:!1,setup:(t,i)=>()=>{var o,n;return(n=(o=i.slots).default)==null?void 0:n.call(o)}}),X=l({name:"Html",inheritAttrs:!1,props:{...s,manifest:String,version:String,xmlns:String,renderPriority:[String,Number]},setup:d(t=>({htmlAttrs:t}),!0)}),Y=l({name:"Body",inheritAttrs:!1,props:{...s,renderPriority:[String,Number]},setup:d(t=>({bodyAttrs:t}),!0)}),m=Object.freeze(Object.defineProperty({__proto__:null,Script:w,NoScript:U,Link:F,Base:G,Title:J,Meta:K,Style:Q,Head:W,Html:X,Body:Y},Symbol.toStringTag,{value:"Module"}));e(()=>r(()=>import("./ProseA.435cdbf8.js"),["ProseA.435cdbf8.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseCode.1f9853bd.js"),["ProseCode.1f9853bd.js","UiIconCopy.46b801d4.js","entry.67e3e390.js","entry.97aae52d.css","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioCareer.79116453.js"),["BioCareer.79116453.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioHeading.40d2dead.js"),["BioHeading.40d2dead.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioProjectCard.168802cd.js"),["BioProjectCard.168802cd.js","entry.67e3e390.js","entry.97aae52d.css","IconsCode.118b44a8.js","UiActionButton.d5ab622f.js","ArrowRight.5a505e4f.js","UiCard.c1974320.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioProjects.7d47d393.js"),["BioProjects.7d47d393.js","BioProjectCard.168802cd.js","entry.67e3e390.js","entry.97aae52d.css","IconsCode.118b44a8.js","UiActionButton.d5ab622f.js","ArrowRight.5a505e4f.js","UiCard.c1974320.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioSkills.7301a037.js"),["BioSkills.7301a037.js","BioSkillsCard.24be210d.js","UiStars.ad96952a.js","IconStar.67abd07c.js","entry.67e3e390.js","entry.97aae52d.css","UiCard.c1974320.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioSkillsCard.24be210d.js"),["BioSkillsCard.24be210d.js","UiStars.ad96952a.js","IconStar.67abd07c.js","entry.67e3e390.js","entry.97aae52d.css","UiCard.c1974320.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeContentList.914b1d24.js"),["HomeContentList.914b1d24.js","entry.67e3e390.js","entry.97aae52d.css","navigation.e6541d9a.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeHeader.0c1c0a2b.js"),["HomeHeader.0c1c0a2b.js","entry.67e3e390.js","entry.97aae52d.css","ArrowRight.5a505e4f.js","UiActionButton.d5ab622f.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeReference.dcdfc2c4.js"),["HomeReference.dcdfc2c4.js","entry.67e3e390.js","entry.97aae52d.css","navigation.e6541d9a.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ArrowRight.5a505e4f.js"),["ArrowRight.5a505e4f.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./IconStar.67abd07c.js"),["IconStar.67abd07c.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./IconsCode.118b44a8.js"),["IconsCode.118b44a8.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js").then(t=>t.M),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js").then(t=>t.S),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutFooter.e4ddbcf6.js"),["LayoutFooter.e4ddbcf6.js","entry.67e3e390.js","entry.97aae52d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutMainMenu.ced8ac76.js"),["LayoutMainMenu.ced8ac76.js","entry.67e3e390.js","entry.97aae52d.css","navigation.e6541d9a.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.ax),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutMainMenuToggle.a62ad69a.js"),["LayoutMainMenuToggle.a62ad69a.js","entry.67e3e390.js","entry.97aae52d.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.51894848.js"),["LayoutThemeToggle.51894848.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiActionButton.d5ab622f.js"),["UiActionButton.d5ab622f.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiCard.c1974320.js"),["UiCard.c1974320.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiIconCopy.46b801d4.js"),["UiIconCopy.46b801d4.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiStars.ad96952a.js"),["UiStars.ad96952a.js","IconStar.67abd07c.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.aw),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ContentList.9cb0e4d7.js"),["ContentList.9cb0e4d7.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>tt),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.av),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.au),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.at),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ContentSlot.7d84bf08.js"),["ContentSlot.7d84bf08.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./DocumentDrivenEmpty.a80465d8.js"),["DocumentDrivenEmpty.a80465d8.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./DocumentDrivenNotFound.0314c024.js"),["DocumentDrivenNotFound.0314c024.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./Markdown.e057438e.js"),["Markdown.e057438e.js","ContentSlot.7d84bf08.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseBlockquote.caaa6911.js"),["ProseBlockquote.caaa6911.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseCodeInline.747a7c37.js"),["ProseCodeInline.747a7c37.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseEm.0c0df6bc.js"),["ProseEm.0c0df6bc.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH1.8c4f33f5.js"),["ProseH1.8c4f33f5.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH2.83df4280.js"),["ProseH2.83df4280.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH3.af0f4af9.js"),["ProseH3.af0f4af9.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH4.44266402.js"),["ProseH4.44266402.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH5.478a71ed.js"),["ProseH5.478a71ed.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH6.b302c2bb.js"),["ProseH6.b302c2bb.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseHr.ec7cc3d3.js"),["ProseHr.ec7cc3d3.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseImg.fb70c53a.js"),["ProseImg.fb70c53a.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseLi.94808e98.js"),["ProseLi.94808e98.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseOl.79cf88eb.js"),["ProseOl.79cf88eb.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseP.6c5d1090.js"),["ProseP.6c5d1090.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseStrong.e221982f.js"),["ProseStrong.e221982f.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTable.38c46255.js"),["ProseTable.38c46255.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTbody.19692760.js"),["ProseTbody.19692760.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTd.44b1749b.js"),["ProseTd.44b1749b.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTh.25f9816d.js"),["ProseTh.25f9816d.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseThead.7e525844.js"),["ProseThead.7e525844.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTr.91c3a4e0.js"),["ProseTr.91c3a4e0.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseUl.85dc1033.js"),["ProseUl.85dc1033.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./welcome.2130072a.js"),["welcome.2130072a.js","entry.67e3e390.js","entry.97aae52d.css","navigation.e6541d9a.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.9cb0e4d7.js","ContentSlot.7d84bf08.js","DocumentDrivenEmpty.a80465d8.js","DocumentDrivenNotFound.0314c024.js","Markdown.e057438e.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.ay),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>z),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js").then(t=>t.c),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>M),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.as),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>H),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./component.vue3.fc91041a.js"),["component.vue3.fc91041a.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.67e3e390.js").then(t=>t.az),["entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Script));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.NoScript));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Link));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Base));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Title));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Meta));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Style));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Head));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Html));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Body));const Z=l({name:"ContentNavigation",props:{query:{type:Object,required:!1,default:void 0}},async setup(t){const{query:i}=D(t),o=P(()=>{var _;return typeof((_=i.value)==null?void 0:_.params)=="function"?i.value.params():i.value});if(!o.value&&R("dd-navigation").value){const{navigation:_}=V();return{navigation:_}}const{data:n}=await y(`content-navigation-${b(o.value)}`,()=>N(o.value));return{navigation:n}},render(t){const i=B(),{navigation:o}=t,n=u=>h(x,{to:u._path},()=>u.title),_=(u,f)=>h("ul",f?{"data-level":f}:null,u.map(p=>p.children?h("li",null,[n(p),_(p.children,f+1)]):h("li",null,n(p)))),a=u=>_(u,0);return i!=null&&i.default?i.default({navigation:o,...this.$attrs}):a(o)}}),tt=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{Z as default};
diff --git a/nuxt/ContentSlot.1089f928.js b/nuxt/ContentSlot.7d84bf08.js
similarity index 86%
rename from nuxt/ContentSlot.1089f928.js
rename to nuxt/ContentSlot.7d84bf08.js
index cd4f0cd..4b29d65 100644
--- a/nuxt/ContentSlot.1089f928.js
+++ b/nuxt/ContentSlot.7d84bf08.js
@@ -1 +1 @@
-import{a as g,l as h,y,m as p,K as c,L as w}from"./entry.f8ff8132.js";const C=g({name:"ContentSlot",functional:!0,props:{use:{type:Function,default:void 0},unwrap:{type:[Boolean,String],default:!1}},setup(e){const{parent:u}=w(),{between:o,default:l}=h(),i=y(()=>typeof e.unwrap=="string"?e.unwrap.split(" "):["*"]);return{fallbackSlot:l,tags:i,between:o,parent:u}},render({use:e,unwrap:u,fallbackSlot:o,between:l,tags:i,parent:n}){var f;try{let r=e;if(typeof e=="string"&&(r=(n==null?void 0:n.slots[e])||((f=n==null?void 0:n.parent)==null?void 0:f.slots[e]),console.warn(`Please set :use="$slots.${e}" in <ContentSlot> component to enable reactivity`)),!r)return o?o():p("div");if(!u)return[r()];const{flatUnwrap:d}=c(),a=d(r(),i);return l?a.flatMap((t,s)=>s===0?[t]:[l(),t]):a.reduce((t,s)=>(typeof s.children=="string"?typeof t[t.length-1]=="string"?t[t.length-1]+=s.children:t.push(s.children):t.push(s),t),[])}catch{return p("div")}}});export{C as default};
+import{a as g,l as h,y,m as p,K as c,L as w}from"./entry.67e3e390.js";const C=g({name:"ContentSlot",functional:!0,props:{use:{type:Function,default:void 0},unwrap:{type:[Boolean,String],default:!1}},setup(e){const{parent:u}=w(),{between:o,default:l}=h(),i=y(()=>typeof e.unwrap=="string"?e.unwrap.split(" "):["*"]);return{fallbackSlot:l,tags:i,between:o,parent:u}},render({use:e,unwrap:u,fallbackSlot:o,between:l,tags:i,parent:n}){var f;try{let r=e;if(typeof e=="string"&&(r=(n==null?void 0:n.slots[e])||((f=n==null?void 0:n.parent)==null?void 0:f.slots[e]),console.warn(`Please set :use="$slots.${e}" in <ContentSlot> component to enable reactivity`)),!r)return o?o():p("div");if(!u)return[r()];const{flatUnwrap:d}=c(),a=d(r(),i);return l?a.flatMap((t,s)=>s===0?[t]:[l(),t]):a.reduce((t,s)=>(typeof s.children=="string"?typeof t[t.length-1]=="string"?t[t.length-1]+=s.children:t.push(s.children):t.push(s),t),[])}catch{return p("div")}}});export{C as default};
diff --git a/nuxt/DocumentDrivenEmpty.5bf46e6a.js b/nuxt/DocumentDrivenEmpty.a80465d8.js
similarity index 77%
rename from nuxt/DocumentDrivenEmpty.5bf46e6a.js
rename to nuxt/DocumentDrivenEmpty.a80465d8.js
index 6d29165..432c441 100644
--- a/nuxt/DocumentDrivenEmpty.5bf46e6a.js
+++ b/nuxt/DocumentDrivenEmpty.a80465d8.js
@@ -1 +1 @@
-import{a as n,m as e}from"./entry.f8ff8132.js";const r=n({name:"DocumentDrivenEmpty",props:{value:{type:Object,required:!0}},render({value:t}){return e("div",void 0,[e("p","Document is empty"),e("p",`Add content to it by opening ${t._source}/${t._file} file.`)])}});export{r as default};
+import{a as n,m as e}from"./entry.67e3e390.js";const r=n({name:"DocumentDrivenEmpty",props:{value:{type:Object,required:!0}},render({value:t}){return e("div",void 0,[e("p","Document is empty"),e("p",`Add content to it by opening ${t._source}/${t._file} file.`)])}});export{r as default};
diff --git a/nuxt/DocumentDrivenNotFound.ef779f55.js b/nuxt/DocumentDrivenNotFound.0314c024.js
similarity index 59%
rename from nuxt/DocumentDrivenNotFound.ef779f55.js
rename to nuxt/DocumentDrivenNotFound.0314c024.js
index 7fd4b5f..f01ebaa 100644
--- a/nuxt/DocumentDrivenNotFound.ef779f55.js
+++ b/nuxt/DocumentDrivenNotFound.0314c024.js
@@ -1 +1 @@
-import{a as n,m as e}from"./entry.f8ff8132.js";const t=n({name:"DocumentDrivenNotFound",render(){return e("div","Document not found")}});export{t as default};
+import{a as n,m as e}from"./entry.67e3e390.js";const t=n({name:"DocumentDrivenNotFound",render(){return e("div","Document not found")}});export{t as default};
diff --git a/nuxt/HomeContentList.3f25a970.js b/nuxt/HomeContentList.914b1d24.js
similarity index 82%
rename from nuxt/HomeContentList.3f25a970.js
rename to nuxt/HomeContentList.914b1d24.js
index ef76679..3b5596f 100644
--- a/nuxt/HomeContentList.3f25a970.js
+++ b/nuxt/HomeContentList.914b1d24.js
@@ -1 +1 @@
-import{k as c,Q as _,D as i,a8 as u,o as m,c as p,w as d,f as h,h as f,i as y,u as w,a9 as v,aa as x}from"./entry.f8ff8132.js";import{f as C}from"./navigation.b4be76a2.js";const g={__name:"HomeContentList",async setup(M){let e,a;const{data:n}=([e,a]=_(()=>i("navigation",()=>C())),e=await e,a(),e),o=n.value.filter(t=>t.children&&Array.isArray(t.children)&&t.children.length>0);return(t,k)=>{const r=x,l=u("masonry-wall");return m(),p(l,{items:w(o),"ssr-columns":1,"column-width":300,gap:10},{default:d(({item:s})=>[h("div",{class:f(t.$style.row)},[y(r,{title:s.title,url:s.url,children:s.children},null,8,["title","url","children"])],2)]),_:1},8,["items"])}}},A={$style:v},$=c(g,[["__cssModules",A]]);export{$ as default};
+import{k as c,Q as _,D as i,a8 as u,o as m,c as p,w as d,f as h,h as f,i as y,u as w,a9 as v,aa as x}from"./entry.67e3e390.js";import{f as C}from"./navigation.e6541d9a.js";const g={__name:"HomeContentList",async setup(M){let e,a;const{data:n}=([e,a]=_(()=>i("navigation",()=>C())),e=await e,a(),e),o=n.value.filter(t=>t.children&&Array.isArray(t.children)&&t.children.length>0);return(t,k)=>{const r=x,l=u("masonry-wall");return m(),p(l,{items:w(o),"ssr-columns":1,"column-width":300,gap:10},{default:d(({item:s})=>[h("div",{class:f(t.$style.row)},[y(r,{title:s.title,url:s.url,children:s.children},null,8,["title","url","children"])],2)]),_:1},8,["items"])}}},A={$style:v},$=c(g,[["__cssModules",A]]);export{$ as default};
diff --git a/nuxt/HomeHeader.5039a526.js b/nuxt/HomeHeader.0c1c0a2b.js
similarity index 68%
rename from nuxt/HomeHeader.5039a526.js
rename to nuxt/HomeHeader.0c1c0a2b.js
index eae13bd..2436de4 100644
--- a/nuxt/HomeHeader.5039a526.js
+++ b/nuxt/HomeHeader.0c1c0a2b.js
@@ -1 +1 @@
-import{k as r,o as _,e as m,f as t,h as s,i as o,w as n,T as a,a7 as d,b as u}from"./entry.f8ff8132.js";import h from"./ArrowRight.4c99b7f0.js";import p from"./UiActionButton.8de8506c.js";const f=""+new URL("obsidian.8dc2a844.svg",import.meta.url).href,g=""+new URL("desk.fcd75862.svg",import.meta.url).href,b={},y=t("img",{src:f,alt:"",width:"14",height:"14"},null,-1);function k(e,$){const i=u,c=h,l=p;return _(),m("section",null,[t("div",{class:s(e.$style.grid)},[t("div",{class:s(e.$style.text)},[t("h1",{class:s(e.$style.title)},"Welcome to\xA0my Obsidian\xA0Garden",2),t("p",{class:s(e.$style.subtitle)},[y,o(i,{to:"https://obsidian.md",target:"_blank"},{default:n(()=>[a("Obsidian")]),_:1}),a(" is a note-taking app, that I use to store chunks of code and technical documentation. ")],2),t("div",{class:s(e.$style.buttons)},[o(l,{href:"https://github.com/muerwre",target:"_blank",variant:"outline"},{suffix:n(()=>[o(c,{width:"22",height:"22",fill:"currentColor"})]),default:n(()=>[a(" Visit my Github ")]),_:1})],2)],2),t("div",{class:s(e.$style.image)},[t("img",{src:g,class:s(e.$style.desk),alt:"It's me, muerwre"},null,2)],2)],2)])}const w={$style:d},N=r(b,[["render",k],["__cssModules",w]]);export{N as default};
+import{k as r,o as _,e as m,f as t,h as s,i as o,w as n,T as a,a7 as d,b as u}from"./entry.67e3e390.js";import h from"./ArrowRight.5a505e4f.js";import p from"./UiActionButton.d5ab622f.js";const f=""+new URL("obsidian.8dc2a844.svg",import.meta.url).href,g=""+new URL("desk.91eb5d74.svg",import.meta.url).href,b={},y=t("img",{src:f,alt:"",width:"14",height:"14"},null,-1);function k(e,$){const i=u,l=h,c=p;return _(),m("section",null,[t("div",{class:s(e.$style.grid)},[t("div",{class:s(e.$style.text)},[t("h1",{class:s(e.$style.title)},"Welcome to\xA0my Obsidian\xA0Garden",2),t("p",{class:s(e.$style.subtitle)},[y,o(i,{to:"https://obsidian.md",target:"_blank"},{default:n(()=>[a("Obsidian")]),_:1}),a(" is a note-taking app, that I use to store chunks of code and technical documentation. ")],2),t("div",{class:s(e.$style.buttons)},[o(c,{href:"https://github.com/muerwre",target:"_blank",variant:"outline"},{suffix:n(()=>[o(l,{width:"22",height:"22",fill:"currentColor"})]),default:n(()=>[a(" Visit my Github ")]),_:1})],2)],2),t("div",{class:s(e.$style.image)},[t("img",{src:g,class:s(e.$style.desk),alt:"It's me, muerwre"},null,2)],2)],2)])}const w={$style:d},N=r(b,[["render",k],["__cssModules",w]]);export{N as default};
diff --git a/nuxt/HomeReference.e315914b.js b/nuxt/HomeReference.dcdfc2c4.js
similarity index 87%
rename from nuxt/HomeReference.e315914b.js
rename to nuxt/HomeReference.dcdfc2c4.js
index 65ab750..b7bf6c8 100644
--- a/nuxt/HomeReference.e315914b.js
+++ b/nuxt/HomeReference.dcdfc2c4.js
@@ -1 +1 @@
-import{a as x,Q as k,o as r,e as c,f as C,t as f,u as i,h as N,R as v,S as w,i as D,w as V,T as B,j as A,D as L,b as M,k as R,U as S}from"./entry.f8ff8132.js";import{f as T}from"./navigation.b4be76a2.js";const $=x({__name:"HomeReference",props:{url:null},async setup(p){let a,u;const h=p,_=(n,e)=>{var s;const t=n.find(l=>l._path.endsWith(e[0]));return!t||e.length>1&&!((s=t.children)!=null&&s.length)?null:e.length===1?t:_(t.children,e.slice(1,e.length))},{data:g}=([a,u]=k(()=>L("navigation",()=>T())),a=await a,u(),a),y=h.url.split("/").filter(n=>n),o=_(g.value,y);return(n,e)=>{var s,l,m;const t=M;return r(),c("article",null,[C("h1",null,f((s=i(o))==null?void 0:s.title),1),(m=(l=i(o))==null?void 0:l.children)!=null&&m.length?(r(),c("ul",{key:0,class:N(n.$style.list)},[(r(!0),c(v,null,w(i(o).children,d=>(r(),c("li",{key:i(o)._id},[D(t,{to:d._path},{default:V(()=>[B(f(d.title),1)]),_:2},1032,["to"])]))),128))],2)):A("",!0)])}}}),b={$style:S},E=R($,[["__cssModules",b]]);export{E as default};
+import{a as x,Q as k,o as r,e as c,f as C,t as f,u as i,h as N,R as v,S as w,i as D,w as V,T as B,j as A,D as L,b as M,k as R,U as S}from"./entry.67e3e390.js";import{f as T}from"./navigation.e6541d9a.js";const $=x({__name:"HomeReference",props:{url:null},async setup(p){let a,u;const h=p,_=(n,e)=>{var s;const t=n.find(l=>l._path.endsWith(e[0]));return!t||e.length>1&&!((s=t.children)!=null&&s.length)?null:e.length===1?t:_(t.children,e.slice(1,e.length))},{data:g}=([a,u]=k(()=>L("navigation",()=>T())),a=await a,u(),a),y=h.url.split("/").filter(n=>n),o=_(g.value,y);return(n,e)=>{var s,l,m;const t=M;return r(),c("article",null,[C("h1",null,f((s=i(o))==null?void 0:s.title),1),(m=(l=i(o))==null?void 0:l.children)!=null&&m.length?(r(),c("ul",{key:0,class:N(n.$style.list)},[(r(!0),c(v,null,w(i(o).children,d=>(r(),c("li",{key:i(o)._id},[D(t,{to:d._path},{default:V(()=>[B(f(d.title),1)]),_:2},1032,["to"])]))),128))],2)):A("",!0)])}}}),b={$style:S},E=R($,[["__cssModules",b]]);export{E as default};
diff --git a/nuxt/IconStar.c0f2126f.js b/nuxt/IconStar.67abd07c.js
similarity index 82%
rename from nuxt/IconStar.c0f2126f.js
rename to nuxt/IconStar.67abd07c.js
index 8d57b4b..eece464 100644
--- a/nuxt/IconStar.c0f2126f.js
+++ b/nuxt/IconStar.67abd07c.js
@@ -1 +1 @@
-import{k as e,o as t,e as o,f as s}from"./entry.f8ff8132.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{d:"m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"},null,-1),r=[c];function a(l,d){return t(),o("svg",_,r)}const i=e(n,[["render",a]]);export{i as default};
+import{k as e,o as t,e as o,f as s}from"./entry.67e3e390.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{d:"m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"},null,-1),r=[c];function a(l,d){return t(),o("svg",_,r)}const i=e(n,[["render",a]]);export{i as default};
diff --git a/nuxt/IconsCode.51acf16d.js b/nuxt/IconsCode.118b44a8.js
similarity index 84%
rename from nuxt/IconsCode.51acf16d.js
rename to nuxt/IconsCode.118b44a8.js
index 3e9d833..408aa3c 100644
--- a/nuxt/IconsCode.51acf16d.js
+++ b/nuxt/IconsCode.118b44a8.js
@@ -1 +1 @@
-import{k as t,o as e,e as o,f as s}from"./entry.f8ff8132.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{xmlns:"http://www.w3.org/2000/svg",d:"m16 35.9-12-12 12.1-12.1 2.15 2.15L8.3 23.9l9.85 9.85Zm15.9.1-2.15-2.15 9.95-9.95-9.85-9.85L32 11.9l12 12Z"},null,-1),r=[c];function a(h,l){return e(),o("svg",_,r)}const d=t(n,[["render",a]]);export{d as default};
+import{k as t,o as e,e as o,f as s}from"./entry.67e3e390.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{xmlns:"http://www.w3.org/2000/svg",d:"m16 35.9-12-12 12.1-12.1 2.15 2.15L8.3 23.9l9.85 9.85Zm15.9.1-2.15-2.15 9.95-9.95-9.85-9.85L32 11.9l12 12Z"},null,-1),r=[c];function a(h,l){return e(),o("svg",_,r)}const d=t(n,[["render",a]]);export{d as default};
diff --git a/nuxt/LayoutFooter.01993b55.js b/nuxt/LayoutFooter.e4ddbcf6.js
similarity index 69%
rename from nuxt/LayoutFooter.01993b55.js
rename to nuxt/LayoutFooter.e4ddbcf6.js
index c6411ef..a20ced9 100644
--- a/nuxt/LayoutFooter.01993b55.js
+++ b/nuxt/LayoutFooter.e4ddbcf6.js
@@ -1 +1 @@
-import{k as n,o as l,e as r,f as t,h as s,T as a,t as c,i as _,w as i,b as u}from"./entry.f8ff8132.js";import{a as d}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js";const m={},f=t("div",null,"btw, have a nice day",-1);function p(e,w){const o=u;return l(),r("footer",{class:s([e.$style.footer,e.$attrs.class])},[f,t("div",{class:s(e.$style.filler)},null,2),t("div",null,[a(" (2018 - "+c(new Date().getFullYear())+") ",1),_(o,{to:"https://github.com/muerwre/",target:"_blank"},{default:i(()=>[a("muerwre")]),_:1})])],2)}const h={$style:d},x=n(m,[["render",p],["__cssModules",h]]);export{x as default};
+import{k as n,o as l,e as r,f as t,h as s,T as a,t as c,i as _,w as i,b as u}from"./entry.67e3e390.js";import{a as d}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js";const m={},f=t("div",null,"btw, have a nice day",-1);function p(e,w){const o=u;return l(),r("footer",{class:s([e.$style.footer,e.$attrs.class])},[f,t("div",{class:s(e.$style.filler)},null,2),t("div",null,[a(" (2018 - "+c(new Date().getFullYear())+") ",1),_(o,{to:"https://github.com/muerwre/",target:"_blank"},{default:i(()=>[a("muerwre")]),_:1})])],2)}const h={$style:d},x=n(m,[["render",p],["__cssModules",h]]);export{x as default};
diff --git a/nuxt/LayoutMainMenu.73696950.js b/nuxt/LayoutMainMenu.ced8ac76.js
similarity index 87%
rename from nuxt/LayoutMainMenu.73696950.js
rename to nuxt/LayoutMainMenu.ced8ac76.js
index f605462..cc7766a 100644
--- a/nuxt/LayoutMainMenu.73696950.js
+++ b/nuxt/LayoutMainMenu.ced8ac76.js
@@ -1 +1 @@
-import{k as m,Q as p,D as h,o,e as l,f as a,i,w as y,h as t,R as f,S as v,u as w,b as $,aa as g}from"./entry.f8ff8132.js";import{f as M}from"./navigation.b4be76a2.js";import{a as k}from"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";const C={__name:"LayoutMainMenu",async setup(x){let s,r;const{data:c}=([s,r]=p(()=>h("navigation",()=>M())),s=await s,r(),s),_=c.value.filter(e=>e.children&&Array.isArray(e.children)&&e.children.length>0);return(e,A)=>{const u=$,d=g;return o(),l("nav",null,[a("div",{class:t(e.$style.logo)},[i(u,{to:"/"},{default:y(()=>[a("div",{class:t(e.$style.title)},"Obsidian Garden",2),a("div",{class:t(e.$style.subtitle)},"by muerwre",2)]),_:1})],2),a("div",{class:t(e.$style.section_title)},"Cheatsheet",2),(o(!0),l(f,null,v(w(_),n=>(o(),l("div",{key:"item._path",class:t(e.$style.row)},[i(d,{title:n.title,url:n._path,children:n.children},null,8,["title","url","children"])],2))),128))])}}},b={$style:k},D=m(C,[["__cssModules",b]]);export{D as default};
+import{k as m,Q as p,D as h,o,e as l,f as a,i,w as y,h as t,R as f,S as v,u as w,b as $,aa as g}from"./entry.67e3e390.js";import{f as M}from"./navigation.e6541d9a.js";import{a as k}from"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";const C={__name:"LayoutMainMenu",async setup(x){let s,r;const{data:c}=([s,r]=p(()=>h("navigation",()=>M())),s=await s,r(),s),_=c.value.filter(e=>e.children&&Array.isArray(e.children)&&e.children.length>0);return(e,A)=>{const u=$,d=g;return o(),l("nav",null,[a("div",{class:t(e.$style.logo)},[i(u,{to:"/"},{default:y(()=>[a("div",{class:t(e.$style.title)},"Obsidian Garden",2),a("div",{class:t(e.$style.subtitle)},"by muerwre",2)]),_:1})],2),a("div",{class:t(e.$style.section_title)},"Cheatsheet",2),(o(!0),l(f,null,v(w(_),n=>(o(),l("div",{key:"item._path",class:t(e.$style.row)},[i(d,{title:n.title,url:n._path,children:n.children},null,8,["title","url","children"])],2))),128))])}}},b={$style:k},D=m(C,[["__cssModules",b]]);export{D as default};
diff --git a/nuxt/LayoutMainMenuToggle.46044f42.js b/nuxt/LayoutMainMenuToggle.a62ad69a.js
similarity index 82%
rename from nuxt/LayoutMainMenuToggle.46044f42.js
rename to nuxt/LayoutMainMenuToggle.a62ad69a.js
index d4890c1..2dcd5a9 100644
--- a/nuxt/LayoutMainMenuToggle.46044f42.js
+++ b/nuxt/LayoutMainMenuToggle.a62ad69a.js
@@ -1 +1 @@
-import{a as l,o as s,e as o,h as a,f as e,k as c}from"./entry.f8ff8132.js";import{s as i}from"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";const r=e("rect",{x:"0",y:"3",width:"24",height:"2"},null,-1),h=e("rect",{x:"0",y:"11",width:"24",height:"2"},null,-1),_=e("rect",{x:"0",y:"19",width:"24",height:"2"},null,-1),u=[r,h,_],f=l({__name:"LayoutMainMenuToggle",props:{active:{type:Boolean}},setup(n){return(t,m)=>(s(),o("button",{class:a([t.$attrs.class,t.$style.button])},[(s(),o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#ffffff",class:a([t.$style.hamburger,{[t.$style.active]:n.active}])},u,2))],2))}}),d={$style:i},y=c(f,[["__cssModules",d]]);export{y as default};
+import{a as l,o as s,e as o,h as a,f as e,k as c}from"./entry.67e3e390.js";import{s as i}from"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";const r=e("rect",{x:"0",y:"3",width:"24",height:"2"},null,-1),h=e("rect",{x:"0",y:"11",width:"24",height:"2"},null,-1),_=e("rect",{x:"0",y:"19",width:"24",height:"2"},null,-1),u=[r,h,_],f=l({__name:"LayoutMainMenuToggle",props:{active:{type:Boolean}},setup(n){return(t,m)=>(s(),o("button",{class:a([t.$attrs.class,t.$style.button])},[(s(),o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#ffffff",class:a([t.$style.hamburger,{[t.$style.active]:n.active}])},u,2))],2))}}),d={$style:i},y=c(f,[["__cssModules",d]]);export{y as default};
diff --git a/nuxt/LayoutThemeToggle.51894848.js b/nuxt/LayoutThemeToggle.51894848.js
new file mode 100644
index 0000000..03deabf
--- /dev/null
+++ b/nuxt/LayoutThemeToggle.51894848.js
@@ -0,0 +1 @@
+import{_ as s,s as o}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js";import{k as t}from"./entry.67e3e390.js";const _={$style:o},a=t(s,[["__cssModules",_]]);export{a as default};
diff --git a/nuxt/LayoutThemeToggle.dfe6c45f.js b/nuxt/LayoutThemeToggle.dfe6c45f.js
deleted file mode 100644
index 5a4803c..0000000
--- a/nuxt/LayoutThemeToggle.dfe6c45f.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as s,s as o}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js";import{k as t}from"./entry.f8ff8132.js";const _={$style:o},a=t(s,[["__cssModules",_]]);export{a as default};
diff --git a/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js b/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js
similarity index 98%
rename from nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js
rename to nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js
index 3fcbc37..a84bac1 100644
--- a/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js
+++ b/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js
@@ -1,4 +1,4 @@
-import{k as v,o as i,e as d,f as u,a as h,q as p,J as q,m as _,i as M,w as T,c as g,j as m,h as $}from"./entry.f8ff8132.js";const w={},Q={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},Z=u("path",{d:"M17.85 7.55q-.7 0-1.45.075t-1.3.125q3.05 3.45 4.675 7.6Q21.4 19.5 21.4 24t-1.625 8.65Q18.15 36.8 15.15 40.2q.5.1 1.225.175.725.075 1.525.075 6.8 0 11.6-4.775T34.3 24q0-6.9-4.825-11.675T17.85 7.55Zm.25-1.5q3.6 0 6.85 1.375 3.25 1.375 5.65 3.8 2.4 2.425 3.8 5.7 1.4 3.275 1.4 7.025 0 3.75-1.425 7.05t-3.8 5.75Q28.2 39.2 24.95 40.575t-6.9 1.375q-1.65 0-3.125-.275t-2.675-.725q3.65-3.35 5.65-7.725 2-4.375 2-9.225 0-4.75-2-9.175-2-4.425-5.65-7.775 1.15-.45 2.675-.725Q16.45 6.05 18.1 6.05ZM21.4 24Z"},null,-1),C=[Z];function O(l,e){return i(),d("svg",Q,C)}const b=v(w,[["render",O]]),E=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"})),j={},S={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},z=u("path",{d:"M24 30.45q2.65 0 4.55-1.875T30.45 24q0-2.65-1.875-4.55T24 17.55q-2.65 0-4.55 1.875T17.55 24q0 2.65 1.875 4.55T24 30.45ZM24 32q-3.35 0-5.675-2.325Q16 27.35 16 24q0-3.35 2.325-5.675Q20.65 16 24 16q3.35 0 5.675 2.325Q32 20.65 32 24q0 3.35-2.325 5.675Q27.35 32 24 32ZM3.75 24.75q-.3 0-.525-.225Q3 24.3 3 24q0-.35.225-.55.225-.2.525-.2h5.5q.3 0 .525.225Q10 23.7 10 24q0 .35-.225.55-.225.2-.525.2Zm35 0q-.3 0-.525-.225Q38 24.3 38 24q0-.35.225-.55.225-.2.525-.2h5.5q.3 0 .525.225Q45 23.7 45 24q0 .35-.225.55-.225.2-.525.2ZM24 10q-.35 0-.55-.225-.2-.225-.2-.525v-5.5q0-.3.225-.525Q23.7 3 24 3q.35 0 .55.225.2.225.2.525v5.5q0 .3-.225.525Q24.3 10 24 10Zm0 35q-.35 0-.55-.225-.2-.225-.2-.525v-5.5q0-.3.225-.525Q23.7 38 24 38q.35 0 .55.225.2.225.2.525v5.5q0 .3-.225.525Q24.3 45 24 45ZM13.05 14.05l-3.2-3.1q-.25-.2-.225-.525.025-.325.225-.575.25-.25.55-.25.3 0 .55.25L14.1 13q.25.25.25.55 0 .3-.25.55-.2.2-.5.2t-.55-.25Zm24 24.1L33.9 35q-.25-.25-.25-.55 0-.3.3-.55.15-.25.45-.225.3.025.55.275l3.2 3.1q.25.2.225.525-.025.325-.225.575-.25.25-.55.25-.3 0-.55-.25ZM33.9 14.1q-.25-.2-.225-.5.025-.3.275-.55l3.1-3.2q.2-.25.525-.225.325.025.575.225.25.25.25.55 0 .3-.25.55L35 14.1q-.25.25-.55.25-.3 0-.55-.25ZM9.85 38.15q-.25-.25-.25-.55 0-.3.25-.55L13 33.9q.25-.25.55-.25.3 0 .55.25.2.2.2.5t-.25.55l-3.1 3.2q-.25.25-.55.25-.3 0-.55-.25ZM24 24Z"},null,-1),B=[z];function P(l,e){return i(),d("svg",S,B)}const y=v(j,[["render",P]]),J=Object.freeze(Object.defineProperty({__proto__:null,default:y},Symbol.toStringTag,{value:"Module"})),L="_footer_ogxvf_1",x="_filler_ogxvf_9",W={footer:L,filler:x},k=h({name:"ClientOnly",props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(l,{slots:e}){const t=p(!1);return q(()=>{t.value=!0}),r=>{var c;if(t.value)return(c=e.default)==null?void 0:c.call(e);const o=e.fallback||e.placeholder;if(o)return o();const n=r.fallback||r.placeholder||"",s=r.fallbackTag||r.placeholderTag||"span";return d(s,null,n)}}}),f=new WeakMap;function F(l){if(f.has(l))return f.get(l);const e={...l};return e.render?e.render=(t,...r)=>{var o;if(t.mounted$){const n=l.render(t,...r);return n.children===null||typeof n.children=="string"?u(n.type,n.props,n.children,n.patchFlag,n.dynamicProps,n.shapeFlag):_(n)}else return _("div",(o=t.$attrs)!=null?o:t._.attrs)}:e.template&&(e.template=`
+import{k as v,o as i,e as d,f as u,a as h,q as p,J as q,m as _,i as M,w as T,c as g,j as m,h as $}from"./entry.67e3e390.js";const w={},Q={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},Z=u("path",{d:"M17.85 7.55q-.7 0-1.45.075t-1.3.125q3.05 3.45 4.675 7.6Q21.4 19.5 21.4 24t-1.625 8.65Q18.15 36.8 15.15 40.2q.5.1 1.225.175.725.075 1.525.075 6.8 0 11.6-4.775T34.3 24q0-6.9-4.825-11.675T17.85 7.55Zm.25-1.5q3.6 0 6.85 1.375 3.25 1.375 5.65 3.8 2.4 2.425 3.8 5.7 1.4 3.275 1.4 7.025 0 3.75-1.425 7.05t-3.8 5.75Q28.2 39.2 24.95 40.575t-6.9 1.375q-1.65 0-3.125-.275t-2.675-.725q3.65-3.35 5.65-7.725 2-4.375 2-9.225 0-4.75-2-9.175-2-4.425-5.65-7.775 1.15-.45 2.675-.725Q16.45 6.05 18.1 6.05ZM21.4 24Z"},null,-1),C=[Z];function O(l,e){return i(),d("svg",Q,C)}const b=v(w,[["render",O]]),E=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"})),j={},S={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},z=u("path",{d:"M24 30.45q2.65 0 4.55-1.875T30.45 24q0-2.65-1.875-4.55T24 17.55q-2.65 0-4.55 1.875T17.55 24q0 2.65 1.875 4.55T24 30.45ZM24 32q-3.35 0-5.675-2.325Q16 27.35 16 24q0-3.35 2.325-5.675Q20.65 16 24 16q3.35 0 5.675 2.325Q32 20.65 32 24q0 3.35-2.325 5.675Q27.35 32 24 32ZM3.75 24.75q-.3 0-.525-.225Q3 24.3 3 24q0-.35.225-.55.225-.2.525-.2h5.5q.3 0 .525.225Q10 23.7 10 24q0 .35-.225.55-.225.2-.525.2Zm35 0q-.3 0-.525-.225Q38 24.3 38 24q0-.35.225-.55.225-.2.525-.2h5.5q.3 0 .525.225Q45 23.7 45 24q0 .35-.225.55-.225.2-.525.2ZM24 10q-.35 0-.55-.225-.2-.225-.2-.525v-5.5q0-.3.225-.525Q23.7 3 24 3q.35 0 .55.225.2.225.2.525v5.5q0 .3-.225.525Q24.3 10 24 10Zm0 35q-.35 0-.55-.225-.2-.225-.2-.525v-5.5q0-.3.225-.525Q23.7 38 24 38q.35 0 .55.225.2.225.2.525v5.5q0 .3-.225.525Q24.3 45 24 45ZM13.05 14.05l-3.2-3.1q-.25-.2-.225-.525.025-.325.225-.575.25-.25.55-.25.3 0 .55.25L14.1 13q.25.25.25.55 0 .3-.25.55-.2.2-.5.2t-.55-.25Zm24 24.1L33.9 35q-.25-.25-.25-.55 0-.3.3-.55.15-.25.45-.225.3.025.55.275l3.2 3.1q.25.2.225.525-.025.325-.225.575-.25.25-.55.25-.3 0-.55-.25ZM33.9 14.1q-.25-.2-.225-.5.025-.3.275-.55l3.1-3.2q.2-.25.525-.225.325.025.575.225.25.25.25.55 0 .3-.25.55L35 14.1q-.25.25-.55.25-.3 0-.55-.25ZM9.85 38.15q-.25-.25-.25-.55 0-.3.25-.55L13 33.9q.25-.25.55-.25.3 0 .55.25.2.2.2.5t-.25.55l-3.1 3.2q-.25.25-.55.25-.3 0-.55-.25ZM24 24Z"},null,-1),B=[z];function P(l,e){return i(),d("svg",S,B)}const y=v(j,[["render",P]]),J=Object.freeze(Object.defineProperty({__proto__:null,default:y},Symbol.toStringTag,{value:"Module"})),L="_footer_ogxvf_1",x="_filler_ogxvf_9",W={footer:L,filler:x},k=h({name:"ClientOnly",props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(l,{slots:e}){const t=p(!1);return q(()=>{t.value=!0}),r=>{var c;if(t.value)return(c=e.default)==null?void 0:c.call(e);const o=e.fallback||e.placeholder;if(o)return o();const n=r.fallback||r.placeholder||"",s=r.fallbackTag||r.placeholderTag||"span";return d(s,null,n)}}}),f=new WeakMap;function F(l){if(f.has(l))return f.get(l);const e={...l};return e.render?e.render=(t,...r)=>{var o;if(t.mounted$){const n=l.render(t,...r);return n.children===null||typeof n.children=="string"?u(n.type,n.props,n.children,n.patchFlag,n.dynamicProps,n.shapeFlag):_(n)}else return _("div",(o=t.$attrs)!=null?o:t._.attrs)}:e.template&&(e.template=`
       <template v-if="mounted$">${l.template}</template>
       <template v-else><div></div></template>
     `),e.setup=(t,r)=>{var n;const o=p(!1);return q(()=>{o.value=!0}),Promise.resolve(((n=l.setup)==null?void 0:n.call(l,t,r))||{}).then(s=>typeof s!="function"?{...s,mounted$:o}:(...c)=>{if(o.value){const a=s(...c);return a.children===null||typeof a.children=="string"?u(a.type,a.props,a.children,a.patchFlag,a.dynamicProps,a.shapeFlag):_(a)}else return _("div",r.attrs)})},f.set(l,e),e}const A=Object.freeze(Object.defineProperty({__proto__:null,default:k,createClientOnly:F},Symbol.toStringTag,{value:"Module"})),D=h({methods:{toggleTheme(){this.$colorMode.preference=this.$colorMode.preference==="dark"?"light":"dark"}},computed:{isDark(){return this.$colorMode.preference==="dark"}}}),G=h({...D,__name:"LayoutThemeToggle",setup(l){const e=p(!1);return q(()=>{e.value=!0}),(t,r)=>{const o=b,n=y,s=k;return i(),d("button",{onClick:r[0]||(r[0]=(...c)=>t.toggleTheme&&t.toggleTheme(...c)),class:$([t.$attrs.class,t.$style.button,{[t.$style.visible]:e.value}])},[M(s,null,{default:T(()=>[t.isDark?(i(),g(o,{key:0,fill:"currentColor",width:"32",height:"32"})):m("",!0),t.isDark?m("",!0):(i(),g(n,{key:1,fill:"currentColor",width:"32",height:"32"}))]),_:1})],2)}}}),N="_button_jz7in_1",V="_visible_jz7in_7",H={button:N,visible:V};export{E as M,J as S,G as _,W as a,k as b,A as c,H as s};
diff --git a/nuxt/Markdown.b05e9d28.js b/nuxt/Markdown.e057438e.js
similarity index 61%
rename from nuxt/Markdown.b05e9d28.js
rename to nuxt/Markdown.e057438e.js
index 17166cb..239a9d6 100644
--- a/nuxt/Markdown.b05e9d28.js
+++ b/nuxt/Markdown.e057438e.js
@@ -1 +1 @@
-import r from"./ContentSlot.1089f928.js";import{a as o,l as u,y as f,L as c}from"./entry.f8ff8132.js";const i=o({name:"Markdown",extends:r,setup(t){const{parent:e}=c(),{between:n,default:a}=u(),s=f(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:a,tags:s,between:n,parent:e}}});export{i as default};
+import r from"./ContentSlot.7d84bf08.js";import{a as o,l as u,y as f,L as c}from"./entry.67e3e390.js";const i=o({name:"Markdown",extends:r,setup(t){const{parent:e}=c(),{between:n,default:a}=u(),s=f(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:a,tags:s,between:n,parent:e}}});export{i as default};
diff --git a/nuxt/ProseA.989de2dc.js b/nuxt/ProseA.435cdbf8.js
similarity index 73%
rename from nuxt/ProseA.989de2dc.js
rename to nuxt/ProseA.435cdbf8.js
index 8b21eb3..9064c7a 100644
--- a/nuxt/ProseA.989de2dc.js
+++ b/nuxt/ProseA.435cdbf8.js
@@ -1 +1 @@
-import{a as o,o as l,c as s,w as c,r as f,b as u}from"./entry.f8ff8132.js";const i=o({__name:"ProseA",props:{href:{default:""},blank:{type:Boolean,default:!1}},setup(t){const a=e=>!e.match(/^\w+\:\/\//),n=e=>a(e)?e.toLowerCase().replaceAll("%20"," ").replace(/\d+/g,"").trim().replaceAll(" ","-"):e;return(e,p)=>{const r=u;return l(),s(r,{href:n(t.href),target:a(t.href)?"":"_blank"},{default:c(()=>[f(e.$slots,"default")]),_:3},8,["href","target"])}}});export{i as default};
+import{a as o,o as l,c as s,w as c,r as f,b as u}from"./entry.67e3e390.js";const i=o({__name:"ProseA",props:{href:{default:""},blank:{type:Boolean,default:!1}},setup(t){const a=e=>!e.match(/^\w+\:\/\//),n=e=>a(e)?e.toLowerCase().replaceAll("%20"," ").replace(/\d+/g,"").trim().replaceAll(" ","-"):e;return(e,p)=>{const r=u;return l(),s(r,{href:n(t.href),target:a(t.href)?"":"_blank"},{default:c(()=>[f(e.$slots,"default")]),_:3},8,["href","target"])}}});export{i as default};
diff --git a/nuxt/ProseBlockquote.934e49f9.js b/nuxt/ProseBlockquote.caaa6911.js
similarity index 67%
rename from nuxt/ProseBlockquote.934e49f9.js
rename to nuxt/ProseBlockquote.caaa6911.js
index 790ee12..b5be76f 100644
--- a/nuxt/ProseBlockquote.934e49f9.js
+++ b/nuxt/ProseBlockquote.caaa6911.js
@@ -1 +1 @@
-import{k as o,o as r,e as t,r as c}from"./entry.f8ff8132.js";const s={};function n(e,l){return r(),t("blockquote",null,[c(e.$slots,"default")])}const f=o(s,[["render",n]]);export{f as default};
+import{k as o,o as r,e as t,r as c}from"./entry.67e3e390.js";const s={};function n(e,l){return r(),t("blockquote",null,[c(e.$slots,"default")])}const f=o(s,[["render",n]]);export{f as default};
diff --git a/nuxt/ProseCode.e3af85ab.js b/nuxt/ProseCode.1f9853bd.js
similarity index 83%
rename from nuxt/ProseCode.e3af85ab.js
rename to nuxt/ProseCode.1f9853bd.js
index e342931..e308d37 100644
--- a/nuxt/ProseCode.e3af85ab.js
+++ b/nuxt/ProseCode.1f9853bd.js
@@ -1 +1 @@
-import i from"./UiIconCopy.85420456.js";import{a as u,o as t,e as a,f as n,h as s,i as d,t as p,j as m,r as f,k as g}from"./entry.f8ff8132.js";import{s as _}from"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";const h={key:0},y=u({__name:"ProseCode",props:{code:null,language:{default:null},filename:{default:null},highlights:{default:()=>[]}},setup(o){const l=o,r=()=>{navigator.clipboard.writeText(l.code)};return(e,k)=>{const c=i;return t(),a("div",{class:s(e.$style.wrapper)},[n("button",{class:s(e.$style.language),onClick:r},[n("span",{class:s(e.$style.icon)},[d(c,{width:"12",height:"12",fill:"currentColor"})],2),o.language?(t(),a("span",h,p(o.language),1)):m("",!0)],2),f(e.$slots,"default")],2)}}}),C={$style:_},N=g(y,[["__cssModules",C]]);export{N as default};
+import i from"./UiIconCopy.46b801d4.js";import{a as u,o as t,e as a,f as n,h as s,i as d,t as p,j as m,r as f,k as g}from"./entry.67e3e390.js";import{s as _}from"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";const h={key:0},y=u({__name:"ProseCode",props:{code:null,language:{default:null},filename:{default:null},highlights:{default:()=>[]}},setup(o){const l=o,r=()=>{navigator.clipboard.writeText(l.code)};return(e,k)=>{const c=i;return t(),a("div",{class:s(e.$style.wrapper)},[n("button",{class:s(e.$style.language),onClick:r},[n("span",{class:s(e.$style.icon)},[d(c,{width:"12",height:"12",fill:"currentColor"})],2),o.language?(t(),a("span",h,p(o.language),1)):m("",!0)],2),f(e.$slots,"default")],2)}}}),C={$style:_},N=g(y,[["__cssModules",C]]);export{N as default};
diff --git a/nuxt/ProseCodeInline.25efea15.js b/nuxt/ProseCodeInline.747a7c37.js
similarity index 65%
rename from nuxt/ProseCodeInline.25efea15.js
rename to nuxt/ProseCodeInline.747a7c37.js
index d79a1d0..4c921d8 100644
--- a/nuxt/ProseCodeInline.25efea15.js
+++ b/nuxt/ProseCodeInline.747a7c37.js
@@ -1 +1 @@
-import{k as o,o as r,e as n,r as s}from"./entry.f8ff8132.js";const t={};function c(e,a){return r(),n("code",null,[s(e.$slots,"default")])}const d=o(t,[["render",c]]);export{d as default};
+import{k as o,o as r,e as n,r as s}from"./entry.67e3e390.js";const t={};function c(e,a){return r(),n("code",null,[s(e.$slots,"default")])}const d=o(t,[["render",c]]);export{d as default};
diff --git a/nuxt/ProseEm.dcb566d5.js b/nuxt/ProseEm.0c0df6bc.js
similarity index 64%
rename from nuxt/ProseEm.dcb566d5.js
rename to nuxt/ProseEm.0c0df6bc.js
index 0792571..f73794e 100644
--- a/nuxt/ProseEm.dcb566d5.js
+++ b/nuxt/ProseEm.0c0df6bc.js
@@ -1 +1 @@
-import{k as r,o,e as s,r as t}from"./entry.f8ff8132.js";const n={};function c(e,a){return o(),s("em",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
+import{k as r,o,e as s,r as t}from"./entry.67e3e390.js";const n={};function c(e,a){return o(),s("em",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseH1.aae753c9.js b/nuxt/ProseH1.8c4f33f5.js
similarity index 69%
rename from nuxt/ProseH1.aae753c9.js
rename to nuxt/ProseH1.8c4f33f5.js
index f7bb8b7..e4eec41 100644
--- a/nuxt/ProseH1.aae753c9.js
+++ b/nuxt/ProseH1.8c4f33f5.js
@@ -1 +1 @@
-import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.f8ff8132.js";const r=["id"],c=["href"],p=i({__name:"ProseH1",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=1&&!(e!=null&&e.exclude.includes(1));return(n,h)=>(s(),o("h1",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
+import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.67e3e390.js";const r=["id"],c=["href"],p=i({__name:"ProseH1",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=1&&!(e!=null&&e.exclude.includes(1));return(n,h)=>(s(),o("h1",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
diff --git a/nuxt/ProseH2.e5674627.js b/nuxt/ProseH2.83df4280.js
similarity index 69%
rename from nuxt/ProseH2.e5674627.js
rename to nuxt/ProseH2.83df4280.js
index 8048793..6083f9f 100644
--- a/nuxt/ProseH2.e5674627.js
+++ b/nuxt/ProseH2.83df4280.js
@@ -1 +1 @@
-import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.f8ff8132.js";const r=["id"],c=["href"],p=i({__name:"ProseH2",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=2&&!(e!=null&&e.exclude.includes(2));return(n,h)=>(s(),o("h2",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
+import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.67e3e390.js";const r=["id"],c=["href"],p=i({__name:"ProseH2",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=2&&!(e!=null&&e.exclude.includes(2));return(n,h)=>(s(),o("h2",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
diff --git a/nuxt/ProseH3.ed0e0070.js b/nuxt/ProseH3.af0f4af9.js
similarity index 69%
rename from nuxt/ProseH3.ed0e0070.js
rename to nuxt/ProseH3.af0f4af9.js
index 78ede37..a61513b 100644
--- a/nuxt/ProseH3.ed0e0070.js
+++ b/nuxt/ProseH3.af0f4af9.js
@@ -1 +1 @@
-import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.f8ff8132.js";const r=["id"],c=["href"],p=i({__name:"ProseH3",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=3&&!(e!=null&&e.exclude.includes(3));return(n,h)=>(s(),o("h3",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
+import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.67e3e390.js";const r=["id"],c=["href"],p=i({__name:"ProseH3",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=3&&!(e!=null&&e.exclude.includes(3));return(n,h)=>(s(),o("h3",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
diff --git a/nuxt/ProseH4.8c1e2a49.js b/nuxt/ProseH4.44266402.js
similarity index 69%
rename from nuxt/ProseH4.8c1e2a49.js
rename to nuxt/ProseH4.44266402.js
index 441e42e..1d9a21b 100644
--- a/nuxt/ProseH4.8c1e2a49.js
+++ b/nuxt/ProseH4.44266402.js
@@ -1 +1 @@
-import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.f8ff8132.js";const r=["id"],c=["href"],p=i({__name:"ProseH4",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=4&&!(e!=null&&e.exclude.includes(4));return(n,h)=>(s(),o("h4",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
+import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.67e3e390.js";const r=["id"],c=["href"],p=i({__name:"ProseH4",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=4&&!(e!=null&&e.exclude.includes(4));return(n,h)=>(s(),o("h4",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
diff --git a/nuxt/ProseH5.f46443f6.js b/nuxt/ProseH5.478a71ed.js
similarity index 69%
rename from nuxt/ProseH5.f46443f6.js
rename to nuxt/ProseH5.478a71ed.js
index 254e4ca..dced048 100644
--- a/nuxt/ProseH5.f46443f6.js
+++ b/nuxt/ProseH5.478a71ed.js
@@ -1 +1 @@
-import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.f8ff8132.js";const r=["id"],c=["href"],p=i({__name:"ProseH5",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=5&&!(e!=null&&e.exclude.includes(5));return(n,h)=>(s(),o("h5",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
+import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.67e3e390.js";const r=["id"],c=["href"],p=i({__name:"ProseH5",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=5&&!(e!=null&&e.exclude.includes(5));return(n,h)=>(s(),o("h5",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
diff --git a/nuxt/ProseH6.1d12eb9f.js b/nuxt/ProseH6.b302c2bb.js
similarity index 69%
rename from nuxt/ProseH6.1d12eb9f.js
rename to nuxt/ProseH6.b302c2bb.js
index 7e45ddd..0554b17 100644
--- a/nuxt/ProseH6.1d12eb9f.js
+++ b/nuxt/ProseH6.b302c2bb.js
@@ -1 +1 @@
-import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.f8ff8132.js";const r=["id"],c=["href"],p=i({__name:"ProseH6",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=6&&!(e!=null&&e.exclude.includes(6));return(n,h)=>(s(),o("h6",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
+import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.67e3e390.js";const r=["id"],c=["href"],p=i({__name:"ProseH6",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=6&&!(e!=null&&e.exclude.includes(6));return(n,h)=>(s(),o("h6",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default};
diff --git a/nuxt/ProseHr.3c09cbb6.js b/nuxt/ProseHr.ec7cc3d3.js
similarity index 57%
rename from nuxt/ProseHr.3c09cbb6.js
rename to nuxt/ProseHr.ec7cc3d3.js
index 5a0b3e1..18b5aa9 100644
--- a/nuxt/ProseHr.3c09cbb6.js
+++ b/nuxt/ProseHr.ec7cc3d3.js
@@ -1 +1 @@
-import{k as e,o as r,e as c}from"./entry.f8ff8132.js";const o={};function t(n,s){return r(),c("hr")}const _=e(o,[["render",t]]);export{_ as default};
+import{k as e,o as r,e as c}from"./entry.67e3e390.js";const o={};function t(n,s){return r(),c("hr")}const _=e(o,[["render",t]]);export{_ as default};
diff --git a/nuxt/ProseImg.f4223a04.js b/nuxt/ProseImg.fb70c53a.js
similarity index 83%
rename from nuxt/ProseImg.f4223a04.js
rename to nuxt/ProseImg.fb70c53a.js
index db47023..6f484aa 100644
--- a/nuxt/ProseImg.f4223a04.js
+++ b/nuxt/ProseImg.fb70c53a.js
@@ -1 +1 @@
-import{a as e,o as i,e as a}from"./entry.f8ff8132.js";const r=["src","alt","width","height"],c=e({__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(t){return(n,h)=>(i(),a("img",{src:t.src,alt:t.alt,width:t.width,height:t.height},null,8,r))}});export{c as default};
+import{a as e,o as i,e as a}from"./entry.67e3e390.js";const r=["src","alt","width","height"],c=e({__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(t){return(n,h)=>(i(),a("img",{src:t.src,alt:t.alt,width:t.width,height:t.height},null,8,r))}});export{c as default};
diff --git a/nuxt/ProseLi.f5f48b70.js b/nuxt/ProseLi.94808e98.js
similarity index 64%
rename from nuxt/ProseLi.f5f48b70.js
rename to nuxt/ProseLi.94808e98.js
index dbe64a5..79d5dd9 100644
--- a/nuxt/ProseLi.f5f48b70.js
+++ b/nuxt/ProseLi.94808e98.js
@@ -1 +1 @@
-import{k as r,o,e as s,r as t}from"./entry.f8ff8132.js";const n={};function c(e,a){return o(),s("li",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
+import{k as r,o,e as s,r as t}from"./entry.67e3e390.js";const n={};function c(e,a){return o(),s("li",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseOl.8ecd42ef.js b/nuxt/ProseOl.79cf88eb.js
similarity index 65%
rename from nuxt/ProseOl.8ecd42ef.js
rename to nuxt/ProseOl.79cf88eb.js
index 5d6ecbf..d30430f 100644
--- a/nuxt/ProseOl.8ecd42ef.js
+++ b/nuxt/ProseOl.79cf88eb.js
@@ -1 +1 @@
-import{k as o,o as r,e as s,r as t}from"./entry.f8ff8132.js";const n={};function c(e,l){return r(),s("ol",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
+import{k as o,o as r,e as s,r as t}from"./entry.67e3e390.js";const n={};function c(e,l){return r(),s("ol",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseP.1e37594f.js b/nuxt/ProseP.6c5d1090.js
similarity index 64%
rename from nuxt/ProseP.1e37594f.js
rename to nuxt/ProseP.6c5d1090.js
index 910e0b6..799f187 100644
--- a/nuxt/ProseP.1e37594f.js
+++ b/nuxt/ProseP.6c5d1090.js
@@ -1 +1 @@
-import{k as r,o,e as s,r as t}from"./entry.f8ff8132.js";const n={};function c(e,a){return o(),s("p",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
+import{k as r,o,e as s,r as t}from"./entry.67e3e390.js";const n={};function c(e,a){return o(),s("p",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseStrong.f3ca6279.js b/nuxt/ProseStrong.e221982f.js
similarity index 65%
rename from nuxt/ProseStrong.f3ca6279.js
rename to nuxt/ProseStrong.e221982f.js
index e24ddd6..3fd5388 100644
--- a/nuxt/ProseStrong.f3ca6279.js
+++ b/nuxt/ProseStrong.e221982f.js
@@ -1 +1 @@
-import{k as r,o,e as t,r as n}from"./entry.f8ff8132.js";const s={};function c(e,a){return o(),t("strong",null,[n(e.$slots,"default")])}const f=r(s,[["render",c]]);export{f as default};
+import{k as r,o,e as t,r as n}from"./entry.67e3e390.js";const s={};function c(e,a){return o(),t("strong",null,[n(e.$slots,"default")])}const f=r(s,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseTable.848e00bb.js b/nuxt/ProseTable.38c46255.js
similarity index 65%
rename from nuxt/ProseTable.848e00bb.js
rename to nuxt/ProseTable.38c46255.js
index 102e5f1..a7a9734 100644
--- a/nuxt/ProseTable.848e00bb.js
+++ b/nuxt/ProseTable.38c46255.js
@@ -1 +1 @@
-import{k as r,o,e as t,r as s}from"./entry.f8ff8132.js";const a={};function n(e,c){return o(),t("table",null,[s(e.$slots,"default")])}const f=r(a,[["render",n]]);export{f as default};
+import{k as r,o,e as t,r as s}from"./entry.67e3e390.js";const a={};function n(e,c){return o(),t("table",null,[s(e.$slots,"default")])}const f=r(a,[["render",n]]);export{f as default};
diff --git a/nuxt/ProseTbody.52634c80.js b/nuxt/ProseTbody.19692760.js
similarity index 66%
rename from nuxt/ProseTbody.52634c80.js
rename to nuxt/ProseTbody.19692760.js
index d7eb911..ffbc3c3 100644
--- a/nuxt/ProseTbody.52634c80.js
+++ b/nuxt/ProseTbody.19692760.js
@@ -1 +1 @@
-import{k as o,o as r,e as t,r as s}from"./entry.f8ff8132.js";const n={};function c(e,a){return r(),t("tbody",null,[s(e.$slots,"default")])}const d=o(n,[["render",c]]);export{d as default};
+import{k as o,o as r,e as t,r as s}from"./entry.67e3e390.js";const n={};function c(e,a){return r(),t("tbody",null,[s(e.$slots,"default")])}const d=o(n,[["render",c]]);export{d as default};
diff --git a/nuxt/ProseTd.340aed92.js b/nuxt/ProseTd.44b1749b.js
similarity index 64%
rename from nuxt/ProseTd.340aed92.js
rename to nuxt/ProseTd.44b1749b.js
index a2cc19e..8fc6b51 100644
--- a/nuxt/ProseTd.340aed92.js
+++ b/nuxt/ProseTd.44b1749b.js
@@ -1 +1 @@
-import{k as r,o,e as t,r as s}from"./entry.f8ff8132.js";const n={};function c(e,a){return o(),t("td",null,[s(e.$slots,"default")])}const d=r(n,[["render",c]]);export{d as default};
+import{k as r,o,e as t,r as s}from"./entry.67e3e390.js";const n={};function c(e,a){return o(),t("td",null,[s(e.$slots,"default")])}const d=r(n,[["render",c]]);export{d as default};
diff --git a/nuxt/ProseTh.898f7f75.js b/nuxt/ProseTh.25f9816d.js
similarity index 64%
rename from nuxt/ProseTh.898f7f75.js
rename to nuxt/ProseTh.25f9816d.js
index 515be8f..cc5b57b 100644
--- a/nuxt/ProseTh.898f7f75.js
+++ b/nuxt/ProseTh.25f9816d.js
@@ -1 +1 @@
-import{k as r,o,e as t,r as s}from"./entry.f8ff8132.js";const n={};function c(e,a){return o(),t("th",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
+import{k as r,o,e as t,r as s}from"./entry.67e3e390.js";const n={};function c(e,a){return o(),t("th",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseThead.e6b0aae2.js b/nuxt/ProseThead.7e525844.js
similarity index 65%
rename from nuxt/ProseThead.e6b0aae2.js
rename to nuxt/ProseThead.7e525844.js
index 4834a8b..7e8fa58 100644
--- a/nuxt/ProseThead.e6b0aae2.js
+++ b/nuxt/ProseThead.7e525844.js
@@ -1 +1 @@
-import{k as r,o,e as t,r as s}from"./entry.f8ff8132.js";const a={};function n(e,c){return o(),t("thead",null,[s(e.$slots,"default")])}const d=r(a,[["render",n]]);export{d as default};
+import{k as r,o,e as t,r as s}from"./entry.67e3e390.js";const a={};function n(e,c){return o(),t("thead",null,[s(e.$slots,"default")])}const d=r(a,[["render",n]]);export{d as default};
diff --git a/nuxt/ProseTr.c191348d.js b/nuxt/ProseTr.91c3a4e0.js
similarity index 64%
rename from nuxt/ProseTr.c191348d.js
rename to nuxt/ProseTr.91c3a4e0.js
index 8f15e9a..f13f5c8 100644
--- a/nuxt/ProseTr.c191348d.js
+++ b/nuxt/ProseTr.91c3a4e0.js
@@ -1 +1 @@
-import{k as r,o,e as t,r as s}from"./entry.f8ff8132.js";const n={};function c(e,a){return o(),t("tr",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
+import{k as r,o,e as t,r as s}from"./entry.67e3e390.js";const n={};function c(e,a){return o(),t("tr",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
diff --git a/nuxt/ProseUl.7c14583d.js b/nuxt/ProseUl.85dc1033.js
similarity index 64%
rename from nuxt/ProseUl.7c14583d.js
rename to nuxt/ProseUl.85dc1033.js
index 7cd5710..e202f07 100644
--- a/nuxt/ProseUl.7c14583d.js
+++ b/nuxt/ProseUl.85dc1033.js
@@ -1 +1 @@
-import{k as r,o,e as s,r as t}from"./entry.f8ff8132.js";const n={};function c(e,l){return o(),s("ul",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
+import{k as r,o,e as s,r as t}from"./entry.67e3e390.js";const n={};function c(e,l){return o(),s("ul",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
diff --git a/nuxt/UiActionButton.8de8506c.js b/nuxt/UiActionButton.d5ab622f.js
similarity index 92%
rename from nuxt/UiActionButton.8de8506c.js
rename to nuxt/UiActionButton.d5ab622f.js
index 670cef2..def3893 100644
--- a/nuxt/UiActionButton.8de8506c.js
+++ b/nuxt/UiActionButton.d5ab622f.js
@@ -1 +1 @@
-import{a as f,o as a,c as i,w as u,e as o,r as l,h as e,j as n,f as $,b as p,k as d,a4 as m}from"./entry.f8ff8132.js";const y=f({__name:"UiActionButton",props:{href:null,size:{default:"md"},variant:{default:"outline"}},setup(t){return(s,k)=>{const r=p;return a(),i(r,{class:e([s.$style.button,s.$attrs.style,s.$style[`variant-${t.variant}`],s.$style[`size-${t.size}`],{[s.$style.prefixed]:s.$slots.prefix,[s.$style.suffixed]:s.$slots.suffix}]),to:t.href},{default:u(()=>[s.$slots.prefix?(a(),o("span",{key:0,class:e(s.$style.prefix)},[l(s.$slots,"prefix")],2)):n("",!0),$("span",{class:e(s.$style.title)},[l(s.$slots,"default")],2),s.$slots.suffix?(a(),o("span",{key:1,class:e(s.$style.suffix)},[l(s.$slots,"suffix")],2)):n("",!0)]),_:3},8,["class","to"])}}}),c={$style:m},B=d(y,[["__cssModules",c]]);export{B as default};
+import{a as f,o as a,c as i,w as u,e as o,r as l,h as e,j as n,f as $,b as p,k as d,a4 as m}from"./entry.67e3e390.js";const y=f({__name:"UiActionButton",props:{href:null,size:{default:"md"},variant:{default:"outline"}},setup(t){return(s,k)=>{const r=p;return a(),i(r,{class:e([s.$style.button,s.$attrs.style,s.$style[`variant-${t.variant}`],s.$style[`size-${t.size}`],{[s.$style.prefixed]:s.$slots.prefix,[s.$style.suffixed]:s.$slots.suffix}]),to:t.href},{default:u(()=>[s.$slots.prefix?(a(),o("span",{key:0,class:e(s.$style.prefix)},[l(s.$slots,"prefix")],2)):n("",!0),$("span",{class:e(s.$style.title)},[l(s.$slots,"default")],2),s.$slots.suffix?(a(),o("span",{key:1,class:e(s.$style.suffix)},[l(s.$slots,"suffix")],2)):n("",!0)]),_:3},8,["class","to"])}}}),c={$style:m},B=d(y,[["__cssModules",c]]);export{B as default};
diff --git a/nuxt/UiCard.fe784af1.js b/nuxt/UiCard.c1974320.js
similarity index 53%
rename from nuxt/UiCard.fe784af1.js
rename to nuxt/UiCard.c1974320.js
index a235091..1401452 100644
--- a/nuxt/UiCard.fe784af1.js
+++ b/nuxt/UiCard.c1974320.js
@@ -1 +1 @@
-import{k as e,o as a,e as o,r as t,h as r,a3 as c}from"./entry.f8ff8132.js";const l={};function n(s,d){return a(),o("div",{class:r([s.$style.card,s.$attrs.class])},[t(s.$slots,"default")],2)}const _={$style:c},u=e(l,[["render",n],["__cssModules",_]]);export{u as default};
+import{k as e,o as a,e as o,r as t,h as r,a3 as c}from"./entry.67e3e390.js";const l={};function n(s,d){return a(),o("div",{class:r([s.$style.card,s.$attrs.class])},[t(s.$slots,"default")],2)}const _={$style:c},u=e(l,[["render",n],["__cssModules",_]]);export{u as default};
diff --git a/nuxt/UiIconCopy.85420456.js b/nuxt/UiIconCopy.46b801d4.js
similarity index 86%
rename from nuxt/UiIconCopy.85420456.js
rename to nuxt/UiIconCopy.46b801d4.js
index 887a61f..fa7f2a2 100644
--- a/nuxt/UiIconCopy.85420456.js
+++ b/nuxt/UiIconCopy.46b801d4.js
@@ -1 +1 @@
-import{k as e,o,e as c,f as t}from"./entry.f8ff8132.js";const n={},s={xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#ffffff"},_=t("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1),h=t("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},null,-1),f=[_,h];function a(l,r){return o(),c("svg",s,f)}const d=e(n,[["render",a]]);export{d as default};
+import{k as e,o,e as c,f as t}from"./entry.67e3e390.js";const n={},s={xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#ffffff"},_=t("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1),h=t("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},null,-1),f=[_,h];function a(l,r){return o(),c("svg",s,f)}const d=e(n,[["render",a]]);export{d as default};
diff --git a/nuxt/UiStars.0b5a97ee.js b/nuxt/UiStars.ad96952a.js
similarity index 71%
rename from nuxt/UiStars.0b5a97ee.js
rename to nuxt/UiStars.ad96952a.js
index 989dac7..ca74560 100644
--- a/nuxt/UiStars.0b5a97ee.js
+++ b/nuxt/UiStars.ad96952a.js
@@ -1 +1 @@
-import r from"./IconStar.c0f2126f.js";import{a as c,o as e,e as t,R as _,S as u,i,h as n,k as m,a2 as p}from"./entry.f8ff8132.js";const d=c({__name:"UiStars",props:{count:null},setup(o){return(s,h)=>{const a=r;return e(),t("div",{class:n(s.$style.rating)},[(e(),t(_,null,u(5,l=>i(a,{width:22,height:"22",class:n([s.$style.star,{[s.$style.filled]:l>o.count}])},null,8,["class"])),64))],2)}}}),f={$style:p},g=m(d,[["__cssModules",f]]);export{g as default};
+import r from"./IconStar.67abd07c.js";import{a as c,o as e,e as t,R as _,S as u,i,h as n,k as m,a2 as p}from"./entry.67e3e390.js";const d=c({__name:"UiStars",props:{count:null},setup(o){return(s,h)=>{const a=r;return e(),t("div",{class:n(s.$style.rating)},[(e(),t(_,null,u(5,l=>i(a,{width:22,height:"22",class:n([s.$style.star,{[s.$style.filled]:l>o.count}])},null,8,["class"])),64))],2)}}}),f={$style:p},g=m(d,[["__cssModules",f]]);export{g as default};
diff --git a/nuxt/_...slug_.f8f430c2.js b/nuxt/_...slug_.59847726.js
similarity index 78%
rename from nuxt/_...slug_.f8f430c2.js
rename to nuxt/_...slug_.59847726.js
index 64992fe..e9b1b9b 100644
--- a/nuxt/_...slug_.f8f430c2.js
+++ b/nuxt/_...slug_.59847726.js
@@ -1 +1 @@
-import{a as _,z as c,o as u,e as i,i as t,w as o,O as m,f as a,t as p,P as d}from"./entry.f8ff8132.js";import f from"./HomeReference.e315914b.js";import"./navigation.b4be76a2.js";const x={scrollToTop:!0},b=_({...x,__name:"[...slug]",setup(B){return c({titleTemplate:n=>n?`${n} \u2022 Obsidian Garden`:"Obsidian Garden"}),(n,C)=>{const l=d,s=f,r=m;return u(),i("main",null,[t(r,null,{default:o(({doc:e})=>[a("h1",null,p(e.title),1),a("article",null,[t(l,{value:e},null,8,["value"])])]),"not-found":o(({props:{path:e}})=>[t(s,{url:e},null,8,["url"])]),_:1})])}}});export{b as default};
+import{a as _,z as c,o as u,e as i,i as t,w as o,O as m,f as a,t as p,P as d}from"./entry.67e3e390.js";import f from"./HomeReference.dcdfc2c4.js";import"./navigation.e6541d9a.js";const x={scrollToTop:!0},b=_({...x,__name:"[...slug]",setup(B){return c({titleTemplate:n=>n?`${n} \u2022 Obsidian Garden`:"Obsidian Garden"}),(n,C)=>{const l=d,s=f,r=m;return u(),i("main",null,[t(r,null,{default:o(({doc:e})=>[a("h1",null,p(e.title),1),a("article",null,[t(l,{value:e},null,8,["value"])])]),"not-found":o(({props:{path:e}})=>[t(s,{url:e},null,8,["url"])]),_:1})])}}});export{b as default};
diff --git a/nuxt/bio.3c0a5659.js b/nuxt/bio.3c0a5659.js
new file mode 100644
index 0000000..67fc3a6
--- /dev/null
+++ b/nuxt/bio.3c0a5659.js
@@ -0,0 +1 @@
+import m from"./BioHeading.40d2dead.js";import r from"./BioSkills.7301a037.js";import a from"./BioProjects.7d47d393.js";import p from"./BioCareer.79116453.js";import{a as l,o as d,e as f,f as t,i as s,h as e,k as u}from"./entry.67e3e390.js";import"./BioSkillsCard.24be210d.js";import"./UiStars.ad96952a.js";import"./IconStar.67abd07c.js";import"./UiCard.c1974320.js";import"./BioProjectCard.168802cd.js";import"./IconsCode.118b44a8.js";import"./UiActionButton.d5ab622f.js";import"./ArrowRight.5a505e4f.js";const y=l({__name:"bio",setup(g){return(o,C)=>{const n=m,c=r,i=a,_=p;return d(),f("article",{class:e(o.$style.content)},[t("section",{class:e([o.$style.section,o.$style.heading])},[s(n)],2),t("section",{class:e(o.$style.section)},[s(c)],2),t("section",{class:e(o.$style.section)},[s(i)],2),t("section",{class:e(o.$style.section)},[s(_)],2)],2)}}}),B="_section_1e0mk_1",$="_heading_1e0mk_4",h={section:B,heading:$},k={$style:h},w=u(y,[["__cssModules",k]]);export{w as default};
diff --git a/nuxt/bio.e2cfb6e3.js b/nuxt/bio.e2cfb6e3.js
deleted file mode 100644
index 71c0e8c..0000000
--- a/nuxt/bio.e2cfb6e3.js
+++ /dev/null
@@ -1 +0,0 @@
-import m from"./BioHeading.fc552931.js";import r from"./BioSkills.1cbb9b74.js";import a from"./BioProjects.9611713f.js";import p from"./BioCareer.96a55a4c.js";import{a as l,o as d,e as f,f as t,i as s,h as e,k as u}from"./entry.f8ff8132.js";import"./BioSkillsCard.dcf6f14b.js";import"./UiStars.0b5a97ee.js";import"./IconStar.c0f2126f.js";import"./UiCard.fe784af1.js";import"./BioProjectCard.4bb88134.js";import"./IconsCode.51acf16d.js";import"./UiActionButton.8de8506c.js";import"./ArrowRight.4c99b7f0.js";const y=l({__name:"bio",setup(g){return(o,C)=>{const n=m,c=r,i=a,_=p;return d(),f("article",{class:e(o.$style.content)},[t("section",{class:e([o.$style.section,o.$style.heading])},[s(n)],2),t("section",{class:e(o.$style.section)},[s(c)],2),t("section",{class:e(o.$style.section)},[s(i)],2),t("section",{class:e(o.$style.section)},[s(_)],2)],2)}}}),B="_section_1e0mk_1",$="_heading_1e0mk_4",h={section:B,heading:$},k={$style:h},w=u(y,[["__cssModules",k]]);export{w as default};
diff --git a/nuxt/client-db.4629eda6.js b/nuxt/client-db.438de858.js
similarity index 99%
rename from nuxt/client-db.4629eda6.js
rename to nuxt/client-db.438de858.js
index 803320a..cc162cf 100644
--- a/nuxt/client-db.4629eda6.js
+++ b/nuxt/client-db.438de858.js
@@ -1 +1 @@
-import{ad as S,ae as M,af as E,ag as A,ah as U,ai as j,aj as z,ak as N,al as W,am as T,M as K,I as H,an as J,s as R,ao as q}from"./entry.f8ff8132.js";const B=()=>{const n=new Map;return{hasItem(t){return n.has(t)},getItem(t){return n.get(t)||null},setItem(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return Array.from(n.keys())},clear(){n.clear()},dispose(){n.clear()}}};function G(n){return!n||typeof n.then!="function"?Promise.resolve(n):n}function p(n,...t){try{return G(n(...t))}catch(e){return Promise.reject(e)}}function k(n){const t=typeof n;return n===null||t!=="object"&&t!=="function"}function Z(n){return k(n)?n+"":JSON.stringify(n)}const F=()=>{const n=new Map;return{hasItem(t){return n.has(t)},getItem(t){return n.get(t)||null},setItem(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return Array.from(n.keys())},clear(){n.clear()},dispose(){n.clear()}}},b=["hasItem","getItem","setItem","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function Q(n,t){if(t=I(t),!t)return n;const e={...n};for(const a of b)e[a]=(i="",...s)=>n[a](t+i,...s);return e.getKeys=(a="",...i)=>n.getKeys(t+a,...i).then(s=>s.map(o=>o.substr(t.length))),e}function g(n){return n?n.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function I(n){return n=g(n),n?n+":":""}function V(n={}){const t={mounts:{"":n.driver||F()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},e=r=>{for(const u of t.mountpoints)if(r.startsWith(u))return{relativeKey:r.substring(u.length),driver:t.mounts[u]};return{relativeKey:r,driver:t.mounts[""]}},a=(r,u)=>t.mountpoints.filter(c=>c.startsWith(r)||u&&r.startsWith(c)).map(c=>({relativeBase:r.length>c.length?r.substring(c.length):void 0,mountpoint:c,driver:t.mounts[c]})),i=(r,u)=>{if(!!t.watching){u=g(u);for(const c of t.watchListeners)c(r,u)}},s=async()=>{if(!t.watching){t.watching=!0;for(const r in t.mounts)t.unwatch[r]=await C(t.mounts[r],i,r)}},o=async()=>{if(!!t.watching){for(const r in t.unwatch)await t.unwatch[r]();t.unwatch={},t.watching=!1}},h={hasItem(r){r=g(r);const{relativeKey:u,driver:c}=e(r);return p(c.hasItem,u)},getItem(r){r=g(r);const{relativeKey:u,driver:c}=e(r);return p(c.getItem,u).then(l=>S(l))},async setItem(r,u){if(u===void 0)return h.removeItem(r);r=g(r);const{relativeKey:c,driver:l}=e(r);!l.setItem||(await p(l.setItem,c,Z(u)),l.watch||i("update",r))},async removeItem(r,u=!0){r=g(r);const{relativeKey:c,driver:l}=e(r);!l.removeItem||(await p(l.removeItem,c),u&&await p(l.removeItem,c+"$"),l.watch||i("remove",r))},async getMeta(r,u){r=g(r);const{relativeKey:c,driver:l}=e(r),m=Object.create(null);if(l.getMeta&&Object.assign(m,await p(l.getMeta,c)),!u){const f=await p(l.getItem,c+"$").then(d=>S(d));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(m,f))}return m},setMeta(r,u){return this.setItem(r+"$",u)},removeMeta(r){return this.removeItem(r+"$")},async getKeys(r){r=I(r);const u=a(r,!0);let c=[];const l=[];for(const m of u){const d=(await p(m.driver.getKeys,m.relativeBase)).map(y=>m.mountpoint+g(y)).filter(y=>!c.find(w=>y.startsWith(w)));l.push(...d),c=[m.mountpoint].concat(c.filter(y=>!y.startsWith(m.mountpoint)))}return r?l.filter(m=>m.startsWith(r)&&!m.endsWith("$")):l.filter(m=>!m.endsWith("$"))},async clear(r){r=I(r),await Promise.all(a(r,!1).map(async u=>{if(u.driver.clear)return p(u.driver.clear);if(u.driver.removeItem){const c=await u.driver.getKeys();return Promise.all(c.map(l=>u.driver.removeItem(l)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(r=>x(r)))},async watch(r){return await s(),t.watchListeners.push(r),async()=>{t.watchListeners=t.watchListeners.filter(u=>u!==r),t.watchListeners.length===0&&await o()}},async unwatch(){t.watchListeners=[],await o()},mount(r,u){if(r=I(r),r&&t.mounts[r])throw new Error(`already mounted at ${r}`);return r&&(t.mountpoints.push(r),t.mountpoints.sort((c,l)=>l.length-c.length)),t.mounts[r]=u,t.watching&&Promise.resolve(C(u,i,r)).then(c=>{t.unwatch[r]=c}).catch(console.error),h},async unmount(r,u=!0){r=I(r),!(!r||!t.mounts[r])&&(t.watching&&r in t.unwatch&&(t.unwatch[r](),delete t.unwatch[r]),u&&await x(t.mounts[r]),t.mountpoints=t.mountpoints.filter(c=>c!==r),delete t.mounts[r])}};return h}function C(n,t,e){return n.watch?n.watch((a,i)=>t(a,e+i)):()=>{}}async function x(n){typeof n.dispose=="function"&&await p(n.dispose)}function X(n={}){const t=ee(e,n.operators);function e(a,i){return typeof i!="object"||i instanceof RegExp?t.$eq(a,i):Object.keys(i||{}).every(s=>{const o=i[s];if(s.startsWith("$")&&t[s]){const h=t[s];return typeof h=="function"?h(a,o):!1}return e(M(a,s),o)})}return e}function ee(n,t={}){return{$match:(e,a)=>n(e,a),$eq:(e,a)=>a instanceof RegExp?a.test(e):e===a,$ne:(e,a)=>a instanceof RegExp?!a.test(e):e!==a,$not:(e,a)=>!n(e,a),$and:(e,a)=>(E(a,"$and requires an array as condition"),a.every(i=>n(e,i))),$or:(e,a)=>(E(a,"$or requires an array as condition"),a.some(i=>n(e,i))),$in:(e,a)=>A(a).some(i=>Array.isArray(e)?n(e,{$contains:i}):n(e,i)),$contains:(e,a)=>(e=Array.isArray(e)?e:String(e),A(a).every(i=>e.includes(i))),$icontains:(e,a)=>{if(typeof a!="string")throw new TypeError("$icontains requires a string, use $contains instead");return e=String(e).toLocaleLowerCase(),A(a).every(i=>e.includes(i.toLocaleLowerCase()))},$containsAny:(e,a)=>(E(a,"$containsAny requires an array as condition"),e=Array.isArray(e)?e:String(e),a.some(i=>e.includes(i))),$exists:(e,a)=>a?typeof e<"u":typeof e>"u",$type:(e,a)=>typeof e===String(a),$regex:(e,a)=>{if(!(a instanceof RegExp)){const i=String(a).match(/\/(.*)\/([dgimsuy]*)$/);a=i?new RegExp(i[1],i[2]||""):new RegExp(a)}return a.test(String(e||""))},$lt:(e,a)=>e<a,$lte:(e,a)=>e<=a,$gt:(e,a)=>e>a,$gte:(e,a)=>e>=a,...t||{}}}function P(n){const t=X(),e=(i,{query:s,before:o,after:h})=>{const r=typeof s=="string"?{_path:s}:s,u=i.findIndex(l=>t(l,r));o=o||1,h=h||1;const c=new Array(o+h).fill(null,0);return u===-1?c:c.map((l,m)=>i[u-o+m+Number(m>=o)]||null)},a=[(i,s)=>i.filter(o=>A(s.where).every(h=>t(o,h))),(i,s)=>A(s.sort).forEach(o=>U(i,o)),(i,s)=>s.surround?e(i,s.surround):i,(i,s)=>s.skip?i.slice(s.skip):i,(i,s)=>s.limit?i.slice(0,s.limit):i,(i,s)=>j(z(s.without))(i),(i,s)=>j(N(s.only))(i),(i,s)=>s.first?i[0]:i];return async i=>{const s=await n();return a.reduce((o,h)=>h(o,i.params())||o,s)}}var te={exports:{}};(function(n,t){(function(e,a,i){n.exports=i(),n.exports.default=i()})("slugify",W,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),a=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var h=a[o.locale]||{},r=o.replacement===void 0?"-":o.replacement,u=o.trim===void 0?!0:o.trim,c=s.normalize().split("").reduce(function(l,m){var f=h[m]||e[m]||m;return f===r&&(f=" "),l+f.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(c=c.replace(/[^A-Za-z0-9\s]/g,"")),u&&(c=c.trim()),c=c.replace(/\s+/g,r),o.lower&&(c=c.toLowerCase()),c}return i.extend=function(s){Object.assign(e,s)},i})})(te);const re=n=>n.split(/[\s-]/g).map(T).join(" ");function ne(n,t){const{navigation:e}=K().content,a=s=>({...ie(["title",...e.fields])(s),...se(s==null?void 0:s.navigation)?s.navigation:{}}),i=n.sort((s,o)=>s._path.localeCompare(o._path)).reduce((s,o)=>{const h=o._path.substring(1).split("/"),r=o._id.split(":").slice(1),u=!!r[r.length-1].match(/([1-9][0-9]*\.)?index.md/g),c=f=>({title:f.title,_path:f._path,_file:f._file,children:[],...a(f),...f._draft?{_draft:!0}:{}}),l=c(o);if(u){const f=t[l._path];if(typeof(f==null?void 0:f.navigation)<"u"&&!(f!=null&&f.navigation))return s;if(o._path!=="/"){const d=c(o);l.children.push(d)}Object.assign(l,a(f))}return h.length===1?(s.push(l),s):(h.slice(0,-1).reduce((f,d,y)=>{const w="/"+h.slice(0,y+1).join("/"),v=t[w];if(typeof(v==null?void 0:v.navigation)<"u"&&!v.navigation)return[];let O=f.find(Y=>Y._path===w);return O||(O={title:re(d),_path:w,_file:o._file,children:[],...a(v)},f.push(O)),O.children},s).push(l),s)},[]);return D(i)}const ae=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function D(n){const t=n.sort((e,a)=>ae.compare(e._file,a._file));for(const e of t)e.children.length?D(e.children):delete e.children,delete e._file;return n}function ie(n){return t=>(t=t||{},n&&n.length?n.filter(e=>typeof t[e]<"u").reduce((e,a)=>Object.assign(e,{[a]:t[a]}),{}):t)}function se(n){return Object.prototype.toString.call(n)==="[object Object]"}const oe=n=>q(n,"/api/"+K().public.content.base),ce=Q(V({driver:B()}),"@content"),L=()=>H("previewToken").value;function ue(n){async function t(){const e=new Set(await n.getKeys("cache:")),a=L();if(a){(await n.getItem(`${a}$`).then(r=>r||{})).ignoreBuiltContents&&e.clear();const o=await n.getKeys(`${a}:`),h=await Promise.all(o.map(r=>n.getItem(r)));for(const r of h)e.delete(`cache:${r._id}`),r.__deleted||e.add(`${a}:${r._id}`)}return await Promise.all(Array.from(e).map(s=>n.getItem(s)))}return{storage:n,fetch:P(t),query:e=>J(P(t),e)}}let _,$;async function le(){return $?await $:_||($=fe(),_=await $),_}async function fe(){const n=R(),{clientDB:t}=K().public.content,e=ue(ce),a=await e.storage.getItem("integrity");if(t.integrity!==+a){const{contents:i,navigation:s}=await $fetch(oe("cache.json"));await Promise.all(i.map(o=>e.storage.setItem(`cache:${o._id}`,o))),await e.storage.setItem("navigation",s),await e.storage.setItem("integrity",t.integrity)}return await n.callHook("content:storage",e.storage),e}async function me(n){const t=await le();if(!L()&&Object.keys(n||{}).length===0)return t.storage.getItem("navigation");const e=await t.query(n).where({_partial:!1,navigation:{$ne:!1}}).find(),i=(await t.query().where({_path:/\/_dir$/i,_partial:!0}).find()).reduce((s,o)=>{o.title.toLowerCase()==="dir"&&(o.title=void 0);const h=o._path.split("/").slice(0,-1).join("/")||"/";return s[h]={...o,...o.body},s},{});return ne(e,i)}export{ce as contentStorage,ue as createDB,me as generateNavigation,L as getPreview,le as useContentDatabase};
+import{ad as S,ae as M,af as E,ag as A,ah as U,ai as j,aj as z,ak as N,al as W,am as T,M as K,I as H,an as J,s as R,ao as q}from"./entry.67e3e390.js";const B=()=>{const n=new Map;return{hasItem(t){return n.has(t)},getItem(t){return n.get(t)||null},setItem(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return Array.from(n.keys())},clear(){n.clear()},dispose(){n.clear()}}};function G(n){return!n||typeof n.then!="function"?Promise.resolve(n):n}function p(n,...t){try{return G(n(...t))}catch(e){return Promise.reject(e)}}function k(n){const t=typeof n;return n===null||t!=="object"&&t!=="function"}function Z(n){return k(n)?n+"":JSON.stringify(n)}const F=()=>{const n=new Map;return{hasItem(t){return n.has(t)},getItem(t){return n.get(t)||null},setItem(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return Array.from(n.keys())},clear(){n.clear()},dispose(){n.clear()}}},b=["hasItem","getItem","setItem","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function Q(n,t){if(t=I(t),!t)return n;const e={...n};for(const a of b)e[a]=(i="",...s)=>n[a](t+i,...s);return e.getKeys=(a="",...i)=>n.getKeys(t+a,...i).then(s=>s.map(o=>o.substr(t.length))),e}function g(n){return n?n.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function I(n){return n=g(n),n?n+":":""}function V(n={}){const t={mounts:{"":n.driver||F()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},e=r=>{for(const u of t.mountpoints)if(r.startsWith(u))return{relativeKey:r.substring(u.length),driver:t.mounts[u]};return{relativeKey:r,driver:t.mounts[""]}},a=(r,u)=>t.mountpoints.filter(c=>c.startsWith(r)||u&&r.startsWith(c)).map(c=>({relativeBase:r.length>c.length?r.substring(c.length):void 0,mountpoint:c,driver:t.mounts[c]})),i=(r,u)=>{if(!!t.watching){u=g(u);for(const c of t.watchListeners)c(r,u)}},s=async()=>{if(!t.watching){t.watching=!0;for(const r in t.mounts)t.unwatch[r]=await C(t.mounts[r],i,r)}},o=async()=>{if(!!t.watching){for(const r in t.unwatch)await t.unwatch[r]();t.unwatch={},t.watching=!1}},h={hasItem(r){r=g(r);const{relativeKey:u,driver:c}=e(r);return p(c.hasItem,u)},getItem(r){r=g(r);const{relativeKey:u,driver:c}=e(r);return p(c.getItem,u).then(l=>S(l))},async setItem(r,u){if(u===void 0)return h.removeItem(r);r=g(r);const{relativeKey:c,driver:l}=e(r);!l.setItem||(await p(l.setItem,c,Z(u)),l.watch||i("update",r))},async removeItem(r,u=!0){r=g(r);const{relativeKey:c,driver:l}=e(r);!l.removeItem||(await p(l.removeItem,c),u&&await p(l.removeItem,c+"$"),l.watch||i("remove",r))},async getMeta(r,u){r=g(r);const{relativeKey:c,driver:l}=e(r),m=Object.create(null);if(l.getMeta&&Object.assign(m,await p(l.getMeta,c)),!u){const f=await p(l.getItem,c+"$").then(d=>S(d));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(m,f))}return m},setMeta(r,u){return this.setItem(r+"$",u)},removeMeta(r){return this.removeItem(r+"$")},async getKeys(r){r=I(r);const u=a(r,!0);let c=[];const l=[];for(const m of u){const d=(await p(m.driver.getKeys,m.relativeBase)).map(y=>m.mountpoint+g(y)).filter(y=>!c.find(w=>y.startsWith(w)));l.push(...d),c=[m.mountpoint].concat(c.filter(y=>!y.startsWith(m.mountpoint)))}return r?l.filter(m=>m.startsWith(r)&&!m.endsWith("$")):l.filter(m=>!m.endsWith("$"))},async clear(r){r=I(r),await Promise.all(a(r,!1).map(async u=>{if(u.driver.clear)return p(u.driver.clear);if(u.driver.removeItem){const c=await u.driver.getKeys();return Promise.all(c.map(l=>u.driver.removeItem(l)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(r=>x(r)))},async watch(r){return await s(),t.watchListeners.push(r),async()=>{t.watchListeners=t.watchListeners.filter(u=>u!==r),t.watchListeners.length===0&&await o()}},async unwatch(){t.watchListeners=[],await o()},mount(r,u){if(r=I(r),r&&t.mounts[r])throw new Error(`already mounted at ${r}`);return r&&(t.mountpoints.push(r),t.mountpoints.sort((c,l)=>l.length-c.length)),t.mounts[r]=u,t.watching&&Promise.resolve(C(u,i,r)).then(c=>{t.unwatch[r]=c}).catch(console.error),h},async unmount(r,u=!0){r=I(r),!(!r||!t.mounts[r])&&(t.watching&&r in t.unwatch&&(t.unwatch[r](),delete t.unwatch[r]),u&&await x(t.mounts[r]),t.mountpoints=t.mountpoints.filter(c=>c!==r),delete t.mounts[r])}};return h}function C(n,t,e){return n.watch?n.watch((a,i)=>t(a,e+i)):()=>{}}async function x(n){typeof n.dispose=="function"&&await p(n.dispose)}function X(n={}){const t=ee(e,n.operators);function e(a,i){return typeof i!="object"||i instanceof RegExp?t.$eq(a,i):Object.keys(i||{}).every(s=>{const o=i[s];if(s.startsWith("$")&&t[s]){const h=t[s];return typeof h=="function"?h(a,o):!1}return e(M(a,s),o)})}return e}function ee(n,t={}){return{$match:(e,a)=>n(e,a),$eq:(e,a)=>a instanceof RegExp?a.test(e):e===a,$ne:(e,a)=>a instanceof RegExp?!a.test(e):e!==a,$not:(e,a)=>!n(e,a),$and:(e,a)=>(E(a,"$and requires an array as condition"),a.every(i=>n(e,i))),$or:(e,a)=>(E(a,"$or requires an array as condition"),a.some(i=>n(e,i))),$in:(e,a)=>A(a).some(i=>Array.isArray(e)?n(e,{$contains:i}):n(e,i)),$contains:(e,a)=>(e=Array.isArray(e)?e:String(e),A(a).every(i=>e.includes(i))),$icontains:(e,a)=>{if(typeof a!="string")throw new TypeError("$icontains requires a string, use $contains instead");return e=String(e).toLocaleLowerCase(),A(a).every(i=>e.includes(i.toLocaleLowerCase()))},$containsAny:(e,a)=>(E(a,"$containsAny requires an array as condition"),e=Array.isArray(e)?e:String(e),a.some(i=>e.includes(i))),$exists:(e,a)=>a?typeof e<"u":typeof e>"u",$type:(e,a)=>typeof e===String(a),$regex:(e,a)=>{if(!(a instanceof RegExp)){const i=String(a).match(/\/(.*)\/([dgimsuy]*)$/);a=i?new RegExp(i[1],i[2]||""):new RegExp(a)}return a.test(String(e||""))},$lt:(e,a)=>e<a,$lte:(e,a)=>e<=a,$gt:(e,a)=>e>a,$gte:(e,a)=>e>=a,...t||{}}}function P(n){const t=X(),e=(i,{query:s,before:o,after:h})=>{const r=typeof s=="string"?{_path:s}:s,u=i.findIndex(l=>t(l,r));o=o||1,h=h||1;const c=new Array(o+h).fill(null,0);return u===-1?c:c.map((l,m)=>i[u-o+m+Number(m>=o)]||null)},a=[(i,s)=>i.filter(o=>A(s.where).every(h=>t(o,h))),(i,s)=>A(s.sort).forEach(o=>U(i,o)),(i,s)=>s.surround?e(i,s.surround):i,(i,s)=>s.skip?i.slice(s.skip):i,(i,s)=>s.limit?i.slice(0,s.limit):i,(i,s)=>j(z(s.without))(i),(i,s)=>j(N(s.only))(i),(i,s)=>s.first?i[0]:i];return async i=>{const s=await n();return a.reduce((o,h)=>h(o,i.params())||o,s)}}var te={exports:{}};(function(n,t){(function(e,a,i){n.exports=i(),n.exports.default=i()})("slugify",W,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),a=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var h=a[o.locale]||{},r=o.replacement===void 0?"-":o.replacement,u=o.trim===void 0?!0:o.trim,c=s.normalize().split("").reduce(function(l,m){var f=h[m]||e[m]||m;return f===r&&(f=" "),l+f.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(c=c.replace(/[^A-Za-z0-9\s]/g,"")),u&&(c=c.trim()),c=c.replace(/\s+/g,r),o.lower&&(c=c.toLowerCase()),c}return i.extend=function(s){Object.assign(e,s)},i})})(te);const re=n=>n.split(/[\s-]/g).map(T).join(" ");function ne(n,t){const{navigation:e}=K().content,a=s=>({...ie(["title",...e.fields])(s),...se(s==null?void 0:s.navigation)?s.navigation:{}}),i=n.sort((s,o)=>s._path.localeCompare(o._path)).reduce((s,o)=>{const h=o._path.substring(1).split("/"),r=o._id.split(":").slice(1),u=!!r[r.length-1].match(/([1-9][0-9]*\.)?index.md/g),c=f=>({title:f.title,_path:f._path,_file:f._file,children:[],...a(f),...f._draft?{_draft:!0}:{}}),l=c(o);if(u){const f=t[l._path];if(typeof(f==null?void 0:f.navigation)<"u"&&!(f!=null&&f.navigation))return s;if(o._path!=="/"){const d=c(o);l.children.push(d)}Object.assign(l,a(f))}return h.length===1?(s.push(l),s):(h.slice(0,-1).reduce((f,d,y)=>{const w="/"+h.slice(0,y+1).join("/"),v=t[w];if(typeof(v==null?void 0:v.navigation)<"u"&&!v.navigation)return[];let O=f.find(Y=>Y._path===w);return O||(O={title:re(d),_path:w,_file:o._file,children:[],...a(v)},f.push(O)),O.children},s).push(l),s)},[]);return D(i)}const ae=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function D(n){const t=n.sort((e,a)=>ae.compare(e._file,a._file));for(const e of t)e.children.length?D(e.children):delete e.children,delete e._file;return n}function ie(n){return t=>(t=t||{},n&&n.length?n.filter(e=>typeof t[e]<"u").reduce((e,a)=>Object.assign(e,{[a]:t[a]}),{}):t)}function se(n){return Object.prototype.toString.call(n)==="[object Object]"}const oe=n=>q(n,"/api/"+K().public.content.base),ce=Q(V({driver:B()}),"@content"),L=()=>H("previewToken").value;function ue(n){async function t(){const e=new Set(await n.getKeys("cache:")),a=L();if(a){(await n.getItem(`${a}$`).then(r=>r||{})).ignoreBuiltContents&&e.clear();const o=await n.getKeys(`${a}:`),h=await Promise.all(o.map(r=>n.getItem(r)));for(const r of h)e.delete(`cache:${r._id}`),r.__deleted||e.add(`${a}:${r._id}`)}return await Promise.all(Array.from(e).map(s=>n.getItem(s)))}return{storage:n,fetch:P(t),query:e=>J(P(t),e)}}let _,$;async function le(){return $?await $:_||($=fe(),_=await $),_}async function fe(){const n=R(),{clientDB:t}=K().public.content,e=ue(ce),a=await e.storage.getItem("integrity");if(t.integrity!==+a){const{contents:i,navigation:s}=await $fetch(oe("cache.json"));await Promise.all(i.map(o=>e.storage.setItem(`cache:${o._id}`,o))),await e.storage.setItem("navigation",s),await e.storage.setItem("integrity",t.integrity)}return await n.callHook("content:storage",e.storage),e}async function me(n){const t=await le();if(!L()&&Object.keys(n||{}).length===0)return t.storage.getItem("navigation");const e=await t.query(n).where({_partial:!1,navigation:{$ne:!1}}).find(),i=(await t.query().where({_path:/\/_dir$/i,_partial:!0}).find()).reduce((s,o)=>{o.title.toLowerCase()==="dir"&&(o.title=void 0);const h=o._path.split("/").slice(0,-1).join("/")||"/";return s[h]={...o,...o.body},s},{});return ne(e,i)}export{ce as contentStorage,ue as createDB,me as generateNavigation,L as getPreview,le as useContentDatabase};
diff --git a/nuxt/component.vue3.4bbb1026.js b/nuxt/component.vue3.fc91041a.js
similarity index 73%
rename from nuxt/component.vue3.4bbb1026.js
rename to nuxt/component.vue3.fc91041a.js
index 81d776a..2a47d8a 100644
--- a/nuxt/component.vue3.4bbb1026.js
+++ b/nuxt/component.vue3.fc91041a.js
@@ -1 +1 @@
-import{b as a}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js";import{k as n,ar as r,o as c,c as l,w as p,r as s}from"./entry.f8ff8132.js";const _={name:r,props:{placeholder:String,tag:{type:String,default:"span"}}};function d(t,m,e,f,i,u){const o=a;return c(),l(o,{placeholder:e.placeholder,"placeholder-tag":e.tag},{default:p(()=>[s(t.$slots,"default")]),_:3},8,["placeholder","placeholder-tag"])}const x=n(_,[["render",d]]);export{x as default};
+import{b as a}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js";import{k as n,ar as r,o as c,c as l,w as p,r as s}from"./entry.67e3e390.js";const _={name:r,props:{placeholder:String,tag:{type:String,default:"span"}}};function d(t,m,e,f,i,u){const o=a;return c(),l(o,{placeholder:e.placeholder,"placeholder-tag":e.tag},{default:p(()=>[s(t.$slots,"default")]),_:3},8,["placeholder","placeholder-tag"])}const x=n(_,[["render",d]]);export{x as default};
diff --git a/nuxt/content.741e4176.js b/nuxt/content.35f5cbec.js
similarity index 65%
rename from nuxt/content.741e4176.js
rename to nuxt/content.35f5cbec.js
index cdea10d..936bf6e 100644
--- a/nuxt/content.741e4176.js
+++ b/nuxt/content.35f5cbec.js
@@ -1 +1 @@
-import r from"./LayoutThemeToggle.dfe6c45f.js";import a from"./LayoutFooter.01993b55.js";import{k as c,o as _,e as l,f as m,i as t,h as o,r as p}from"./entry.f8ff8132.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js";const f="_wrapper_1hfaq_1",u="_content_1hfaq_7",d="_footer_1hfaq_22",h="_theme_toggle_1hfaq_28",g={wrapper:f,content:u,footer:d,theme_toggle:h},i={};function y(e,q){const s=r,n=a;return _(),l("div",{class:o(e.$style.wrapper)},[m("div",{class:o(e.$style.content)},[t(s,{class:o(e.$style.theme_toggle)},null,8,["class"]),p(e.$slots,"default")],2),t(n,{class:o(e.$style.footer)},null,8,["class"])],2)}const $={$style:g},L=c(i,[["render",y],["__cssModules",$]]);export{L as default};
+import r from"./LayoutThemeToggle.51894848.js";import a from"./LayoutFooter.e4ddbcf6.js";import{k as c,o as _,e as l,f as m,i as t,h as o,r as p}from"./entry.67e3e390.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js";const f="_wrapper_1hfaq_1",u="_content_1hfaq_7",d="_footer_1hfaq_22",h="_theme_toggle_1hfaq_28",g={wrapper:f,content:u,footer:d,theme_toggle:h},i={};function y(e,q){const s=r,n=a;return _(),l("div",{class:o(e.$style.wrapper)},[m("div",{class:o(e.$style.content)},[t(s,{class:o(e.$style.theme_toggle)},null,8,["class"]),p(e.$slots,"default")],2),t(n,{class:o(e.$style.footer)},null,8,["class"])],2)}const $={$style:g},L=c(i,[["render",y],["__cssModules",$]]);export{L as default};
diff --git a/nuxt/default.2294e3b6.js b/nuxt/default.677dc96c.js
similarity index 94%
rename from nuxt/default.2294e3b6.js
rename to nuxt/default.677dc96c.js
index 18b7bf3..19c8a2b 100644
--- a/nuxt/default.2294e3b6.js
+++ b/nuxt/default.677dc96c.js
@@ -1 +1 @@
-import T from"./LayoutMainMenuToggle.46044f42.js";import $ from"./LayoutMainMenu.73696950.js";import{k as M,a as B,q as P,J as L,ab as V,y as A,ac as k,o as C,e as E,i as m,h as l,f as y,w as H,r as I,a6 as D}from"./entry.f8ff8132.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./navigation.b4be76a2.js";function O(o){if(Array.isArray(o)){for(var e=0,t=Array(o.length);e<o.length;e++)t[e]=o[e];return t}else return Array.from(o)}var p=!1;if(typeof window<"u"){var h={get passive(){p=!0}};window.addEventListener("testPassive",null,h),window.removeEventListener("testPassive",null,h)}var u=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),r=[],c=!1,g=-1,d=void 0,s=void 0,a=void 0,b=function(e){return r.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},f=function(e){var t=e||window.event;return b(t.target)||t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)},F=function(e){if(a===void 0){var t=!!e&&e.reserveScrollBarGap===!0,i=window.innerWidth-document.documentElement.clientWidth;if(t&&i>0){var n=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);a=document.body.style.paddingRight,document.body.style.paddingRight=n+i+"px"}}d===void 0&&(d=document.body.style.overflow,document.body.style.overflow="hidden")},R=function(){a!==void 0&&(document.body.style.paddingRight=a,a=void 0),d!==void 0&&(document.body.style.overflow=d,d=void 0)},Y=function(){return window.requestAnimationFrame(function(){if(s===void 0){s={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,i=e.scrollX,n=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-i,setTimeout(function(){return window.requestAnimationFrame(function(){var v=n-window.innerHeight;v&&t>=n&&(document.body.style.top=-(t+v))})},300)}})},q=function(){if(s!==void 0){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=s.position,document.body.style.top=s.top,document.body.style.left=s.left,window.scrollTo(t,e),s=void 0}},N=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},W=function(e,t){var i=e.targetTouches[0].clientY-g;return b(e.target)?!1:t&&t.scrollTop===0&&i>0||N(t)&&i<0?f(e):(e.stopPropagation(),!0)},z=function(e,t){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!r.some(function(n){return n.targetElement===e})){var i={targetElement:e,options:t||{}};r=[].concat(O(r),[i]),u?Y():F(t),u&&(e.ontouchstart=function(n){n.targetTouches.length===1&&(g=n.targetTouches[0].clientY)},e.ontouchmove=function(n){n.targetTouches.length===1&&W(n,e)},c||(document.addEventListener("touchmove",f,p?{passive:!1}:void 0),c=!0))}},J=function(){u&&(r.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),c&&(document.removeEventListener("touchmove",f,p?{passive:!1}:void 0),c=!1),g=-1),u?q():R(),r=[]};const U="_grid_bdvnl_1",X="_main_bdvnl_17",j="_sidebar_bdvnl_25",x="_active_bdvnl_38",G="_menu_bdvnl_44",K="_menu_toggle_bdvnl_64",Q="_shifted_bdvnl_81",Z="_footer_bdvnl_88",ee={grid:U,main:X,sidebar:j,active:x,menu:G,menu_toggle:K,shifted:Q,footer:Z},oe=B({setup(){const o=P(0),e=()=>{o.value=window.scrollY};return L(()=>addEventListener("scroll",e)),V(()=>removeEventListener("scroll",e)),{menuShifted:A(()=>o.value>60),scrollTop:o}},data(){return{menuVisible:!1}},methods:{toggleMenu(){this.$data.menuVisible=!this.$data.menuVisible}},watch:{$route(){!this.menuVisible||k(()=>this.toggleMenu())},menuVisible(o){o&&z(this.$refs.sidebar),J()}}});function te(o,e,t,i,n,v){const w=T,_=$,S=D;return C(),E("div",{class:l(o.$style.grid)},[m(w,{active:o.menuVisible,class:l([o.$style.menu_toggle,{[o.$style.shifted]:o.menuShifted,[o.$style.active]:o.menuVisible}]),onClick:o.toggleMenu},null,8,["active","class","onClick"]),y("div",{class:l([o.$style.sidebar,{[o.$style.active]:o.menuVisible}]),ref:"sidebar"},[y("div",{class:l(o.$style.menu)},[m(_)],2)],2),y("div",{class:l(o.$style.main)},[m(S,{name:"content"},{default:H(()=>[I(o.$slots,"default")]),_:3})],2)],2)}const ne={$style:ee},ae=M(oe,[["render",te],["__cssModules",ne]]);export{ae as default};
+import T from"./LayoutMainMenuToggle.a62ad69a.js";import $ from"./LayoutMainMenu.ced8ac76.js";import{k as M,a as B,q as P,J as L,ab as V,y as A,ac as k,o as C,e as E,i as m,h as l,f as y,w as H,r as I,a6 as D}from"./entry.67e3e390.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./navigation.e6541d9a.js";function O(o){if(Array.isArray(o)){for(var e=0,t=Array(o.length);e<o.length;e++)t[e]=o[e];return t}else return Array.from(o)}var p=!1;if(typeof window<"u"){var h={get passive(){p=!0}};window.addEventListener("testPassive",null,h),window.removeEventListener("testPassive",null,h)}var u=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),r=[],c=!1,g=-1,d=void 0,s=void 0,a=void 0,b=function(e){return r.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},f=function(e){var t=e||window.event;return b(t.target)||t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)},F=function(e){if(a===void 0){var t=!!e&&e.reserveScrollBarGap===!0,i=window.innerWidth-document.documentElement.clientWidth;if(t&&i>0){var n=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);a=document.body.style.paddingRight,document.body.style.paddingRight=n+i+"px"}}d===void 0&&(d=document.body.style.overflow,document.body.style.overflow="hidden")},R=function(){a!==void 0&&(document.body.style.paddingRight=a,a=void 0),d!==void 0&&(document.body.style.overflow=d,d=void 0)},Y=function(){return window.requestAnimationFrame(function(){if(s===void 0){s={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,i=e.scrollX,n=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-i,setTimeout(function(){return window.requestAnimationFrame(function(){var v=n-window.innerHeight;v&&t>=n&&(document.body.style.top=-(t+v))})},300)}})},q=function(){if(s!==void 0){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=s.position,document.body.style.top=s.top,document.body.style.left=s.left,window.scrollTo(t,e),s=void 0}},N=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},W=function(e,t){var i=e.targetTouches[0].clientY-g;return b(e.target)?!1:t&&t.scrollTop===0&&i>0||N(t)&&i<0?f(e):(e.stopPropagation(),!0)},z=function(e,t){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!r.some(function(n){return n.targetElement===e})){var i={targetElement:e,options:t||{}};r=[].concat(O(r),[i]),u?Y():F(t),u&&(e.ontouchstart=function(n){n.targetTouches.length===1&&(g=n.targetTouches[0].clientY)},e.ontouchmove=function(n){n.targetTouches.length===1&&W(n,e)},c||(document.addEventListener("touchmove",f,p?{passive:!1}:void 0),c=!0))}},J=function(){u&&(r.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),c&&(document.removeEventListener("touchmove",f,p?{passive:!1}:void 0),c=!1),g=-1),u?q():R(),r=[]};const U="_grid_bdvnl_1",X="_main_bdvnl_17",j="_sidebar_bdvnl_25",x="_active_bdvnl_38",G="_menu_bdvnl_44",K="_menu_toggle_bdvnl_64",Q="_shifted_bdvnl_81",Z="_footer_bdvnl_88",ee={grid:U,main:X,sidebar:j,active:x,menu:G,menu_toggle:K,shifted:Q,footer:Z},oe=B({setup(){const o=P(0),e=()=>{o.value=window.scrollY};return L(()=>addEventListener("scroll",e)),V(()=>removeEventListener("scroll",e)),{menuShifted:A(()=>o.value>60),scrollTop:o}},data(){return{menuVisible:!1}},methods:{toggleMenu(){this.$data.menuVisible=!this.$data.menuVisible}},watch:{$route(){!this.menuVisible||k(()=>this.toggleMenu())},menuVisible(o){o&&z(this.$refs.sidebar),J()}}});function te(o,e,t,i,n,v){const w=T,_=$,S=D;return C(),E("div",{class:l(o.$style.grid)},[m(w,{active:o.menuVisible,class:l([o.$style.menu_toggle,{[o.$style.shifted]:o.menuShifted,[o.$style.active]:o.menuVisible}]),onClick:o.toggleMenu},null,8,["active","class","onClick"]),y("div",{class:l([o.$style.sidebar,{[o.$style.active]:o.menuVisible}]),ref:"sidebar"},[y("div",{class:l(o.$style.menu)},[m(_)],2)],2),y("div",{class:l(o.$style.main)},[m(S,{name:"content"},{default:H(()=>[I(o.$slots,"default")]),_:3})],2)],2)}const ne={$style:ee},ae=M(oe,[["render",te],["__cssModules",ne]]);export{ae as default};
diff --git a/nuxt/desk.fcd75862.svg b/nuxt/desk.91eb5d74.svg
similarity index 56%
rename from nuxt/desk.fcd75862.svg
rename to nuxt/desk.91eb5d74.svg
index 93fadc2..d743cd9 100644
--- a/nuxt/desk.fcd75862.svg
+++ b/nuxt/desk.91eb5d74.svg
@@ -25,15 +25,15 @@
      inkscape:deskcolor="#505050"
      inkscape:document-units="px"
      showgrid="false"
-     inkscape:zoom="1.969098"
-     inkscape:cx="179.77775"
-     inkscape:cy="208.47109"
+     inkscape:zoom="1.4782752"
+     inkscape:cx="250.62993"
+     inkscape:cy="196.5128"
      inkscape:window-width="1440"
      inkscape:window-height="847"
      inkscape:window-x="0"
      inkscape:window-y="25"
-     inkscape:window-maximized="0"
-     inkscape:current-layer="g24030"><inkscape:grid
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1"><inkscape:grid
        type="xygrid"
        id="grid8255"
        originx="0"
@@ -167,14 +167,6 @@
        simplify_individual_paths="false"
        simplify_just_coalesce="false" /><linearGradient
        inkscape:collect="always"
-       id="linearGradient27067"><stop
-         style="stop-color:#272141;stop-opacity:1;"
-         offset="0"
-         id="stop27063" /><stop
-         style="stop-color:#272141;stop-opacity:0;"
-         offset="1"
-         id="stop27065" /></linearGradient><linearGradient
-       inkscape:collect="always"
        id="linearGradient26828"><stop
          style="stop-color:#7664c7;stop-opacity:1;"
          offset="0"
@@ -216,16 +208,7 @@
        x2="147.45816"
        y2="57.084557"
        gradientUnits="userSpaceOnUse"
-       gradientTransform="translate(-21.166667)" /><linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient27067"
-       id="linearGradient27069"
-       x1="82.112991"
-       y1="49.686993"
-       x2="83.345909"
-       y2="85.441895"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.76986299,0,0,1,18.585121,0)" /><inkscape:path-effect
+       gradientTransform="translate(-21.166667)" /><inkscape:path-effect
        effect="fill_between_many"
        method="bsplinespiro"
        linkedpaths="#path14442,0,1"
@@ -314,15 +297,32 @@
        lpeversion="0"
        join="true"
        close="true"
-       autoreverse="true" /></defs><g
+       autoreverse="true" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient27067"
+       id="linearGradient27069"
+       x1="82.112991"
+       y1="49.686993"
+       x2="83.345909"
+       y2="85.441895"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.76986299,0,0,1,19.560255,29.85402)" /><linearGradient
+       inkscape:collect="always"
+       id="linearGradient27067"><stop
+         style="stop-color:#272141;stop-opacity:1;"
+         offset="0"
+         id="stop27063" /><stop
+         style="stop-color:#272141;stop-opacity:0;"
+         offset="1"
+         id="stop27065" /></linearGradient></defs><g
      inkscape:label="Слой 1"
      inkscape:groupmode="layer"
      id="layer1"
      transform="translate(-33.042465,-7.8564459)"><ellipse
        style="opacity:0.0829146;fill:#fff6d5;stroke:#ffffff;stroke-width:0.264583;stroke-linecap:round"
        id="path6345"
-       cx="84.323875"
-       cy="53.136574"
+       cx="87.304863"
+       cy="57.359638"
        rx="44.874298"
        ry="43.739216" /><g
        id="g24030"
@@ -337,7 +337,7 @@
          d="m 47.302769,22.992987 c 0,0 7.218179,0.528159 7.218179,4.929487 0,4.401329 1.936584,4.753436 1.936584,4.753436 l 10.915295,-6.337914 c 0,0 2.464744,-14.084251 -20.070058,-3.345009 z"
          id="path12007" /><path
          style="fill:#008066;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         d="m 78.505547,15.586562 c 0,0 -9.322089,-2.497547 -10.673689,-5.097299 -1.351601,-2.599752 -1.351601,-2.599752 -1.351601,-2.599752 0,0 -1.978876,15.502334 2.604536,18.126752 4.583412,2.624418 9.420754,-10.429701 9.420754,-10.429701 z"
+         d="m 81.238117,18.567548 c 0,0 -9.322089,-2.497547 -10.673689,-5.097299 -1.351601,-2.599752 -1.351601,-2.599752 -1.351601,-2.599752 0,0 -1.978876,15.502334 2.604536,18.126752 4.583412,2.624418 9.420754,-10.429701 9.420754,-10.429701 z"
          id="path12063" /><path
          style="fill:#3d8d5c;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
          d="m 48.998553,11.859954 c 0,0 16.725049,6.513966 20.24611,22.534802 3.521065,16.020836 8.802659,13.203984 8.802659,13.203984 0,0 -6.16186,-41.0203804 -29.048769,-35.738786 z"
@@ -345,6 +345,9 @@
          style="fill:#008066;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
          d="m 36.387475,49.224905 c 0,0 4.577382,-26.760078 16.548995,-21.302431 11.971614,5.457648 8.978709,12.147668 8.978709,12.147668 0,0 -25.527704,4.577381 -25.527704,9.154763 z"
          id="path9984" /><path
+         style="fill:#367d52;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
+         d="m 71.372354,35.951383 c 0,0 9.481367,-25.439298 20.227015,-17.847428 10.745641,7.591876 6.5591,13.6074 6.5591,13.6074 0,0 -25.933574,-0.25726 -26.786115,4.240028 z"
+         id="path429" /><path
          style="fill:#aa9ddd;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
          d="m 51.536383,38.220761 8.630493,-17.260988 16.274648,0.739756 z"
          id="path23885"
@@ -363,9 +366,6 @@
          style="fill:#005544;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
          d="m 112.97059,34.084335 c 0,0 14.78846,1.760532 17.60531,10.915295 2.81685,9.154763 4.40133,15.140569 4.40133,15.140569 0,0 -12.85188,-4.753435 -14.78846,-6.16186 -1.93659,-1.408424 -7.21818,-19.894004 -7.21818,-19.894004 z"
          id="path11038" /><path
-         style="fill:#367d52;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         d="m 71.372354,32.473566 c 0,0 9.481367,-25.4392983 20.227015,-17.847428 10.745641,7.591876 6.5591,13.6074 6.5591,13.6074 0,0 -25.933574,-0.25726 -26.786115,4.240028 z"
-         id="path429" /><path
          style="fill:#005544;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
          d="m 97.131114,35.715805 c 0,0 -0.528159,-12.323719 5.457646,-13.027932 5.98581,-0.704212 10.21109,-1.056318 12.14767,-2.28869 1.93658,-1.232372 -8.2745,7.922391 -8.09845,12.147666 0.17606,4.225275 -0.3521,5.809754 -0.3521,5.809754 z"
          id="path11195" /><path
@@ -408,15 +408,7 @@
          d="M 137.59058,68.388216 117.08311,65.518242 98.398192,71.85489 94.790544,51.464263 82.990076,35.651978 101.26789,25.919851 112.65972,9.810674 l 14.90396,14.375841 18.84101,5.856266 -9.06666,18.616886 z"
          transform="matrix(0.09437718,-0.03209576,0.0320931,0.09436935,42.287363,66.122681)"
          inkscape:transform-center-x="0.21725074"
-         inkscape:transform-center-y="0.1048688" /><rect
-         style="fill:url(#linearGradient27069);fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         id="rect27009"
-         width="69.290535"
-         height="30.823196"
-         x="46.1115"
-         y="53.262482"
-         rx="1.7278203"
-         ry="2.6945567" /><path
+         inkscape:transform-center-y="0.1048688" /><path
          style="fill:#4a3d79;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
          d="M 93.309992,84.723982 105.63927,70.175436 122.90026,85.710324 Z"
          id="path27125" /><path
@@ -473,334 +465,358 @@
          d="M 137.59058,68.388216 117.08311,65.518242 98.398192,71.85489 94.790544,51.464263 82.990076,35.651978 101.26789,25.919851 112.65972,9.810674 l 14.90396,14.375841 18.84101,5.856266 -9.06666,18.616886 z"
          transform="matrix(0.09437718,-0.03209576,0.0320931,0.09436935,97.163409,16.962346)"
          inkscape:transform-center-x="0.21725074"
-         inkscape:transform-center-y="0.1048688" /></g><rect
-       style="fill:#1e949d;fill-opacity:1;stroke-width:0.529169;stroke-linecap:round"
-       id="rect3427"
-       width="4.068573"
-       height="37.379955"
-       x="44.403294"
-       y="76.342461" /><rect
-       style="fill:#1e949d;fill-opacity:1;stroke-width:0.529169;stroke-linecap:round"
-       id="rect3429"
-       width="4.068573"
-       height="37.379955"
-       x="114.36745"
-       y="76.342461" /><g
-       id="g3613"
-       transform="translate(-1.5875,29.299653)"><rect
-         style="fill:#2e3436;stroke-width:0.529167;stroke-linecap:round"
-         id="rect3591"
-         width="14.87463"
-         height="5.6824427"
-         x="77.019463"
-         y="58.74715"
-         rx="2.7971394"
-         ry="2.7971394" /><rect
-         style="fill:#2e3436;stroke-width:0.529166;stroke-linecap:round"
-         id="rect3593"
-         width="4.8467894"
-         height="20.389942"
-         x="82.033386"
-         y="61.922153"
-         rx="0.91142744"
-         ry="10.036795" /><rect
-         style="fill:#555753;stroke-width:0.529167;stroke-linecap:round"
-         id="rect3485"
-         width="30.151196"
-         height="6.1028495"
-         x="69.220016"
-         y="54.547783"
-         rx="2.2259271"
-         ry="2.7971394" /><rect
-         style="fill:#555753;stroke-width:0.529167;stroke-linecap:round"
-         id="rect3595"
-         width="14.87463"
-         height="4.8467894"
-         x="77.019463"
-         y="78.468094"
-         rx="2.7971394"
-         ry="2.3857954" /><rect
-         style="fill:#555753;stroke-width:0.529169;stroke-linecap:round"
-         id="rect3597"
-         width="3.8440056"
-         height="4.8467894"
-         x="74.679634"
-         y="79.972267"
-         rx="0.72285628"
-         ry="2.3857954" /><rect
-         style="fill:#555753;stroke-width:0.529169;stroke-linecap:round"
-         id="rect3599"
-         width="3.8440056"
-         height="4.8467894"
-         x="74.679634"
-         y="79.4431"
-         rx="0.72285628"
-         ry="2.3857954" /><rect
-         style="fill:#555753;stroke-width:0.529169;stroke-linecap:round"
-         id="rect3601"
-         width="3.8440056"
-         height="4.8467894"
-         x="90.025459"
-         y="79.4431"
-         rx="0.72285628"
-         ry="2.3857954" /><rect
-         style="fill:#555753;stroke-width:0.529169;stroke-linecap:round"
-         id="rect3603"
-         width="3.8440056"
-         height="4.8467894"
-         x="83.675461"
-         y="79.4431"
-         rx="0.72285628"
-         ry="2.3857954" /><rect
-         style="fill:#555753;stroke-width:0.529167;stroke-linecap:round"
-         id="rect3615"
-         width="24.066816"
-         height="31.754827"
-         x="72.450905"
-         y="24.568209"
-         rx="2.7971394"
-         ry="2.7971394" /></g><g
-       id="g4098"
-       transform="translate(0,29.299653)"><rect
-         style="fill:#e25563;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linecap:round"
-         id="rect515"
-         width="15.294061"
-         height="5.6006417"
-         x="73.97023"
-         y="17.821413"
-         ry="2.8003209"
-         rx="2.9080255" /><rect
-         style="fill:#e25563;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linecap:round"
-         id="rect2120"
-         width="18.74061"
-         height="5.6006417"
-         x="72.246956"
-         y="20.996416"
-         ry="2.8003209"
-         rx="3.5633552" /><path
-         style="fill:#e25563;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         d="m 62.51675,45.129037 c 0,0 5.209438,-20.688776 6.945916,-21.460544 1.736481,-0.771769 22.188352,-2.701191 23.92483,-1.543537 1.73648,1.157653 11.769474,21.074658 11.383594,23.582907 -0.38589,2.508248 -9.647114,1.543537 -9.647114,1.543537 0,0 -35.694302,2.894132 -32.607226,-2.122363 z"
-         id="path4167"
-         sodipodi:nodetypes="cssscc" /><g
-         id="g409"
-         transform="matrix(-0.9990455,-0.04368162,-0.04368162,0.9990455,164.07193,1.4394407)"><rect
-           style="fill:#483737;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           id="rect5342"
-           width="2.496511"
-           height="5.6171494"
-           x="85.26133"
-           y="12.498936"
-           rx="1.0096776"
-           ry="1.3883067" /><path
-           id="path4221"
-           style="fill:#f4e3d7;stroke-width:0.529167;stroke-linecap:round"
-           d="m 87.020409,17.890897 c 0,4.057806 -1.531886,6.775182 -5.402381,6.775182 -3.673419,0 -5.40238,-2.717377 -5.40238,-6.775182 0,-4.057804 1.040213,-7.244753 5.40238,-7.347307 4.560261,-0.107211 5.402381,3.289502 5.402381,7.347307 z"
-           sodipodi:nodetypes="sssss" /><path
-           id="rect647"
-           style="fill:#483737;stroke-width:0.529167;stroke-linecap:round"
-           d="M 78.822398,8.6980178 C 81.716613,8.8657134 85.50922,7.5880839 87.505044,7.9081342 89.500869,8.2281846 87.907,12.79493 85.955674,12.910731 h -7.133276 c -1.259442,0 -2.273361,-0.891153 -2.273361,-1.998102 v -0.21651 c 0,-1.1069482 1.016489,-2.0709263 2.273361,-1.9981012 z"
-           sodipodi:nodetypes="szcssss" /><rect
-           style="fill:#483737;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           id="rect5214"
-           width="2.496511"
-           height="6.3973093"
-           x="75.615196"
-           y="11.818504"
-           rx="1.0096776"
-           ry="1.581127" /><rect
-           style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           id="rect5345"
-           width="2.028415"
-           height="4.3688941"
-           x="75.303131"
-           y="15.092828"
-           rx="2.4805279"
-           ry="3.9196229" /><circle
-           style="fill:#241c1c;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           id="path5520"
-           cx="81.595558"
-           cy="17.351255"
-           r="0.3905766" /><path
-           style="fill:#483737;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           d="m 76.61722,21.044801 c 0,0 1.263398,-1.329893 2.194323,-1.130409 0.930923,0.199485 1.455267,2.12402 1.987224,2.12402 0.531958,0 1.220962,-1.411154 1.795355,-1.196903 0.598451,0.223225 3.735119,0.172485 3.868111,0.203292 0.471601,0.109244 0.398965,1.196903 0.398965,1.196903 0,0 -1.134215,2.859269 -1.666173,3.258236 -0.531956,0.398968 -3.495404,0.388445 -3.995919,0.465463 -0.827164,0.127281 -5.342272,-4.480806 -4.581886,-4.920602 z"
-           id="path7933"
-           sodipodi:nodetypes="cszsscssc" /><rect
-           style="fill:#634b4b;fill-opacity:1;stroke-width:0.529248;stroke-linecap:round"
-           id="rect14429"
-           width="2.134635"
-           height="0.5133366"
-           x="83.503838"
-           y="22.479269"
-           rx="0.2134635"
-           ry="0.2566683"
-           transform="matrix(0.99678408,-0.0801342,0.05533343,0.99846793,0,0)" /><path
-           style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           d="m 82.114688,23.179529 c 0,0 0.243735,-2.004867 0.937567,-1.884874 0.654302,0.113157 2.42341,0.08723 2.804297,0.251817 0.602405,0.260316 -0.229263,1.948862 -0.570285,1.993976 -0.341023,0.04511 -0.852554,0.406035 -0.895183,0.04511 -0.04262,-0.360919 0.383651,-0.279564 0.08526,-0.369793 -0.298395,-0.09023 -1.125446,-0.574277 -1.125446,-0.168248 0,0.406034 0.341023,-0.03624 -0.170512,0.189335 -0.511532,0.225574 -1.150949,0.270689 -1.150949,0 0,-0.27069 0.08526,-0.05733 0.08526,-0.05733 z"
-           id="path14435"
-           sodipodi:nodetypes="csssssssscc" /><path
-           style="opacity:1;fill:#ffbcbc;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-linecap:round;stroke-dasharray:none"
-           d="m 85.642718,21.837124 -0.122436,0.330478 -1.265187,0.354644 -1.448841,-0.487634 0.16973,-0.311345 0.646347,0.09101 0.653172,-0.03859 0.721455,0.113778 z"
-           id="path17981"
-           sodipodi:nodetypes="ccccccccc" /><path
-           id="path24683"
-           style="fill:#e9c6af;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-linecap:round;stroke-dasharray:none"
-           d="m 84.235436,17.045652 1.160238,2.448221 -0.106183,0.310884 0.02947,2.55e-4 -0.0414,0.03595 -0.01777,0.05147 -0.03868,-0.0027 -0.198337,0.170816 -0.695423,-0.0066 -0.330095,0.06109 -0.310354,-0.165644 0.377309,-0.277305 0.399206,0.132803 0.396209,2.54e-4 0.177438,-0.260699 -0.906095,-2.262792 z" /><use
-           x="0"
-           y="0"
-           xlink:href="#rect14429"
-           id="use35559"
-           transform="matrix(-1,0,0,1,166.72851,-0.07252989)" /><rect
-           style="opacity:1;fill:#483737;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-linecap:round;stroke-dasharray:none"
-           id="rect42602"
-           width="2.7775736"
-           height="2.5557561"
-           x="-78.872025"
-           y="11.783834"
-           transform="scale(-1,1)"
-           rx="1.0531088"
-           ry="0.95542276" /><circle
-           style="fill:#241c1c;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           id="circle1224"
-           cx="85.780228"
-           cy="17.384306"
-           r="0.3905766" /></g><path
-         style="fill:#e25563;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         d="m 62.714417,46.851257 c 0,0 -0.906801,-4.931711 1.251862,-6.904397 2.158664,-1.972683 4.74906,-3.698782 8.634653,-1.232927 3.885596,2.465856 23.097699,0.986341 26.119826,0.246584 3.022132,-0.739756 5.287922,4.979187 6.346392,6.904397 3.03401,5.51839 -42.350293,0.988665 -42.352733,0.986343 z"
-         id="path19142"
-         sodipodi:nodetypes="cssssc" /><ellipse
-         style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         id="ellipse20742"
-         cx="96.488617"
-         cy="44.385399"
-         rx="3.3289051"
-         ry="2.3425627" /><ellipse
-         style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         id="path20405"
-         cx="70.030296"
-         cy="44.385399"
-         rx="3.3289051"
-         ry="2.3425627" /><ellipse
-         style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         id="ellipse20740"
-         cx="70.030296"
-         cy="44.385399"
-         rx="3.3289051"
-         ry="2.3425627" /><rect
-         style="fill:#f4e3d7;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linecap:round"
-         id="rect2174"
-         width="1.0770465"
-         height="7.754735"
-         x="79.228043"
-         y="24.79397"
-         ry="0.53852326" /><rect
-         style="fill:#f4e3d7;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linecap:round"
-         id="rect2176"
-         width="1.0770465"
-         height="7.754735"
-         x="83.516907"
-         y="24.383343"
-         ry="0.53852326" /><g
-         id="g16832"
-         transform="matrix(-1,0,0,1,166.83728,0)"><path
-           id="path3942"
-           style="fill:#535d6c;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           d="m 72.516082,55.483368 c -1.013754,-0.01451 -2.017183,0.172841 -2.964573,0.659938 -0.886971,0.515156 -0.870822,4.049349 -1.27289,5.052774 1.951668,6.700094 3.037245,10.781477 5.528791,17.273688 0.53932,1.782537 2.531788,1.927559 3.991924,1.977236 1.862443,0.595434 1.067526,-1.954974 1.411109,-3.169666 0.303907,-2.64372 0.154484,-5.303955 -0.140512,-7.939388 -0.439835,-4.196779 -1.026012,-8.373275 -1.615659,-12.547605 -1.530829,-0.697065 -3.248599,-1.282819 -4.93819,-1.306977 z"
-           sodipodi:nodetypes="scccccccs" /><path
-           style="fill:#373e48;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           d="m 68.328663,61.170347 0.582517,-13.09155 27.54171,0.246586 2.181333,10.356593 -7.642976,2.716223 c 0,0 -4.837973,-3.769939 -7.284934,-3.877159 -2.446961,-0.10722 -5.930996,2.518132 -5.930996,2.518132 0,0 -2.511496,-3.677671 -4.080309,-3.924506 -1.568813,-0.246835 -2.539451,0.812374 -3.475891,1.695447 -0.93644,0.883073 -1.890454,3.360234 -1.890454,3.360234 z"
-           id="path16207"
-           sodipodi:nodetypes="ccccczczzc" /><path
-           style="fill:#535d6c;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-           d="m 100.84061,57.454434 c -0.14605,2.345918 0.4899,4.866083 -0.71283,7.036617 -2.146149,5.21642 -4.292304,10.432838 -6.438459,15.649256 -1.397318,0.739756 -2.794636,1.479513 -4.191954,2.219269 -0.222389,-2.940301 -0.677265,-5.896118 -0.245477,-8.840835 0.32841,-3.875255 0.656821,-7.750511 0.985231,-11.625767 1.206074,-1.848161 2.332057,-3.758953 3.588289,-5.567891 1.58109,-1.591253 4.338306,-1.406095 5.895152,0.127081 0.395258,0.308597 0.764838,0.648719 1.120048,1.00227 z"
-           id="path16645"
-           sodipodi:nodetypes="cccccccc" /><g
-           id="use2717"
-           transform="matrix(-1,0,0,1,168.53609,0)"><path
-             style="fill:#1c1f24;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linecap:round"
-             d="m 68.050869,82.758267 c -0.192329,-0.46941 0.412534,-1.768357 0.818582,-2.394317 0.406048,-0.625961 0.614247,-1.01366 1.42502,-1.325762 0.810773,-0.312103 2.569686,-0.04374 3.265917,0.04706 0.696231,0.09081 -0.31934,-0.879311 0.556033,-0.736358 0.875368,0.142957 3.957381,1.834996 4.723921,1.310266 0.76654,-0.52473 -0.515026,-1.146623 0.344347,-1.147816 0.859373,-0.0012 1.505578,2.860097 1.147816,3.787794 -0.357762,0.927697 -0.772397,0.770087 -1.721726,1.033036 -0.949329,0.262949 -2.218167,0.04675 -3.902575,0 -1.684408,-0.04675 -5.115555,-0.05683 -6.198209,-0.344344 -1.082654,-0.287514 -0.266797,0.239847 -0.459126,-0.229563 z"
-             id="path2719"
-             sodipodi:nodetypes="zzzzzzzzzzzzz" /><path
-             style="fill:#373e48;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linecap:round"
-             d="m 68.050869,83.676519 c 0.171205,-0.519664 1.128684,-2.620848 1.951286,-2.639978 0.822602,-0.01913 1.467176,0.433517 2.289778,0.414385 0.822602,-0.01913 1.949984,1.577354 2.365674,1.536904 0.41569,-0.04045 4.229432,-0.08892 4.630714,-0.176962 0.401282,-0.08804 0.93463,-0.960656 1.044184,-0.626512 0.109554,0.334144 1.014458,1.463126 0.691104,2.000655 -0.323354,0.537529 -1.652986,0.369058 -1.936873,0.394318 -0.283887,0.02526 -10.768048,-0.09934 -10.806308,-0.214118 -0.03826,-0.114781 -0.191304,-0.573912 -0.229559,-0.688689 -0.03825,-0.114778 -0.171205,0.519661 0,-3e-6 z"
-             id="path2721"
-             sodipodi:nodetypes="zzzzzzzzzzz" /></g><g
-           id="g2729"
-           transform="matrix(-0.81460179,0,0,1,138.33577,0)"
-           style="stroke-width:1.10797"><path
-             style="fill:#1c1f24;fill-opacity:1;stroke:none;stroke-width:0.110797;stroke-linecap:round"
-             d="m 68.050869,82.758267 c -0.192329,-0.46941 0.412534,-1.768357 0.818582,-2.394317 0.406048,-0.625961 0.614247,-1.01366 1.42502,-1.325762 0.810773,-0.312103 2.273247,-0.707811 2.969478,-0.617011 0.696231,0.09081 0.339319,0.750681 1.214692,0.893634 0.875368,0.142957 2.631732,0.748335 3.398272,0.223605 0.76654,-0.52473 0.448403,-1.025883 1.307776,-1.027076 0.859373,-0.0012 1.505578,2.860097 1.147816,3.787794 -0.357762,0.927697 -0.772397,0.770087 -1.721726,1.033036 -0.949329,0.262949 -2.218167,0.04675 -3.902575,0 -1.684408,-0.04675 -5.115555,-0.05683 -6.198209,-0.344344 -1.082654,-0.287514 -0.266797,0.239847 -0.459126,-0.229563 z"
-             id="path2725"
-             sodipodi:nodetypes="zzzzzzzzzzzzz" /><path
-             style="fill:#373e48;fill-opacity:1;stroke:none;stroke-width:0.110797;stroke-linecap:round"
-             d="m 68.050869,83.676519 c 0.171205,-0.519664 1.128684,-2.620848 1.951286,-2.639978 0.822602,-0.01913 1.467176,0.433517 2.289778,0.414385 0.822602,-0.01913 1.949984,1.577354 2.365674,1.536904 0.41569,-0.04045 4.229432,-0.08892 4.630714,-0.176962 0.401282,-0.08804 0.93463,-0.960656 1.044184,-0.626512 0.109554,0.334144 1.014458,1.463126 0.691104,2.000655 -0.323354,0.537529 -1.457212,0.251594 -1.741099,0.276854 -0.283887,0.02526 -10.963822,0.01813 -11.002082,-0.09665 -0.03826,-0.114781 -0.191304,-0.573912 -0.229559,-0.688689 -0.03825,-0.114778 -0.171205,0.519661 0,-3e-6 z"
-             id="path2727"
-             sodipodi:nodetypes="zzzzzzzzzzz" /></g></g></g><rect
-       style="fill:#1c8890;fill-opacity:1;stroke-width:0.529168;stroke-linecap:round"
-       id="rect3431"
-       width="74.922058"
-       height="7.6285639"
-       x="43.925968"
-       y="76.342461" /><rect
-       style="fill:#25b2bc;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-       id="rect3373"
-       width="80.500328"
-       height="2.5428538"
-       x="40.90934"
-       y="75.833878" /><rect
-       style="fill:#c8b7b7;stroke-width:0.529168;stroke-linecap:round"
-       id="rect3674"
-       width="26.685802"
-       height="17.388142"
-       x="70.221443"
-       y="57.606728"
-       rx="2.2443218"
-       ry="2.6945567" /><g
-       id="g3786"
-       transform="matrix(0.80236328,0,0,0.88680883,15.240642,34.781923)"
-       style="stroke-width:1.1855"><rect
-         style="fill:#808080;stroke-width:0.627325;stroke-linecap:round"
-         id="rect3782"
-         width="33.259003"
-         height="1.8384364"
-         x="68.523575"
-         y="-46.462337"
-         rx="2.7971394"
-         ry="0.28489366"
-         transform="scale(1,-1)" /></g><rect
-       style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-       id="rect17995"
-       width="4.2518339"
-       height="2.7057123"
-       x="81.331169"
-       y="64.931122"
-       rx="0.72285628"
-       ry="2.3857954" /><g
-       id="g525"
-       transform="translate(-5.2916665,27.182988)"><path
-         id="rect359"
-         style="fill:#f4d0b7;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         d="m 59.12809,41.651751 c 0.478999,0 0.901456,0.43762 1.161253,1.111906 -0.16255,-0.126131 -0.347397,-0.197395 -0.543638,-0.197395 H 59.05354 c -0.654691,0 -1.181897,0.792329 -1.181897,1.775925 0,0.983596 0.527206,1.7753 1.181897,1.7753 h 0.692165 c 0.196241,0 0.381088,-0.07126 0.543638,-0.197394 -0.259786,0.674475 -0.682174,1.111905 -1.161253,1.111905 h -0.839543 c -0.793565,0 -1.432499,-1.199514 -1.432499,-2.689811 0,-1.490297 0.638934,-2.690436 1.432499,-2.690436 z" /><rect
-         style="fill:#c5b7ae;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         id="rect357"
-         width="5.8621311"
-         height="8.0988045"
-         x="58.553463"
-         y="40.729858"
-         rx="0.80216056"
-         ry="0.88546026" /><rect
-         style="fill:#f4e3d7;stroke-width:0.529167;stroke-linecap:round"
-         id="rect7505"
-         width="5.8621311"
-         height="8.0988045"
-         x="58.553463"
-         y="40.200691"
-         rx="0.80216056"
-         ry="0.88546026" /><path
-         id="path6701"
-         style="fill:#ffffff;fill-opacity:1;stroke-width:0.529167;stroke-linecap:round"
-         d="m 63.203415,42.409375 a 1.7887508,1.9420388 0 0 0 -1.789038,1.942001 1.7887508,1.9420388 0 0 0 1.789038,1.942 1.7887508,1.9420388 0 0 0 1.212329,-0.514697 v -2.855123 a 1.7887508,1.9420388 0 0 0 -1.212329,-0.514181 z" /></g><g
+         inkscape:transform-center-y="0.1048688" /></g><g
+       id="g5649"
+       inkscape:transform-center-x="1.0850041"
+       inkscape:transform-center-y="-34.069131"
+       transform="matrix(0.87353988,0,0,0.87353988,10.420514,14.33641)"
+       style="stroke-width:1.14477"><g
+         id="g3613"
+         transform="translate(-1.7419996,28.778131)"
+         style="stroke-width:1.14477"><rect
+           style="fill:#2e3436;stroke-width:0.605773;stroke-linecap:round"
+           id="rect3591"
+           width="14.87463"
+           height="5.6824427"
+           x="77.019463"
+           y="58.74715"
+           rx="2.7971394"
+           ry="2.7971394" /><rect
+           style="fill:#2e3436;stroke-width:0.605771;stroke-linecap:round"
+           id="rect3593"
+           width="4.8467894"
+           height="20.389942"
+           x="82.033386"
+           y="61.922153"
+           rx="0.91142744"
+           ry="10.036795" /><rect
+           style="fill:#555753;stroke-width:0.605773;stroke-linecap:round"
+           id="rect3485"
+           width="30.151196"
+           height="6.1028495"
+           x="69.220016"
+           y="54.547783"
+           rx="2.2259271"
+           ry="2.7971394" /><rect
+           style="fill:#555753;stroke-width:0.605773;stroke-linecap:round"
+           id="rect3595"
+           width="14.87463"
+           height="4.8467894"
+           x="77.019463"
+           y="78.468094"
+           rx="2.7971394"
+           ry="2.3857954" /><rect
+           style="fill:#555753;stroke-width:0.605775;stroke-linecap:round"
+           id="rect3597"
+           width="3.8440056"
+           height="4.8467894"
+           x="74.679634"
+           y="79.972267"
+           rx="0.72285628"
+           ry="2.3857954" /><rect
+           style="fill:#555753;stroke-width:0.605775;stroke-linecap:round"
+           id="rect3599"
+           width="3.8440056"
+           height="4.8467894"
+           x="74.679634"
+           y="79.4431"
+           rx="0.72285628"
+           ry="2.3857954" /><rect
+           style="fill:#555753;stroke-width:0.605775;stroke-linecap:round"
+           id="rect3601"
+           width="3.8440056"
+           height="4.8467894"
+           x="90.025459"
+           y="79.4431"
+           rx="0.72285628"
+           ry="2.3857954" /><rect
+           style="fill:#555753;stroke-width:0.605775;stroke-linecap:round"
+           id="rect3603"
+           width="3.8440056"
+           height="4.8467894"
+           x="83.675461"
+           y="79.4431"
+           rx="0.72285628"
+           ry="2.3857954" /><rect
+           style="fill:#555753;stroke-width:0.605773;stroke-linecap:round"
+           id="rect3615"
+           width="24.066816"
+           height="31.754827"
+           x="72.450905"
+           y="24.568209"
+           rx="2.7971394"
+           ry="2.7971394" /></g><g
+         id="g4098"
+         transform="translate(0,29.299653)"
+         style="stroke-width:1.14477"><rect
+           style="fill:#e25563;fill-opacity:1;stroke:none;stroke-width:0.114477;stroke-linecap:round"
+           id="rect515"
+           width="15.294061"
+           height="5.6006417"
+           x="73.97023"
+           y="17.821413"
+           ry="2.8003209"
+           rx="2.9080255" /><rect
+           style="fill:#e25563;fill-opacity:1;stroke:none;stroke-width:0.114477;stroke-linecap:round"
+           id="rect2120"
+           width="18.74061"
+           height="5.6006417"
+           x="72.246956"
+           y="20.996416"
+           ry="2.8003209"
+           rx="3.5633552" /><path
+           style="fill:#e25563;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           d="m 62.51675,45.129037 c 0,0 5.209438,-20.688776 6.945916,-21.460544 1.736481,-0.771769 22.188352,-2.701191 23.92483,-1.543537 1.73648,1.157653 11.769474,21.074658 11.383594,23.582907 -0.38589,2.508248 -9.647114,1.543537 -9.647114,1.543537 0,0 -35.694302,2.894132 -32.607226,-2.122363 z"
+           id="path4167"
+           sodipodi:nodetypes="cssscc" /><g
+           id="g409"
+           transform="matrix(-0.9990455,-0.04368162,-0.04368162,0.9990455,164.07193,1.4394407)"
+           style="stroke-width:1.14477"><rect
+             style="fill:#483737;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             id="rect5342"
+             width="2.496511"
+             height="5.6171494"
+             x="85.26133"
+             y="12.498936"
+             rx="1.0096776"
+             ry="1.3883067" /><path
+             id="path4221"
+             style="fill:#ffd9bf;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             d="m 87.020409,17.890897 c 0,4.057806 -1.531886,6.775182 -5.402381,6.775182 -3.673419,0 -5.40238,-2.717377 -5.40238,-6.775182 0,-4.057804 1.040213,-7.244753 5.40238,-7.347307 4.560261,-0.107211 5.402381,3.289502 5.402381,7.347307 z"
+             sodipodi:nodetypes="sssss" /><path
+             id="rect647"
+             style="fill:#483737;stroke-width:0.605773;stroke-linecap:round"
+             d="M 78.822398,8.6980178 C 81.716613,8.8657134 85.50922,7.5880839 87.505044,7.9081342 89.500869,8.2281846 87.907,12.79493 85.955674,12.910731 h -7.133276 c -1.259442,0 -2.273361,-0.891153 -2.273361,-1.998102 v -0.21651 c 0,-1.1069482 1.016489,-2.0709263 2.273361,-1.9981012 z"
+             sodipodi:nodetypes="szcssss" /><rect
+             style="fill:#483737;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             id="rect5214"
+             width="2.496511"
+             height="6.3973093"
+             x="75.615196"
+             y="11.818504"
+             rx="1.0096776"
+             ry="1.581127" /><rect
+             style="fill:#ffd9bf;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             id="rect5345"
+             width="2.028415"
+             height="4.3688941"
+             x="75.303131"
+             y="15.092828"
+             rx="2.4805279"
+             ry="3.9196229" /><circle
+             style="fill:#241c1c;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             id="path5520"
+             cx="81.595558"
+             cy="17.351255"
+             r="0.3905766" /><path
+             style="fill:#483737;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             d="m 76.61722,21.044801 c 0,0 1.263398,-1.329893 2.194323,-1.130409 0.930923,0.199485 1.455267,2.12402 1.987224,2.12402 0.531958,0 1.220962,-1.411154 1.795355,-1.196903 0.598451,0.223225 3.735119,0.172485 3.868111,0.203292 0.471601,0.109244 0.398965,1.196903 0.398965,1.196903 0,0 -1.134215,2.859269 -1.666173,3.258236 -0.531956,0.398968 -3.495404,0.388445 -3.995919,0.465463 -0.827164,0.127281 -5.342272,-4.480806 -4.581886,-4.920602 z"
+             id="path7933"
+             sodipodi:nodetypes="cszsscssc" /><rect
+             style="fill:#634b4b;fill-opacity:1;stroke-width:0.605866;stroke-linecap:round"
+             id="rect14429"
+             width="2.134635"
+             height="0.5133366"
+             x="83.503838"
+             y="22.479269"
+             rx="0.2134635"
+             ry="0.2566683"
+             transform="matrix(0.99678408,-0.0801342,0.05533343,0.99846793,0,0)" /><path
+             style="fill:#ffd9bf;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             d="m 82.114688,23.179529 c 0,0 0.243735,-2.004867 0.937567,-1.884874 0.654302,0.113157 2.42341,0.08723 2.804297,0.251817 0.602405,0.260316 -0.229263,1.948862 -0.570285,1.993976 -0.341023,0.04511 -0.852554,0.406035 -0.895183,0.04511 -0.04262,-0.360919 0.383651,-0.279564 0.08526,-0.369793 -0.298395,-0.09023 -1.125446,-0.574277 -1.125446,-0.168248 0,0.406034 0.341023,-0.03624 -0.170512,0.189335 -0.511532,0.225574 -1.150949,0.270689 -1.150949,0 0,-0.27069 0.08526,-0.05733 0.08526,-0.05733 z"
+             id="path14435"
+             sodipodi:nodetypes="csssssssscc" /><path
+             style="opacity:1;fill:#ffbcbc;fill-opacity:1;stroke:none;stroke-width:0.302887;stroke-linecap:round;stroke-dasharray:none"
+             d="m 85.642718,21.837124 -0.122436,0.330478 -1.265187,0.354644 -1.448841,-0.487634 0.16973,-0.311345 0.646347,0.09101 0.653172,-0.03859 0.721455,0.113778 z"
+             id="path17981"
+             sodipodi:nodetypes="ccccccccc" /><path
+             id="path24683"
+             style="fill:#cfab93;fill-opacity:1;stroke:none;stroke-width:0.302887;stroke-linecap:round;stroke-dasharray:none"
+             d="m 84.235436,17.045652 1.160238,2.448221 -0.106183,0.310884 0.02947,2.55e-4 -0.0414,0.03595 -0.01777,0.05147 -0.03868,-0.0027 -0.198337,0.170816 -0.695423,-0.0066 -0.330095,0.06109 -0.310354,-0.165644 0.377309,-0.277305 0.399206,0.132803 0.396209,2.54e-4 0.177438,-0.260699 -0.906095,-2.262792 z" /><use
+             x="0"
+             y="0"
+             xlink:href="#rect14429"
+             id="use35559"
+             transform="matrix(-1,0,0,1,166.72851,-0.07252989)"
+             style="stroke-width:1.14477" /><rect
+             style="opacity:1;fill:#483737;fill-opacity:1;stroke:none;stroke-width:0.302887;stroke-linecap:round;stroke-dasharray:none"
+             id="rect42602"
+             width="2.7775736"
+             height="2.5557561"
+             x="-78.872025"
+             y="11.783834"
+             transform="scale(-1,1)"
+             rx="1.0531088"
+             ry="0.95542276" /><circle
+             style="fill:#241c1c;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             id="circle1224"
+             cx="85.780228"
+             cy="17.384306"
+             r="0.3905766" /></g><path
+           style="fill:#e25563;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           d="m 62.714417,46.851257 c 0,0 -0.906801,-4.931711 1.251862,-6.904397 2.158664,-1.972683 4.74906,-3.698782 8.634653,-1.232927 3.885596,2.465856 23.097699,0.986341 26.119826,0.246584 3.022132,-0.739756 5.287922,4.979187 6.346392,6.904397 3.03401,5.51839 -42.350293,0.988665 -42.352733,0.986343 z"
+           id="path19142"
+           sodipodi:nodetypes="cssssc" /><ellipse
+           style="fill:#ffd9bf;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="ellipse20742"
+           cx="96.488617"
+           cy="44.385399"
+           rx="3.3289051"
+           ry="2.3425627" /><ellipse
+           style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="path20405"
+           cx="70.030296"
+           cy="44.385399"
+           rx="3.3289051"
+           ry="2.3425627" /><ellipse
+           style="fill:#ffd9bf;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="ellipse20740"
+           cx="70.030296"
+           cy="44.385399"
+           rx="3.3289051"
+           ry="2.3425627" /><rect
+           style="fill:#f4e3d7;fill-opacity:1;stroke:none;stroke-width:0.114477;stroke-linecap:round"
+           id="rect2174"
+           width="1.0770465"
+           height="7.754735"
+           x="79.228043"
+           y="24.79397"
+           ry="0.53852326" /><rect
+           style="fill:#f4e3d7;fill-opacity:1;stroke:none;stroke-width:0.114477;stroke-linecap:round"
+           id="rect2176"
+           width="1.0770465"
+           height="7.754735"
+           x="83.516907"
+           y="24.383343"
+           ry="0.53852326" /><g
+           id="g16832"
+           transform="matrix(-1,0,0,1,166.83728,0)"
+           style="stroke-width:1.14477"><path
+             id="path3942"
+             style="fill:#535d6c;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             d="m 72.516082,55.483368 c -1.013754,-0.01451 -2.017183,0.172841 -2.964573,0.659938 -0.886971,0.515156 -0.870822,4.049349 -1.27289,5.052774 1.951668,6.700094 3.037245,10.781477 5.528791,17.273688 0.53932,1.782537 2.531788,1.927559 3.991924,1.977236 1.862443,0.595434 1.067526,-1.954974 1.411109,-3.169666 0.303907,-2.64372 0.154484,-5.303955 -0.140512,-7.939388 -0.439835,-4.196779 -1.026012,-8.373275 -1.615659,-12.547605 -1.530829,-0.697065 -3.248599,-1.282819 -4.93819,-1.306977 z"
+             sodipodi:nodetypes="scccccccs" /><path
+             style="fill:#373e48;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             d="m 68.328663,61.170347 0.582517,-13.09155 27.54171,0.246586 2.181333,10.356593 -7.642976,2.716223 c 0,0 -4.837973,-3.769939 -7.284934,-3.877159 -2.446961,-0.10722 -5.930996,2.518132 -5.930996,2.518132 0,0 -2.511496,-3.677671 -4.080309,-3.924506 -1.568813,-0.246835 -2.539451,0.812374 -3.475891,1.695447 -0.93644,0.883073 -1.890454,3.360234 -1.890454,3.360234 z"
+             id="path16207"
+             sodipodi:nodetypes="ccccczczzc" /><path
+             style="fill:#535d6c;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+             d="m 100.84061,57.454434 c -0.14605,2.345918 0.4899,4.866083 -0.71283,7.036617 -2.146149,5.21642 -4.292304,10.432838 -6.438459,15.649256 -1.397318,0.739756 -2.794636,1.479513 -4.191954,2.219269 -0.222389,-2.940301 -0.677265,-5.896118 -0.245477,-8.840835 0.32841,-3.875255 0.656821,-7.750511 0.985231,-11.625767 1.206074,-1.848161 2.332057,-3.758953 3.588289,-5.567891 1.58109,-1.591253 4.338306,-1.406095 5.895152,0.127081 0.395258,0.308597 0.764838,0.648719 1.120048,1.00227 z"
+             id="path16645"
+             sodipodi:nodetypes="cccccccc" /><g
+             id="use2717"
+             transform="matrix(-1,0,0,1,168.53609,0)"
+             style="stroke-width:1.14477"><path
+               style="fill:#1c1f24;fill-opacity:1;stroke:none;stroke-width:0.114477;stroke-linecap:round"
+               d="m 68.050869,82.758267 c -0.192329,-0.46941 0.412534,-1.768357 0.818582,-2.394317 0.406048,-0.625961 0.614247,-1.01366 1.42502,-1.325762 0.810773,-0.312103 2.569686,-0.04374 3.265917,0.04706 0.696231,0.09081 -0.31934,-0.879311 0.556033,-0.736358 0.875368,0.142957 3.957381,1.834996 4.723921,1.310266 0.76654,-0.52473 -0.515026,-1.146623 0.344347,-1.147816 0.859373,-0.0012 1.505578,2.860097 1.147816,3.787794 -0.357762,0.927697 -0.772397,0.770087 -1.721726,1.033036 -0.949329,0.262949 -2.218167,0.04675 -3.902575,0 -1.684408,-0.04675 -5.115555,-0.05683 -6.198209,-0.344344 -1.082654,-0.287514 -0.266797,0.239847 -0.459126,-0.229563 z"
+               id="path2719"
+               sodipodi:nodetypes="zzzzzzzzzzzzz" /><path
+               style="fill:#373e48;fill-opacity:1;stroke:none;stroke-width:0.114477;stroke-linecap:round"
+               d="m 68.050869,83.676519 c 0.171205,-0.519664 1.128684,-2.620848 1.951286,-2.639978 0.822602,-0.01913 1.467176,0.433517 2.289778,0.414385 0.822602,-0.01913 1.949984,1.577354 2.365674,1.536904 0.41569,-0.04045 4.229432,-0.08892 4.630714,-0.176962 0.401282,-0.08804 0.93463,-0.960656 1.044184,-0.626512 0.109554,0.334144 1.014458,1.463126 0.691104,2.000655 -0.323354,0.537529 -1.652986,0.369058 -1.936873,0.394318 -0.283887,0.02526 -10.768048,-0.09934 -10.806308,-0.214118 -0.03826,-0.114781 -0.191304,-0.573912 -0.229559,-0.688689 -0.03825,-0.114778 -0.171205,0.519661 0,-3e-6 z"
+               id="path2721"
+               sodipodi:nodetypes="zzzzzzzzzzz" /></g><g
+             id="g2729"
+             transform="matrix(-0.81460179,0,0,1,138.33577,0)"
+             style="stroke-width:1.26837"><path
+               style="fill:#1c1f24;fill-opacity:1;stroke:none;stroke-width:0.126837;stroke-linecap:round"
+               d="m 68.050869,82.758267 c -0.192329,-0.46941 0.412534,-1.768357 0.818582,-2.394317 0.406048,-0.625961 0.614247,-1.01366 1.42502,-1.325762 0.810773,-0.312103 2.273247,-0.707811 2.969478,-0.617011 0.696231,0.09081 0.339319,0.750681 1.214692,0.893634 0.875368,0.142957 2.631732,0.748335 3.398272,0.223605 0.76654,-0.52473 0.448403,-1.025883 1.307776,-1.027076 0.859373,-0.0012 1.505578,2.860097 1.147816,3.787794 -0.357762,0.927697 -0.772397,0.770087 -1.721726,1.033036 -0.949329,0.262949 -2.218167,0.04675 -3.902575,0 -1.684408,-0.04675 -5.115555,-0.05683 -6.198209,-0.344344 -1.082654,-0.287514 -0.266797,0.239847 -0.459126,-0.229563 z"
+               id="path2725"
+               sodipodi:nodetypes="zzzzzzzzzzzzz" /><path
+               style="fill:#373e48;fill-opacity:1;stroke:none;stroke-width:0.126837;stroke-linecap:round"
+               d="m 68.050869,83.676519 c 0.171205,-0.519664 1.128684,-2.620848 1.951286,-2.639978 0.822602,-0.01913 1.467176,0.433517 2.289778,0.414385 0.822602,-0.01913 1.949984,1.577354 2.365674,1.536904 0.41569,-0.04045 4.229432,-0.08892 4.630714,-0.176962 0.401282,-0.08804 0.93463,-0.960656 1.044184,-0.626512 0.109554,0.334144 1.014458,1.463126 0.691104,2.000655 -0.323354,0.537529 -1.457212,0.251594 -1.741099,0.276854 -0.283887,0.02526 -10.963822,0.01813 -11.002082,-0.09665 -0.03826,-0.114781 -0.191304,-0.573912 -0.229559,-0.688689 -0.03825,-0.114778 -0.171205,0.519661 0,-3e-6 z"
+               id="path2727"
+               sodipodi:nodetypes="zzzzzzzzzzz" /></g></g></g><g
+         id="g5535"
+         style="stroke-width:1.14477"><rect
+           style="fill:url(#linearGradient27069);fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="rect27009"
+           width="69.290535"
+           height="30.823196"
+           x="47.086632"
+           y="83.116501"
+           rx="1.7278203"
+           ry="2.6945567" /><rect
+           style="fill:#1e949d;fill-opacity:1;stroke-width:0.605775;stroke-linecap:round"
+           id="rect3427"
+           width="4.068573"
+           height="37.379955"
+           x="44.403294"
+           y="76.342461" /><rect
+           style="fill:#1e949d;fill-opacity:1;stroke-width:0.605775;stroke-linecap:round"
+           id="rect3429"
+           width="4.068573"
+           height="37.379955"
+           x="114.36745"
+           y="76.342461" /><rect
+           style="fill:#1c8890;fill-opacity:1;stroke-width:0.605774;stroke-linecap:round"
+           id="rect3431"
+           width="74.922058"
+           height="7.6285639"
+           x="43.925968"
+           y="76.342461" /><rect
+           style="fill:#25b2bc;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="rect3373"
+           width="80.500328"
+           height="2.5428538"
+           x="40.90934"
+           y="75.833878" /></g><g
+         id="g5250"
+         style="stroke-width:1.14477"><rect
+           style="fill:#c8b7b7;stroke-width:0.605774;stroke-linecap:round"
+           id="rect3674"
+           width="26.685802"
+           height="17.388142"
+           x="70.221443"
+           y="57.606728"
+           rx="2.2443218"
+           ry="2.6945567" /><g
+           id="g3786"
+           transform="matrix(0.80236328,0,0,0.88680883,15.240642,34.781923)"
+           style="stroke-width:1.35713"><rect
+             style="fill:#808080;stroke-width:0.718141;stroke-linecap:round"
+             id="rect3782"
+             width="33.259003"
+             height="1.8384364"
+             x="68.523575"
+             y="-46.462337"
+             rx="2.7971394"
+             ry="0.28489366"
+             transform="scale(1,-1)" /></g><rect
+           style="fill:#f4e3d7;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="rect17995"
+           width="4.2518339"
+           height="2.7057123"
+           x="81.331169"
+           y="64.931122"
+           rx="0.72285628"
+           ry="2.3857954" /></g><g
+         id="g525"
+         transform="translate(-5.2916665,27.182988)"
+         style="stroke-width:1.14477"><path
+           id="rect359"
+           style="fill:#f4d0b7;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           d="m 59.12809,41.651751 c 0.478999,0 0.901456,0.43762 1.161253,1.111906 -0.16255,-0.126131 -0.347397,-0.197395 -0.543638,-0.197395 H 59.05354 c -0.654691,0 -1.181897,0.792329 -1.181897,1.775925 0,0.983596 0.527206,1.7753 1.181897,1.7753 h 0.692165 c 0.196241,0 0.381088,-0.07126 0.543638,-0.197394 -0.259786,0.674475 -0.682174,1.111905 -1.161253,1.111905 h -0.839543 c -0.793565,0 -1.432499,-1.199514 -1.432499,-2.689811 0,-1.490297 0.638934,-2.690436 1.432499,-2.690436 z" /><rect
+           style="fill:#c5b7ae;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           id="rect357"
+           width="5.8621311"
+           height="8.0988045"
+           x="58.553463"
+           y="40.729858"
+           rx="0.80216056"
+           ry="0.88546026" /><rect
+           style="fill:#f4e3d7;stroke-width:0.605773;stroke-linecap:round"
+           id="rect7505"
+           width="5.8621311"
+           height="8.0988045"
+           x="58.553463"
+           y="40.200691"
+           rx="0.80216056"
+           ry="0.88546026" /><path
+           id="path6701"
+           style="fill:#ffffff;fill-opacity:1;stroke-width:0.605773;stroke-linecap:round"
+           d="m 63.203415,42.409375 a 1.7887508,1.9420388 0 0 0 -1.789038,1.942001 1.7887508,1.9420388 0 0 0 1.789038,1.942 1.7887508,1.9420388 0 0 0 1.212329,-0.514697 v -2.855123 a 1.7887508,1.9420388 0 0 0 -1.212329,-0.514181 z" /></g></g><g
        id="g8395"
-       transform="matrix(0.66402074,0,0,0.66402074,27.503662,7.6942807)"
+       transform="matrix(0.66402074,0,0,0.66402074,28.248908,16.885654)"
        style="stroke-width:1.50598"><path
          id="path7348"
          style="opacity:1;fill:#ffe680;stroke:none;stroke-width:0.398456;stroke-linecap:round"
diff --git a/nuxt/entry.f8ff8132.js b/nuxt/entry.67e3e390.js
similarity index 97%
rename from nuxt/entry.f8ff8132.js
rename to nuxt/entry.67e3e390.js
index 5ef0528..fcb7bd9 100644
--- a/nuxt/entry.f8ff8132.js
+++ b/nuxt/entry.67e3e390.js
@@ -1,13 +1,13 @@
 function Uo(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?o=>!!n[o.toLowerCase()]:o=>!!n[o]}const ou="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",su=Uo(ou);function Fi(e){return!!e||e===""}function dn(e){if(Q(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ee(r)?au(r):dn(r);if(o)for(const s in o)t[s]=o[s]}return t}else{if(Ee(e))return e;if(ge(e))return e}}const iu=/;(?![^(]*\))/g,lu=/:(.+)/;function au(e){const t={};return e.split(iu).forEach(n=>{if(n){const r=n.split(lu);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function gt(e){let t="";if(Ee(e))t=e;else if(Q(e))for(let n=0;n<e.length;n++){const r=gt(e[n]);r&&(t+=r+" ")}else if(ge(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function dy(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ee(t)&&(e.class=gt(t)),n&&(e.style=dn(n)),e}const uo=e=>Ee(e)?e:e==null?"":Q(e)||ge(e)&&(e.toString===Ki||!G(e.toString))?JSON.stringify(e,qi,2):String(e),qi=(e,t)=>t&&t.__v_isRef?qi(e,t.value):sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:Vi(t)?{[`Set(${t.size})`]:[...t.values()]}:ge(t)&&!Q(t)&&!zi(t)?String(t):t,pe={},on=[],tt=()=>{},uu=()=>!1,cu=/^on[^a-z]/,Yn=e=>cu.test(e),Fo=e=>e.startsWith("onUpdate:"),Ae=Object.assign,qo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fu=Object.prototype.hasOwnProperty,oe=(e,t)=>fu.call(e,t),Q=Array.isArray,sn=e=>Sr(e)==="[object Map]",Vi=e=>Sr(e)==="[object Set]",G=e=>typeof e=="function",Ee=e=>typeof e=="string",Vo=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",Ko=e=>ge(e)&&G(e.then)&&G(e.catch),Ki=Object.prototype.toString,Sr=e=>Ki.call(e),du=e=>Sr(e).slice(8,-1),zi=e=>Sr(e)==="[object Object]",zo=e=>Ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,In=Uo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),kr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},pu=/-(\w)/g,ct=kr(e=>e.replace(pu,(t,n)=>n?n.toUpperCase():"")),hu=/\B([A-Z])/g,bn=kr(e=>e.replace(hu,"-$1").toLowerCase()),Pr=kr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vr=kr(e=>e?`on${Pr(e)}`:""),qn=(e,t)=>!Object.is(e,t),$n=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},dr=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Wo=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Es;const gu=()=>Es||(Es=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let it;class mu{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=it,!t&&it&&(this.index=(it.scopes||(it.scopes=[])).push(this)-1)}run(t){if(this.active){const n=it;try{return it=this,t()}finally{it=n}}}on(){it=this}off(){it=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this.active=!1}}}function yu(e,t=it){t&&t.active&&t.effects.push(e)}const Qo=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Wi=e=>(e.w&Mt)>0,Qi=e=>(e.n&Mt)>0,_u=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Mt},vu=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const o=t[r];Wi(o)&&!Qi(o)?o.delete(e):t[n++]=o,o.w&=~Mt,o.n&=~Mt}t.length=n}},co=new WeakMap;let Ln=0,Mt=1;const fo=30;let et;const Wt=Symbol(""),po=Symbol("");class Yo{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,yu(this,r)}run(){if(!this.active)return this.fn();let t=et,n=Tt;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=et,et=this,Tt=!0,Mt=1<<++Ln,Ln<=fo?_u(this):Cs(this),this.fn()}finally{Ln<=fo&&vu(this),Mt=1<<--Ln,et=this.parent,Tt=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){et===this?this.deferStop=!0:this.active&&(Cs(this),this.onStop&&this.onStop(),this.active=!1)}}function Cs(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let Tt=!0;const Yi=[];function wn(){Yi.push(Tt),Tt=!1}function En(){const e=Yi.pop();Tt=e===void 0?!0:e}function Fe(e,t,n){if(Tt&&et){let r=co.get(e);r||co.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Qo()),Ji(o)}}function Ji(e,t){let n=!1;Ln<=fo?Qi(e)||(e.n|=Mt,n=!Wi(e)):n=!e.has(et),n&&(e.add(et),et.deps.push(e))}function mt(e,t,n,r,o,s){const i=co.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&Q(e))i.forEach((a,u)=>{(u==="length"||u>=r)&&l.push(a)});else switch(n!==void 0&&l.push(i.get(n)),t){case"add":Q(e)?zo(n)&&l.push(i.get("length")):(l.push(i.get(Wt)),sn(e)&&l.push(i.get(po)));break;case"delete":Q(e)||(l.push(i.get(Wt)),sn(e)&&l.push(i.get(po)));break;case"set":sn(e)&&l.push(i.get(Wt));break}if(l.length===1)l[0]&&ho(l[0]);else{const a=[];for(const u of l)u&&a.push(...u);ho(Qo(a))}}function ho(e,t){const n=Q(e)?e:[...e];for(const r of n)r.computed&&xs(r);for(const r of n)r.computed||xs(r)}function xs(e,t){(e!==et||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const bu=Uo("__proto__,__v_isRef,__isVue"),Gi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Vo)),wu=Jo(),Eu=Jo(!1,!0),Cu=Jo(!0),Rs=xu();function xu(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=le(this);for(let s=0,i=this.length;s<i;s++)Fe(r,"get",s+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(le)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){wn();const r=le(this)[t].apply(this,n);return En(),r}}),e}function Jo(e=!1,t=!1){return function(r,o,s){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&s===(e?t?ju:nl:t?tl:el).get(r))return r;const i=Q(r);if(!e&&i&&oe(Rs,o))return Reflect.get(Rs,o,s);const l=Reflect.get(r,o,s);return(Vo(o)?Gi.has(o):bu(o))||(e||Fe(r,"get",o),t)?l:Se(l)?i&&zo(o)?l:l.value:ge(l)?e?rl(l):rt(l):l}}const Ru=Xi(),Su=Xi(!0);function Xi(e=!1){return function(n,r,o,s){let i=n[r];if(pn(i)&&Se(i)&&!Se(o))return!1;if(!e&&(!pr(o)&&!pn(o)&&(i=le(i),o=le(o)),!Q(n)&&Se(i)&&!Se(o)))return i.value=o,!0;const l=Q(n)&&zo(r)?Number(r)<n.length:oe(n,r),a=Reflect.set(n,r,o,s);return n===le(s)&&(l?qn(o,i)&&mt(n,"set",r,o):mt(n,"add",r,o)),a}}function ku(e,t){const n=oe(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&n&&mt(e,"delete",t,void 0),r}function Pu(e,t){const n=Reflect.has(e,t);return(!Vo(t)||!Gi.has(t))&&Fe(e,"has",t),n}function Au(e){return Fe(e,"iterate",Q(e)?"length":Wt),Reflect.ownKeys(e)}const Zi={get:wu,set:Ru,deleteProperty:ku,has:Pu,ownKeys:Au},Tu={get:Cu,set(e,t){return!0},deleteProperty(e,t){return!0}},Ou=Ae({},Zi,{get:Eu,set:Su}),Go=e=>e,Ar=e=>Reflect.getPrototypeOf(e);function tr(e,t,n=!1,r=!1){e=e.__v_raw;const o=le(e),s=le(t);n||(t!==s&&Fe(o,"get",t),Fe(o,"get",s));const{has:i}=Ar(o),l=r?Go:n?es:Vn;if(i.call(o,t))return l(e.get(t));if(i.call(o,s))return l(e.get(s));e!==o&&e.get(t)}function nr(e,t=!1){const n=this.__v_raw,r=le(n),o=le(e);return t||(e!==o&&Fe(r,"has",e),Fe(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function rr(e,t=!1){return e=e.__v_raw,!t&&Fe(le(e),"iterate",Wt),Reflect.get(e,"size",e)}function Ss(e){e=le(e);const t=le(this);return Ar(t).has.call(t,e)||(t.add(e),mt(t,"add",e,e)),this}function ks(e,t){t=le(t);const n=le(this),{has:r,get:o}=Ar(n);let s=r.call(n,e);s||(e=le(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?qn(t,i)&&mt(n,"set",e,t):mt(n,"add",e,t),this}function Ps(e){const t=le(this),{has:n,get:r}=Ar(t);let o=n.call(t,e);o||(e=le(e),o=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return o&&mt(t,"delete",e,void 0),s}function As(){const e=le(this),t=e.size!==0,n=e.clear();return t&&mt(e,"clear",void 0,void 0),n}function or(e,t){return function(r,o){const s=this,i=s.__v_raw,l=le(i),a=t?Go:e?es:Vn;return!e&&Fe(l,"iterate",Wt),i.forEach((u,c)=>r.call(o,a(u),a(c),s))}}function sr(e,t,n){return function(...r){const o=this.__v_raw,s=le(o),i=sn(s),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,u=o[e](...r),c=n?Go:t?es:Vn;return!t&&Fe(s,"iterate",a?po:Wt),{next(){const{value:f,done:p}=u.next();return p?{value:f,done:p}:{value:l?[c(f[0]),c(f[1])]:c(f),done:p}},[Symbol.iterator](){return this}}}}function wt(e){return function(...t){return e==="delete"?!1:this}}function Lu(){const e={get(s){return tr(this,s)},get size(){return rr(this)},has:nr,add:Ss,set:ks,delete:Ps,clear:As,forEach:or(!1,!1)},t={get(s){return tr(this,s,!1,!0)},get size(){return rr(this)},has:nr,add:Ss,set:ks,delete:Ps,clear:As,forEach:or(!1,!0)},n={get(s){return tr(this,s,!0)},get size(){return rr(this,!0)},has(s){return nr.call(this,s,!0)},add:wt("add"),set:wt("set"),delete:wt("delete"),clear:wt("clear"),forEach:or(!0,!1)},r={get(s){return tr(this,s,!0,!0)},get size(){return rr(this,!0)},has(s){return nr.call(this,s,!0)},add:wt("add"),set:wt("set"),delete:wt("delete"),clear:wt("clear"),forEach:or(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=sr(s,!1,!1),n[s]=sr(s,!0,!1),t[s]=sr(s,!1,!0),r[s]=sr(s,!0,!0)}),[e,n,t,r]}const[Mu,Du,Iu,$u]=Lu();function Xo(e,t){const n=t?e?$u:Iu:e?Du:Mu;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(oe(n,o)&&o in r?n:r,o,s)}const Bu={get:Xo(!1,!1)},Nu={get:Xo(!1,!0)},Hu={get:Xo(!0,!1)},el=new WeakMap,tl=new WeakMap,nl=new WeakMap,ju=new WeakMap;function Uu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fu(e){return e.__v_skip||!Object.isExtensible(e)?0:Uu(du(e))}function rt(e){return pn(e)?e:Zo(e,!1,Zi,Bu,el)}function qu(e){return Zo(e,!1,Ou,Nu,tl)}function rl(e){return Zo(e,!0,Tu,Hu,nl)}function Zo(e,t,n,r,o){if(!ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Fu(e);if(i===0)return e;const l=new Proxy(e,i===2?r:n);return o.set(e,l),l}function ln(e){return pn(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function pn(e){return!!(e&&e.__v_isReadonly)}function pr(e){return!!(e&&e.__v_isShallow)}function ol(e){return ln(e)||pn(e)}function le(e){const t=e&&e.__v_raw;return t?le(t):e}function sl(e){return dr(e,"__v_skip",!0),e}const Vn=e=>ge(e)?rt(e):e,es=e=>ge(e)?rl(e):e;function il(e){Tt&&et&&(e=le(e),Ji(e.dep||(e.dep=Qo())))}function ll(e,t){e=le(e),e.dep&&ho(e.dep)}function Se(e){return!!(e&&e.__v_isRef===!0)}function Qe(e){return al(e,!1)}function go(e){return al(e,!0)}function al(e,t){return Se(e)?e:new Vu(e,t)}class Vu{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:le(t),this._value=n?t:Vn(t)}get value(){return il(this),this._value}set value(t){const n=this.__v_isShallow||pr(t)||pn(t);t=n?t:le(t),qn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Vn(t),ll(this))}}function we(e){return Se(e)?e.value:e}const Ku={get:(e,t,n)=>we(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Se(o)&&!Se(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function ul(e){return ln(e)?e:new Proxy(e,Ku)}function cl(e){const t=Q(e)?new Array(e.length):{};for(const n in e)t[n]=ts(e,n);return t}class zu{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function ts(e,t,n){const r=e[t];return Se(r)?r:new zu(e,t,n)}var fl;class Wu{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[fl]=!1,this._dirty=!0,this.effect=new Yo(t,()=>{this._dirty||(this._dirty=!0,ll(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=le(this);return il(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}fl="__v_isReadonly";function Qu(e,t,n=!1){let r,o;const s=G(e);return s?(r=e,o=tt):(r=e.get,o=e.set),new Wu(r,o,s||!o,n)}function Ot(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){Cn(s,t,n)}return o}function Ye(e,t,n,r){if(G(e)){const s=Ot(e,t,n,r);return s&&Ko(s)&&s.catch(i=>{Cn(i,t,n)}),s}const o=[];for(let s=0;s<e.length;s++)o.push(Ye(e[s],t,n,r));return o}function Cn(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,l=n;for(;s;){const u=s.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,i,l)===!1)return}s=s.parent}const a=t.appContext.config.errorHandler;if(a){Ot(a,null,10,[e,i,l]);return}}Yu(e,n,o,r)}function Yu(e,t,n,r=!0){console.error(e)}let Kn=!1,mo=!1;const Oe=[];let at=0;const an=[];let ht=null,Kt=0;const dl=Promise.resolve();let ns=null;function xn(e){const t=ns||dl;return e?t.then(this?e.bind(this):e):t}function Ju(e){let t=at+1,n=Oe.length;for(;t<n;){const r=t+n>>>1;zn(Oe[r])<e?t=r+1:n=r}return t}function Tr(e){(!Oe.length||!Oe.includes(e,Kn&&e.allowRecurse?at+1:at))&&(e.id==null?Oe.push(e):Oe.splice(Ju(e.id),0,e),pl())}function pl(){!Kn&&!mo&&(mo=!0,ns=dl.then(gl))}function Gu(e){const t=Oe.indexOf(e);t>at&&Oe.splice(t,1)}function hl(e){Q(e)?an.push(...e):(!ht||!ht.includes(e,e.allowRecurse?Kt+1:Kt))&&an.push(e),pl()}function Ts(e,t=Kn?at+1:0){for(;t<Oe.length;t++){const n=Oe[t];n&&n.pre&&(Oe.splice(t,1),t--,n())}}function hr(e){if(an.length){const t=[...new Set(an)];if(an.length=0,ht){ht.push(...t);return}for(ht=t,ht.sort((n,r)=>zn(n)-zn(r)),Kt=0;Kt<ht.length;Kt++)ht[Kt]();ht=null,Kt=0}}const zn=e=>e.id==null?1/0:e.id,Xu=(e,t)=>{const n=zn(e)-zn(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function gl(e){mo=!1,Kn=!0,Oe.sort(Xu);const t=tt;try{for(at=0;at<Oe.length;at++){const n=Oe[at];n&&n.active!==!1&&Ot(n,null,14)}}finally{at=0,Oe.length=0,hr(),Kn=!1,ns=null,(Oe.length||an.length)&&gl()}}function Zu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||pe;let o=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in r){const c=`${i==="modelValue"?"model":i}Modifiers`,{number:f,trim:p}=r[c]||pe;p&&(o=n.map(g=>g.trim())),f&&(o=n.map(Wo))}let l,a=r[l=Vr(t)]||r[l=Vr(ct(t))];!a&&s&&(a=r[l=Vr(bn(t))]),a&&Ye(a,e,6,o);const u=r[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ye(u,e,6,o)}}function ml(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},l=!1;if(!G(e)){const a=u=>{const c=ml(u,t,!0);c&&(l=!0,Ae(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(ge(e)&&r.set(e,null),null):(Q(s)?s.forEach(a=>i[a]=null):Ae(i,s),ge(e)&&r.set(e,i),i)}function Or(e,t){return!e||!Yn(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,bn(t))||oe(e,t))}let Ie=null,Lr=null;function gr(e){const t=Ie;return Ie=e,Lr=e&&e.type.__scopeId||null,t}function py(e){Lr=e}function hy(){Lr=null}function Mr(e,t=Ie,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Fs(-1);const s=gr(t);let i;try{i=e(...o)}finally{gr(s),r._d&&Fs(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Kr(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:l,attrs:a,emit:u,render:c,renderCache:f,data:p,setupState:g,ctx:_,inheritAttrs:C}=e;let R,y;const h=gr(e);try{if(n.shapeFlag&4){const w=o||r;R=ze(c.call(w,w,f,s,g,p,_)),y=a}else{const w=t;R=ze(w.length>1?w(s,{attrs:a,slots:l,emit:u}):w(s,null)),y=t.props?a:tc(a)}}catch(w){Nn.length=0,Cn(w,e,1),R=me($e)}let v=R;if(y&&C!==!1){const w=Object.keys(y),{shapeFlag:T}=v;w.length&&T&7&&(i&&w.some(Fo)&&(y=nc(y,i)),v=_t(v,y))}return n.dirs&&(v=_t(v),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&(v.transition=n.transition),R=v,gr(h),R}function ec(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(gn(r)){if(r.type!==$e||r.children==="v-if"){if(t)return;t=r}}else return}return t}const tc=e=>{let t;for(const n in e)(n==="class"||n==="style"||Yn(n))&&((t||(t={}))[n]=e[n]);return t},nc=(e,t)=>{const n={};for(const r in e)(!Fo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function rc(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:l,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?Os(r,i,u):!!i;if(a&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const p=c[f];if(i[p]!==r[p]&&!Or(u,p))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:r===i?!1:r?i?Os(r,i,u):!0:!!i;return!1}function Os(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Or(n,s))return!0}return!1}function rs({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const yl=e=>e.__isSuspense,oc={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,s,i,l,a,u){e==null?sc(t,n,r,o,s,i,l,a,u):ic(e,t,n,r,o,i,l,a,u)},hydrate:lc,create:os,normalize:ac},_l=oc;function Wn(e,t){const n=e.props&&e.props[t];G(n)&&n()}function sc(e,t,n,r,o,s,i,l,a){const{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=os(e,o,r,t,f,n,s,i,l,a);u(null,p.pendingBranch=e.ssContent,f,null,r,p,s,i),p.deps>0?(Wn(e,"onPending"),Wn(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,i),un(p,e.ssFallback)):p.resolve()}function ic(e,t,n,r,o,s,i,l,{p:a,um:u,o:{createElement:c}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,g=t.ssFallback,{activeBranch:_,pendingBranch:C,isInFallback:R,isHydrating:y}=f;if(C)f.pendingBranch=p,ut(p,C)?(a(C,p,f.hiddenContainer,null,o,f,s,i,l),f.deps<=0?f.resolve():R&&(a(_,g,n,r,o,null,s,i,l),un(f,g))):(f.pendingId++,y?(f.isHydrating=!1,f.activeBranch=C):u(C,o,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),R?(a(null,p,f.hiddenContainer,null,o,f,s,i,l),f.deps<=0?f.resolve():(a(_,g,n,r,o,null,s,i,l),un(f,g))):_&&ut(p,_)?(a(_,p,n,r,o,f,s,i,l),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,o,f,s,i,l),f.deps<=0&&f.resolve()));else if(_&&ut(p,_))a(_,p,n,r,o,f,s,i,l),un(f,p);else if(Wn(t,"onPending"),f.pendingBranch=p,f.pendingId++,a(null,p,f.hiddenContainer,null,o,f,s,i,l),f.deps<=0)f.resolve();else{const{timeout:h,pendingId:v}=f;h>0?setTimeout(()=>{f.pendingId===v&&f.fallback(g)},h):h===0&&f.fallback(g)}}function os(e,t,n,r,o,s,i,l,a,u,c=!1){const{p:f,m:p,um:g,n:_,o:{parentNode:C,remove:R}}=u,y=Wo(e.props&&e.props.timeout),h={vnode:e,parent:t,parentComponent:n,isSVG:i,container:r,hiddenContainer:o,anchor:s,deps:0,pendingId:0,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:c,isUnmounted:!1,effects:[],resolve(v=!1){const{vnode:w,activeBranch:T,pendingBranch:O,pendingId:I,effects:k,parentComponent:F,container:U}=h;if(h.isHydrating)h.isHydrating=!1;else if(!v){const X=T&&O.transition&&O.transition.mode==="out-in";X&&(T.transition.afterLeave=()=>{I===h.pendingId&&p(O,U,j,0)});let{anchor:j}=h;T&&(j=_(T),g(T,F,h,!0)),X||p(O,U,j,0)}un(h,O),h.pendingBranch=null,h.isInFallback=!1;let W=h.parent,N=!1;for(;W;){if(W.pendingBranch){W.effects.push(...k),N=!0;break}W=W.parent}N||hl(k),h.effects=[],Wn(w,"onResolve")},fallback(v){if(!h.pendingBranch)return;const{vnode:w,activeBranch:T,parentComponent:O,container:I,isSVG:k}=h;Wn(w,"onFallback");const F=_(T),U=()=>{!h.isInFallback||(f(null,v,I,F,O,null,k,l,a),un(h,v))},W=v.transition&&v.transition.mode==="out-in";W&&(T.transition.afterLeave=U),h.isInFallback=!0,g(T,O,null,!0),W||U()},move(v,w,T){h.activeBranch&&p(h.activeBranch,v,w,T),h.container=v},next(){return h.activeBranch&&_(h.activeBranch)},registerDep(v,w){const T=!!h.pendingBranch;T&&h.deps++;const O=v.vnode.el;v.asyncDep.catch(I=>{Cn(I,v,0)}).then(I=>{if(v.isUnmounted||h.isUnmounted||h.pendingId!==v.suspenseId)return;v.asyncResolved=!0;const{vnode:k}=v;Co(v,I,!1),O&&(k.el=O);const F=!O&&v.subTree.el;w(v,k,C(O||v.subTree.el),O?null:_(v.subTree),h,i,a),F&&R(F),rs(v,k.el),T&&--h.deps===0&&h.resolve()})},unmount(v,w){h.isUnmounted=!0,h.activeBranch&&g(h.activeBranch,n,v,w),h.pendingBranch&&g(h.pendingBranch,n,v,w)}};return h}function lc(e,t,n,r,o,s,i,l,a){const u=t.suspense=os(t,r,n,e.parentNode,document.createElement("div"),null,o,s,i,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,s,i);return u.deps===0&&u.resolve(),c}function ac(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Ls(r?n.default:n),e.ssFallback=r?Ls(n.fallback):me($e)}function Ls(e){let t;if(G(e)){const n=hn&&e._c;n&&(e._d=!1,Le()),e=e(),n&&(e._d=!0,t=We,Hl())}return Q(e)&&(e=ec(e)),e=ze(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function vl(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):hl(e)}function un(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,o=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=o,rs(r,o))}function cn(e,t){if(Ce){let n=Ce.provides;const r=Ce.parent&&Ce.parent.provides;r===n&&(n=Ce.provides=Object.create(r)),n[e]=t}}function nt(e,t,n=!1){const r=Ce||Ie;if(r){const o=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&G(t)?t.call(r.proxy):t}}function uc(e,t){return ss(e,null,t)}const Ms={};function Ue(e,t,n){return ss(e,t,n)}function ss(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=pe){const l=Ce;let a,u=!1,c=!1;if(Se(e)?(a=()=>e.value,u=pr(e)):ln(e)?(a=()=>e,r=!0):Q(e)?(c=!0,u=e.some(y=>ln(y)||pr(y)),a=()=>e.map(y=>{if(Se(y))return y.value;if(ln(y))return rn(y);if(G(y))return Ot(y,l,2)})):G(e)?t?a=()=>Ot(e,l,2):a=()=>{if(!(l&&l.isUnmounted))return f&&f(),Ye(e,l,3,[p])}:a=tt,t&&r){const y=a;a=()=>rn(y())}let f,p=y=>{f=R.onStop=()=>{Ot(y,l,4)}};if(mn)return p=tt,t?n&&Ye(t,l,3,[a(),c?[]:void 0,p]):a(),tt;let g=c?[]:Ms;const _=()=>{if(!!R.active)if(t){const y=R.run();(r||u||(c?y.some((h,v)=>qn(h,g[v])):qn(y,g)))&&(f&&f(),Ye(t,l,3,[y,g===Ms?void 0:g,p]),g=y)}else R.run()};_.allowRecurse=!!t;let C;o==="sync"?C=_:o==="post"?C=()=>ke(_,l&&l.suspense):(_.pre=!0,l&&(_.id=l.uid),C=()=>Tr(_));const R=new Yo(a,C);return t?n?_():g=R.run():o==="post"?ke(R.run.bind(R),l&&l.suspense):R.run(),()=>{R.stop(),l&&l.scope&&qo(l.scope.effects,R)}}function cc(e,t,n){const r=this.proxy,o=Ee(e)?e.includes(".")?bl(r,e):()=>r[e]:e.bind(r,r);let s;G(t)?s=t:(s=t.handler,n=t);const i=Ce;Dt(this);const l=ss(o,s.bind(r),n);return i?Dt(i):Lt(),l}function bl(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function rn(e,t){if(!ge(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Se(e))rn(e.value,t);else if(Q(e))for(let n=0;n<e.length;n++)rn(e[n],t);else if(Vi(e)||sn(e))e.forEach(n=>{rn(n,t)});else if(zi(e))for(const n in e)rn(e[n],t);return e}function fc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Gn(()=>{e.isMounted=!0}),Rn(()=>{e.isUnmounting=!0}),e}const qe=[Function,Array],dc={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:qe,onEnter:qe,onAfterEnter:qe,onEnterCancelled:qe,onBeforeLeave:qe,onLeave:qe,onAfterLeave:qe,onLeaveCancelled:qe,onBeforeAppear:qe,onAppear:qe,onAfterAppear:qe,onAppearCancelled:qe},setup(e,{slots:t}){const n=bt(),r=fc();let o;return()=>{const s=t.default&&Cl(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){for(const C of s)if(C.type!==$e){i=C;break}}const l=le(e),{mode:a}=l;if(r.isLeaving)return zr(i);const u=Ds(i);if(!u)return zr(i);const c=yo(u,l,r,n);mr(u,c);const f=n.subTree,p=f&&Ds(f);let g=!1;const{getTransitionKey:_}=u.type;if(_){const C=_();o===void 0?o=C:C!==o&&(o=C,g=!0)}if(p&&p.type!==$e&&(!ut(u,p)||g)){const C=yo(p,l,r,n);if(mr(p,C),a==="out-in")return r.isLeaving=!0,C.afterLeave=()=>{r.isLeaving=!1,n.update()},zr(i);a==="in-out"&&u.type!==$e&&(C.delayLeave=(R,y,h)=>{const v=El(r,p);v[String(p.key)]=p,R._leaveCb=()=>{y(),R._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=h})}return i}}},wl=dc;function El(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function yo(e,t,n,r){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:p,onAfterLeave:g,onLeaveCancelled:_,onBeforeAppear:C,onAppear:R,onAfterAppear:y,onAppearCancelled:h}=t,v=String(e.key),w=El(n,e),T=(k,F)=>{k&&Ye(k,r,9,F)},O=(k,F)=>{const U=F[1];T(k,F),Q(k)?k.every(W=>W.length<=1)&&U():k.length<=1&&U()},I={mode:s,persisted:i,beforeEnter(k){let F=l;if(!n.isMounted)if(o)F=C||l;else return;k._leaveCb&&k._leaveCb(!0);const U=w[v];U&&ut(e,U)&&U.el._leaveCb&&U.el._leaveCb(),T(F,[k])},enter(k){let F=a,U=u,W=c;if(!n.isMounted)if(o)F=R||a,U=y||u,W=h||c;else return;let N=!1;const X=k._enterCb=j=>{N||(N=!0,j?T(W,[k]):T(U,[k]),I.delayedLeave&&I.delayedLeave(),k._enterCb=void 0)};F?O(F,[k,X]):X()},leave(k,F){const U=String(e.key);if(k._enterCb&&k._enterCb(!0),n.isUnmounting)return F();T(f,[k]);let W=!1;const N=k._leaveCb=X=>{W||(W=!0,F(),X?T(_,[k]):T(g,[k]),k._leaveCb=void 0,w[U]===e&&delete w[U])};w[U]=e,p?O(p,[k,N]):N()},clone(k){return yo(k,t,n,r)}};return I}function zr(e){if(Jn(e))return e=_t(e),e.children=null,e}function Ds(e){return Jn(e)?e.children?e.children[0]:void 0:e}function mr(e,t){e.shapeFlag&6&&e.component?mr(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Cl(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===Pe?(i.patchFlag&128&&o++,r=r.concat(Cl(i.children,t,l))):(t||i.type!==$e)&&r.push(l!=null?_t(i,{key:l}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}function Me(e){return G(e)?{setup:e,name:e.name}:e}const Qt=e=>!!e.type.__asyncLoader;function re(e){G(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:i=!0,onError:l}=e;let a=null,u,c=0;const f=()=>(c++,a=null,p()),p=()=>{let g;return a||(g=a=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),l)return new Promise((C,R)=>{l(_,()=>C(f()),()=>R(_),c+1)});throw _}).then(_=>g!==a&&a?a:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),u=_,_)))};return Me({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return u},setup(){const g=Ce;if(u)return()=>Wr(u,g);const _=h=>{a=null,Cn(h,g,13,!r)};if(i&&g.suspense||mn)return p().then(h=>()=>Wr(h,g)).catch(h=>(_(h),()=>r?me(r,{error:h}):null));const C=Qe(!1),R=Qe(),y=Qe(!!o);return o&&setTimeout(()=>{y.value=!1},o),s!=null&&setTimeout(()=>{if(!C.value&&!R.value){const h=new Error(`Async component timed out after ${s}ms.`);_(h),R.value=h}},s),p().then(()=>{C.value=!0,g.parent&&Jn(g.parent.vnode)&&Tr(g.parent.update)}).catch(h=>{_(h),R.value=h}),()=>{if(C.value&&u)return Wr(u,g);if(R.value&&r)return me(r,{error:R.value});if(n&&!y.value)return me(n)}}})}function Wr(e,{vnode:{ref:t,props:n,children:r,shapeFlag:o},parent:s}){const i=me(e,n,r);return i.ref=t,i}const Jn=e=>e.type.__isKeepAlive,pc={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=bt(),r=n.ctx;if(!r.renderer)return()=>{const h=t.default&&t.default();return h&&h.length===1?h[0]:h};const o=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=r,p=f("div");r.activate=(h,v,w,T,O)=>{const I=h.component;u(h,v,w,0,l),a(I.vnode,h,v,w,I,l,T,h.slotScopeIds,O),ke(()=>{I.isDeactivated=!1,I.a&&$n(I.a);const k=h.props&&h.props.onVnodeMounted;k&&Ne(k,I.parent,h)},l)},r.deactivate=h=>{const v=h.component;u(h,p,null,1,l),ke(()=>{v.da&&$n(v.da);const w=h.props&&h.props.onVnodeUnmounted;w&&Ne(w,v.parent,h),v.isDeactivated=!0},l)};function g(h){Qr(h),c(h,n,l,!0)}function _(h){o.forEach((v,w)=>{const T=xo(v.type);T&&(!h||!h(T))&&C(w)})}function C(h){const v=o.get(h);!i||v.type!==i.type?g(v):i&&Qr(i),o.delete(h),s.delete(h)}Ue(()=>[e.include,e.exclude],([h,v])=>{h&&_(w=>Mn(h,w)),v&&_(w=>!Mn(v,w))},{flush:"post",deep:!0});let R=null;const y=()=>{R!=null&&o.set(R,Yr(n.subTree))};return Gn(y),Sl(y),Rn(()=>{o.forEach(h=>{const{subTree:v,suspense:w}=n,T=Yr(v);if(h.type===T.type){Qr(T);const O=T.component.da;O&&ke(O,w);return}g(h)})}),()=>{if(R=null,!t.default)return null;const h=t.default(),v=h[0];if(h.length>1)return i=null,h;if(!gn(v)||!(v.shapeFlag&4)&&!(v.shapeFlag&128))return i=null,v;let w=Yr(v);const T=w.type,O=xo(Qt(w)?w.type.__asyncResolved||{}:T),{include:I,exclude:k,max:F}=e;if(I&&(!O||!Mn(I,O))||k&&O&&Mn(k,O))return i=w,v;const U=w.key==null?T:w.key,W=o.get(U);return w.el&&(w=_t(w),v.shapeFlag&128&&(v.ssContent=w)),R=U,W?(w.el=W.el,w.component=W.component,w.transition&&mr(w,w.transition),w.shapeFlag|=512,s.delete(U),s.add(U)):(s.add(U),F&&s.size>parseInt(F,10)&&C(s.values().next().value)),w.shapeFlag|=256,i=w,yl(v.type)?v:w}}},hc=pc;function Mn(e,t){return Q(e)?e.some(n=>Mn(n,t)):Ee(e)?e.split(",").includes(t):e.test?e.test(t):!1}function gc(e,t){xl(e,"a",t)}function mc(e,t){xl(e,"da",t)}function xl(e,t,n=Ce){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Dr(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Jn(o.parent.vnode)&&yc(r,t,n,o),o=o.parent}}function yc(e,t,n,r){const o=Dr(t,e,r,!0);yr(()=>{qo(r[t],o)},n)}function Qr(e){let t=e.shapeFlag;t&256&&(t-=256),t&512&&(t-=512),e.shapeFlag=t}function Yr(e){return e.shapeFlag&128?e.ssContent:e}function Dr(e,t,n=Ce,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;wn(),Dt(n);const l=Ye(t,n,e,i);return Lt(),En(),l});return r?o.unshift(s):o.push(s),s}}const vt=e=>(t,n=Ce)=>(!mn||e==="sp")&&Dr(e,(...r)=>t(...r),n),Rl=vt("bm"),Gn=vt("m"),_c=vt("bu"),Sl=vt("u"),Rn=vt("bum"),yr=vt("um"),vc=vt("sp"),bc=vt("rtg"),wc=vt("rtc");function kl(e,t=Ce){Dr("ec",e,t)}function lt(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];s&&(l.oldValue=s[i].value);let a=l.dir[r];a&&(wn(),Ye(a,n,8,[e.el,l,e,t]),En())}}const Pl="components";function Ir(e,t){return Cc(Pl,e,!0,t)||e}const Ec=Symbol();function Cc(e,t,n=!0,r=!1){const o=Ie||Ce;if(o){const s=o.type;if(e===Pl){const l=xo(s,!1);if(l&&(l===t||l===ct(t)||l===Pr(ct(t))))return s}const i=Is(o[e]||s[e],t)||Is(o.appContext[e],t);return!i&&r?s:i}}function Is(e,t){return e&&(e[t]||e[ct(t)]||e[Pr(ct(t))])}function _o(e,t,n,r){let o;const s=n&&n[r];if(Q(e)||Ee(e)){o=new Array(e.length);for(let i=0,l=e.length;i<l;i++)o[i]=t(e[i],i,void 0,s&&s[i])}else if(typeof e=="number"){o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,s&&s[i])}else if(ge(e))if(e[Symbol.iterator])o=Array.from(e,(i,l)=>t(i,l,void 0,s&&s[l]));else{const i=Object.keys(e);o=new Array(i.length);for(let l=0,a=i.length;l<a;l++){const u=i[l];o[l]=t(e[u],u,l,s&&s[l])}}else o=[];return n&&(n[r]=o),o}function xc(e,t,n={},r,o){if(Ie.isCE||Ie.parent&&Qt(Ie.parent)&&Ie.parent.isCE)return me("slot",t==="default"?null:{name:t},r&&r());let s=e[t];s&&s._c&&(s._d=!1),Le();const i=s&&Al(s(n)),l=Yt(Pe,{key:n.key||i&&i.key||`_${t}`},i||(r?r():[]),i&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Al(e){return e.some(t=>gn(t)?!(t.type===$e||t.type===Pe&&!Al(t.children)):!0)?e:null}const vo=e=>e?Fl(e)?us(e)||e.proxy:vo(e.parent):null,_r=Ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>vo(e.parent),$root:e=>vo(e.root),$emit:e=>e.emit,$options:e=>is(e),$forceUpdate:e=>e.f||(e.f=()=>Tr(e.update)),$nextTick:e=>e.n||(e.n=xn.bind(e.proxy)),$watch:e=>cc.bind(e)}),Rc={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(r!==pe&&oe(r,t))return i[t]=1,r[t];if(o!==pe&&oe(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&oe(u,t))return i[t]=3,s[t];if(n!==pe&&oe(n,t))return i[t]=4,n[t];bo&&(i[t]=0)}}const c=_r[t];let f,p;if(c)return t==="$attrs"&&Fe(e,"get",t),c(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==pe&&oe(n,t))return i[t]=4,n[t];if(p=a.config.globalProperties,oe(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return o!==pe&&oe(o,t)?(o[t]=n,!0):r!==pe&&oe(r,t)?(r[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let l;return!!n[i]||e!==pe&&oe(e,i)||t!==pe&&oe(t,i)||(l=s[0])&&oe(l,i)||oe(r,i)||oe(_r,i)||oe(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let bo=!0;function Sc(e){const t=is(e),n=e.proxy,r=e.ctx;bo=!1,t.beforeCreate&&$s(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:l,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:g,updated:_,activated:C,deactivated:R,beforeDestroy:y,beforeUnmount:h,destroyed:v,unmounted:w,render:T,renderTracked:O,renderTriggered:I,errorCaptured:k,serverPrefetch:F,expose:U,inheritAttrs:W,components:N,directives:X,filters:j}=t;if(u&&kc(u,r,null,e.appContext.config.unwrapInjectedRef),i)for(const fe in i){const ue=i[fe];G(ue)&&(r[fe]=ue.bind(n))}if(o){const fe=o.call(n,n);ge(fe)&&(e.data=rt(fe))}if(bo=!0,s)for(const fe in s){const ue=s[fe],Ge=G(ue)?ue.bind(n,n):G(ue.get)?ue.get.bind(n,n):tt,$t=!G(ue)&&G(ue.set)?ue.set.bind(n):tt,Xe=Re({get:Ge,set:$t});Object.defineProperty(r,fe,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:Be=>Xe.value=Be})}if(l)for(const fe in l)Tl(l[fe],r,n,fe);if(a){const fe=G(a)?a.call(n):a;Reflect.ownKeys(fe).forEach(ue=>{cn(ue,fe[ue])})}c&&$s(c,e,"c");function se(fe,ue){Q(ue)?ue.forEach(Ge=>fe(Ge.bind(n))):ue&&fe(ue.bind(n))}if(se(Rl,f),se(Gn,p),se(_c,g),se(Sl,_),se(gc,C),se(mc,R),se(kl,k),se(wc,O),se(bc,I),se(Rn,h),se(yr,w),se(vc,F),Q(U))if(U.length){const fe=e.exposed||(e.exposed={});U.forEach(ue=>{Object.defineProperty(fe,ue,{get:()=>n[ue],set:Ge=>n[ue]=Ge})})}else e.exposed||(e.exposed={});T&&e.render===tt&&(e.render=T),W!=null&&(e.inheritAttrs=W),N&&(e.components=N),X&&(e.directives=X)}function kc(e,t,n=tt,r=!1){Q(e)&&(e=wo(e));for(const o in e){const s=e[o];let i;ge(s)?"default"in s?i=nt(s.from||o,s.default,!0):i=nt(s.from||o):i=nt(s),Se(i)&&r?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function $s(e,t,n){Ye(Q(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Tl(e,t,n,r){const o=r.includes(".")?bl(n,r):()=>n[r];if(Ee(e)){const s=t[e];G(s)&&Ue(o,s)}else if(G(e))Ue(o,e.bind(n));else if(ge(e))if(Q(e))e.forEach(s=>Tl(s,t,n,r));else{const s=G(e.handler)?e.handler.bind(n):t[e.handler];G(s)&&Ue(o,s,e)}}function is(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let a;return l?a=l:!o.length&&!n&&!r?a=t:(a={},o.length&&o.forEach(u=>vr(a,u,i,!0)),vr(a,t,i)),ge(t)&&s.set(t,a),a}function vr(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&vr(e,s,n,!0),o&&o.forEach(i=>vr(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const l=Pc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Pc={data:Bs,props:Vt,emits:Vt,methods:Vt,computed:Vt,beforeCreate:De,created:De,beforeMount:De,mounted:De,beforeUpdate:De,updated:De,beforeDestroy:De,beforeUnmount:De,destroyed:De,unmounted:De,activated:De,deactivated:De,errorCaptured:De,serverPrefetch:De,components:Vt,directives:Vt,watch:Tc,provide:Bs,inject:Ac};function Bs(e,t){return t?e?function(){return Ae(G(e)?e.call(this,this):e,G(t)?t.call(this,this):t)}:t:e}function Ac(e,t){return Vt(wo(e),wo(t))}function wo(e){if(Q(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function De(e,t){return e?[...new Set([].concat(e,t))]:t}function Vt(e,t){return e?Ae(Ae(Object.create(null),e),t):t}function Tc(e,t){if(!e)return t;if(!t)return e;const n=Ae(Object.create(null),e);for(const r in t)n[r]=De(e[r],t[r]);return n}function Oc(e,t,n,r=!1){const o={},s={};dr(s,$r,1),e.propsDefaults=Object.create(null),Ol(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=r?o:qu(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Lc(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,l=le(o),[a]=e.propsOptions;let u=!1;if((r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let p=c[f];if(Or(e.emitsOptions,p))continue;const g=t[p];if(a)if(oe(s,p))g!==s[p]&&(s[p]=g,u=!0);else{const _=ct(p);o[_]=Eo(a,l,_,g,e,!1)}else g!==s[p]&&(s[p]=g,u=!0)}}}else{Ol(e,t,o,s)&&(u=!0);let c;for(const f in l)(!t||!oe(t,f)&&((c=bn(f))===f||!oe(t,c)))&&(a?n&&(n[f]!==void 0||n[c]!==void 0)&&(o[f]=Eo(a,l,f,void 0,e,!0)):delete o[f]);if(s!==l)for(const f in s)(!t||!oe(t,f)&&!0)&&(delete s[f],u=!0)}u&&mt(e,"set","$attrs")}function Ol(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(In(a))continue;const u=t[a];let c;o&&oe(o,c=ct(a))?!s||!s.includes(c)?n[c]=u:(l||(l={}))[c]=u:Or(e.emitsOptions,a)||(!(a in r)||u!==r[a])&&(r[a]=u,i=!0)}if(s){const a=le(n),u=l||pe;for(let c=0;c<s.length;c++){const f=s[c];n[f]=Eo(o,a,f,u[f],e,!oe(u,f))}}return i}function Eo(e,t,n,r,o,s){const i=e[n];if(i!=null){const l=oe(i,"default");if(l&&r===void 0){const a=i.default;if(i.type!==Function&&G(a)){const{propsDefaults:u}=o;n in u?r=u[n]:(Dt(o),r=u[n]=a.call(null,t),Lt())}else r=a}i[0]&&(s&&!l?r=!1:i[1]&&(r===""||r===bn(n))&&(r=!0))}return r}function Ll(e,t,n=!1){const r=t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},l=[];let a=!1;if(!G(e)){const c=f=>{a=!0;const[p,g]=Ll(f,t,!0);Ae(i,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return ge(e)&&r.set(e,on),on;if(Q(s))for(let c=0;c<s.length;c++){const f=ct(s[c]);Ns(f)&&(i[f]=pe)}else if(s)for(const c in s){const f=ct(c);if(Ns(f)){const p=s[c],g=i[f]=Q(p)||G(p)?{type:p}:p;if(g){const _=Us(Boolean,g.type),C=Us(String,g.type);g[0]=_>-1,g[1]=C<0||_<C,(_>-1||oe(g,"default"))&&l.push(f)}}}const u=[i,l];return ge(e)&&r.set(e,u),u}function Ns(e){return e[0]!=="$"}function Hs(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function js(e,t){return Hs(e)===Hs(t)}function Us(e,t){return Q(t)?t.findIndex(n=>js(n,e)):G(t)&&js(t,e)?0:-1}const Ml=e=>e[0]==="_"||e==="$stable",ls=e=>Q(e)?e.map(ze):[ze(e)],Mc=(e,t,n)=>{if(t._n)return t;const r=Mr((...o)=>ls(t(...o)),n);return r._c=!1,r},Dl=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Ml(o))continue;const s=e[o];if(G(s))t[o]=Mc(o,s,r);else if(s!=null){const i=ls(s);t[o]=()=>i}}},Il=(e,t)=>{const n=ls(t);e.slots.default=()=>n},Dc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=le(t),dr(t,"_",n)):Dl(t,e.slots={})}else e.slots={},t&&Il(e,t);dr(e.slots,$r,1)},Ic=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=pe;if(r.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(Ae(o,t),!n&&l===1&&delete o._):(s=!t.$stable,Dl(t,o)),i=t}else t&&(Il(e,t),i={default:1});if(s)for(const l in o)!Ml(l)&&!(l in i)&&delete o[l]};function $l(){return{app:null,config:{isNativeTag:uu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let $c=0;function Bc(e,t){return function(r,o=null){G(r)||(r=Object.assign({},r)),o!=null&&!ge(o)&&(o=null);const s=$l(),i=new Set;let l=!1;const a=s.app={_uid:$c++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:ef,get config(){return s.config},set config(u){},use(u,...c){return i.has(u)||(u&&G(u.install)?(i.add(u),u.install(a,...c)):G(u)&&(i.add(u),u(a,...c))),a},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),a},component(u,c){return c?(s.components[u]=c,a):s.components[u]},directive(u,c){return c?(s.directives[u]=c,a):s.directives[u]},mount(u,c,f){if(!l){const p=me(r,o);return p.appContext=s,c&&t?t(p,u):e(p,u,f),l=!0,a._container=u,u.__vue_app__=a,us(p.component)||p.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(u,c){return s.provides[u]=c,a}};return a}}function br(e,t,n,r,o=!1){if(Q(e)){e.forEach((p,g)=>br(p,t&&(Q(t)?t[g]:t),n,r,o));return}if(Qt(r)&&!o)return;const s=r.shapeFlag&4?us(r.component)||r.component.proxy:r.el,i=o?null:s,{i:l,r:a}=e,u=t&&t.r,c=l.refs===pe?l.refs={}:l.refs,f=l.setupState;if(u!=null&&u!==a&&(Ee(u)?(c[u]=null,oe(f,u)&&(f[u]=null)):Se(u)&&(u.value=null)),G(a))Ot(a,l,12,[i,c]);else{const p=Ee(a),g=Se(a);if(p||g){const _=()=>{if(e.f){const C=p?oe(f,a)?f[a]:c[a]:a.value;o?Q(C)&&qo(C,s):Q(C)?C.includes(s)||C.push(s):p?(c[a]=[s],oe(f,a)&&(f[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else p?(c[a]=i,oe(f,a)&&(f[a]=i)):g&&(a.value=i,e.k&&(c[e.k]=i))};i?(_.id=-1,ke(_,n)):_()}}}let Et=!1;const ir=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",lr=e=>e.nodeType===8;function Nc(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:i,remove:l,insert:a,createComment:u}}=e,c=(y,h)=>{if(!h.hasChildNodes()){n(null,y,h),hr(),h._vnode=y;return}Et=!1,f(h.firstChild,y,null,null,null),hr(),h._vnode=y,Et&&console.error("Hydration completed but contains mismatches.")},f=(y,h,v,w,T,O=!1)=>{const I=lr(y)&&y.data==="[",k=()=>C(y,h,v,w,T,I),{type:F,ref:U,shapeFlag:W,patchFlag:N}=h;let X=y.nodeType;h.el=y,N===-2&&(O=!1,h.dynamicChildren=null);let j=null;switch(F){case yt:X!==3?h.children===""?(a(h.el=o(""),i(y),y),j=y):j=k():(y.data!==h.children&&(Et=!0,y.data=h.children),j=s(y));break;case $e:X!==8||I?j=k():j=s(y);break;case Bn:if(I&&(y=s(y),X=y.nodeType),X===1||X===3){j=y;const Te=!h.children.length;for(let se=0;se<h.staticCount;se++)Te&&(h.children+=j.nodeType===1?j.outerHTML:j.data),se===h.staticCount-1&&(h.anchor=j),j=s(j);return I?s(j):j}else k();break;case Pe:I?j=_(y,h,v,w,T,O):j=k();break;default:if(W&1)X!==1||h.type.toLowerCase()!==y.tagName.toLowerCase()?j=k():j=p(y,h,v,w,T,O);else if(W&6){h.slotScopeIds=T;const Te=i(y);if(t(h,Te,null,v,w,ir(Te),O),j=I?R(y):s(y),j&&lr(j)&&j.data==="teleport end"&&(j=s(j)),Qt(h)){let se;I?(se=me(Pe),se.anchor=j?j.previousSibling:Te.lastChild):se=y.nodeType===3?Br(""):me("div"),se.el=y,h.component.subTree=se}}else W&64?X!==8?j=k():j=h.type.hydrate(y,h,v,w,T,O,e,g):W&128&&(j=h.type.hydrate(y,h,v,w,ir(i(y)),T,O,e,f))}return U!=null&&br(U,null,w,h),j},p=(y,h,v,w,T,O)=>{O=O||!!h.dynamicChildren;const{type:I,props:k,patchFlag:F,shapeFlag:U,dirs:W}=h,N=I==="input"&&W||I==="option";if(N||F!==-1){if(W&&lt(h,null,v,"created"),k)if(N||!O||F&48)for(const j in k)(N&&j.endsWith("value")||Yn(j)&&!In(j))&&r(y,j,null,k[j],!1,void 0,v);else k.onClick&&r(y,"onClick",null,k.onClick,!1,void 0,v);let X;if((X=k&&k.onVnodeBeforeMount)&&Ne(X,v,h),W&&lt(h,null,v,"beforeMount"),((X=k&&k.onVnodeMounted)||W)&&vl(()=>{X&&Ne(X,v,h),W&&lt(h,null,v,"mounted")},w),U&16&&!(k&&(k.innerHTML||k.textContent))){let j=g(y.firstChild,h,y,v,w,T,O);for(;j;){Et=!0;const Te=j;j=j.nextSibling,l(Te)}}else U&8&&y.textContent!==h.children&&(Et=!0,y.textContent=h.children)}return y.nextSibling},g=(y,h,v,w,T,O,I)=>{I=I||!!h.dynamicChildren;const k=h.children,F=k.length;for(let U=0;U<F;U++){const W=I?k[U]:k[U]=ze(k[U]);if(y)y=f(y,W,w,T,O,I);else{if(W.type===yt&&!W.children)continue;Et=!0,n(null,W,v,null,w,T,ir(v),O)}}return y},_=(y,h,v,w,T,O)=>{const{slotScopeIds:I}=h;I&&(T=T?T.concat(I):I);const k=i(y),F=g(s(y),h,k,v,w,T,O);return F&&lr(F)&&F.data==="]"?s(h.anchor=F):(Et=!0,a(h.anchor=u("]"),k,F),F)},C=(y,h,v,w,T,O)=>{if(Et=!0,h.el=null,O){const F=R(y);for(;;){const U=s(y);if(U&&U!==F)l(U);else break}}const I=s(y),k=i(y);return l(y),n(null,h,k,I,v,w,ir(k),T),I},R=y=>{let h=0;for(;y;)if(y=s(y),y&&lr(y)&&(y.data==="["&&h++,y.data==="]")){if(h===0)return s(y);h--}return y};return[c,f]}const ke=vl;function Hc(e){return Bl(e)}function jc(e){return Bl(e,Nc)}function Bl(e,t){const n=gu();n.__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:i,createText:l,createComment:a,setText:u,setElementText:c,parentNode:f,nextSibling:p,setScopeId:g=tt,insertStaticContent:_}=e,C=(d,m,b,E=null,S=null,M=null,B=!1,L=null,D=!!m.dynamicChildren)=>{if(d===m)return;d&&!ut(d,m)&&(E=$(d),Be(d,S,M,!0),d=null),m.patchFlag===-2&&(D=!1,m.dynamicChildren=null);const{type:P,ref:K,shapeFlag:q}=m;switch(P){case yt:R(d,m,b,E);break;case $e:y(d,m,b,E);break;case Bn:d==null&&h(m,b,E,B);break;case Pe:N(d,m,b,E,S,M,B,L,D);break;default:q&1?T(d,m,b,E,S,M,B,L,D):q&6?X(d,m,b,E,S,M,B,L,D):(q&64||q&128)&&P.process(d,m,b,E,S,M,B,L,D,ie)}K!=null&&S&&br(K,d&&d.ref,M,m||d,!m)},R=(d,m,b,E)=>{if(d==null)r(m.el=l(m.children),b,E);else{const S=m.el=d.el;m.children!==d.children&&u(S,m.children)}},y=(d,m,b,E)=>{d==null?r(m.el=a(m.children||""),b,E):m.el=d.el},h=(d,m,b,E)=>{[d.el,d.anchor]=_(d.children,m,b,E,d.el,d.anchor)},v=({el:d,anchor:m},b,E)=>{let S;for(;d&&d!==m;)S=p(d),r(d,b,E),d=S;r(m,b,E)},w=({el:d,anchor:m})=>{let b;for(;d&&d!==m;)b=p(d),o(d),d=b;o(m)},T=(d,m,b,E,S,M,B,L,D)=>{B=B||m.type==="svg",d==null?O(m,b,E,S,M,B,L,D):F(d,m,S,M,B,L,D)},O=(d,m,b,E,S,M,B,L)=>{let D,P;const{type:K,props:q,shapeFlag:z,transition:Y,dirs:ne}=d;if(D=d.el=i(d.type,M,q&&q.is,q),z&8?c(D,d.children):z&16&&k(d.children,D,null,E,S,M&&K!=="foreignObject",B,L),ne&&lt(d,null,E,"created"),q){for(const ce in q)ce!=="value"&&!In(ce)&&s(D,ce,null,q[ce],M,d.children,E,S,H);"value"in q&&s(D,"value",null,q.value),(P=q.onVnodeBeforeMount)&&Ne(P,E,d)}I(D,d,d.scopeId,B,E),ne&&lt(d,null,E,"beforeMount");const de=(!S||S&&!S.pendingBranch)&&Y&&!Y.persisted;de&&Y.beforeEnter(D),r(D,m,b),((P=q&&q.onVnodeMounted)||de||ne)&&ke(()=>{P&&Ne(P,E,d),de&&Y.enter(D),ne&&lt(d,null,E,"mounted")},S)},I=(d,m,b,E,S)=>{if(b&&g(d,b),E)for(let M=0;M<E.length;M++)g(d,E[M]);if(S){let M=S.subTree;if(m===M){const B=S.vnode;I(d,B,B.scopeId,B.slotScopeIds,S.parent)}}},k=(d,m,b,E,S,M,B,L,D=0)=>{for(let P=D;P<d.length;P++){const K=d[P]=L?St(d[P]):ze(d[P]);C(null,K,m,b,E,S,M,B,L)}},F=(d,m,b,E,S,M,B)=>{const L=m.el=d.el;let{patchFlag:D,dynamicChildren:P,dirs:K}=m;D|=d.patchFlag&16;const q=d.props||pe,z=m.props||pe;let Y;b&&Bt(b,!1),(Y=z.onVnodeBeforeUpdate)&&Ne(Y,b,m,d),K&&lt(m,d,b,"beforeUpdate"),b&&Bt(b,!0);const ne=S&&m.type!=="foreignObject";if(P?U(d.dynamicChildren,P,L,b,E,ne,M):B||ue(d,m,L,null,b,E,ne,M,!1),D>0){if(D&16)W(L,m,q,z,b,E,S);else if(D&2&&q.class!==z.class&&s(L,"class",null,z.class,S),D&4&&s(L,"style",q.style,z.style,S),D&8){const de=m.dynamicProps;for(let ce=0;ce<de.length;ce++){const ve=de[ce],Ze=q[ve],Zt=z[ve];(Zt!==Ze||ve==="value")&&s(L,ve,Ze,Zt,S,d.children,b,E,H)}}D&1&&d.children!==m.children&&c(L,m.children)}else!B&&P==null&&W(L,m,q,z,b,E,S);((Y=z.onVnodeUpdated)||K)&&ke(()=>{Y&&Ne(Y,b,m,d),K&&lt(m,d,b,"updated")},E)},U=(d,m,b,E,S,M,B)=>{for(let L=0;L<m.length;L++){const D=d[L],P=m[L],K=D.el&&(D.type===Pe||!ut(D,P)||D.shapeFlag&70)?f(D.el):b;C(D,P,K,null,E,S,M,B,!0)}},W=(d,m,b,E,S,M,B)=>{if(b!==E){if(b!==pe)for(const L in b)!In(L)&&!(L in E)&&s(d,L,b[L],null,B,m.children,S,M,H);for(const L in E){if(In(L))continue;const D=E[L],P=b[L];D!==P&&L!=="value"&&s(d,L,P,D,B,m.children,S,M,H)}"value"in E&&s(d,"value",b.value,E.value)}},N=(d,m,b,E,S,M,B,L,D)=>{const P=m.el=d?d.el:l(""),K=m.anchor=d?d.anchor:l("");let{patchFlag:q,dynamicChildren:z,slotScopeIds:Y}=m;Y&&(L=L?L.concat(Y):Y),d==null?(r(P,b,E),r(K,b,E),k(m.children,b,K,S,M,B,L,D)):q>0&&q&64&&z&&d.dynamicChildren?(U(d.dynamicChildren,z,b,S,M,B,L),(m.key!=null||S&&m===S.subTree)&&Nl(d,m,!0)):ue(d,m,b,K,S,M,B,L,D)},X=(d,m,b,E,S,M,B,L,D)=>{m.slotScopeIds=L,d==null?m.shapeFlag&512?S.ctx.activate(m,b,E,B,D):j(m,b,E,S,M,B,D):Te(d,m,D)},j=(d,m,b,E,S,M,B)=>{const L=d.component=Qc(d,E,S);if(Jn(d)&&(L.ctx.renderer=ie),Yc(L),L.asyncDep){if(S&&S.registerDep(L,se),!d.el){const D=L.subTree=me($e);y(null,D,m,b)}return}se(L,d,m,b,S,M,B)},Te=(d,m,b)=>{const E=m.component=d.component;if(rc(d,m,b))if(E.asyncDep&&!E.asyncResolved){fe(E,m,b);return}else E.next=m,Gu(E.update),E.update();else m.el=d.el,E.vnode=m},se=(d,m,b,E,S,M,B)=>{const L=()=>{if(d.isMounted){let{next:K,bu:q,u:z,parent:Y,vnode:ne}=d,de=K,ce;Bt(d,!1),K?(K.el=ne.el,fe(d,K,B)):K=ne,q&&$n(q),(ce=K.props&&K.props.onVnodeBeforeUpdate)&&Ne(ce,Y,K,ne),Bt(d,!0);const ve=Kr(d),Ze=d.subTree;d.subTree=ve,C(Ze,ve,f(Ze.el),$(Ze),d,S,M),K.el=ve.el,de===null&&rs(d,ve.el),z&&ke(z,S),(ce=K.props&&K.props.onVnodeUpdated)&&ke(()=>Ne(ce,Y,K,ne),S)}else{let K;const{el:q,props:z}=m,{bm:Y,m:ne,parent:de}=d,ce=Qt(m);if(Bt(d,!1),Y&&$n(Y),!ce&&(K=z&&z.onVnodeBeforeMount)&&Ne(K,de,m),Bt(d,!0),q&&ee){const ve=()=>{d.subTree=Kr(d),ee(q,d.subTree,d,S,null)};ce?m.type.__asyncLoader().then(()=>!d.isUnmounted&&ve()):ve()}else{const ve=d.subTree=Kr(d);C(null,ve,b,E,d,S,M),m.el=ve.el}if(ne&&ke(ne,S),!ce&&(K=z&&z.onVnodeMounted)){const ve=m;ke(()=>Ne(K,de,ve),S)}(m.shapeFlag&256||de&&Qt(de.vnode)&&de.vnode.shapeFlag&256)&&d.a&&ke(d.a,S),d.isMounted=!0,m=b=E=null}},D=d.effect=new Yo(L,()=>Tr(P),d.scope),P=d.update=()=>D.run();P.id=d.uid,Bt(d,!0),P()},fe=(d,m,b)=>{m.component=d;const E=d.vnode.props;d.vnode=m,d.next=null,Lc(d,m.props,E,b),Ic(d,m.children,b),wn(),Ts(),En()},ue=(d,m,b,E,S,M,B,L,D=!1)=>{const P=d&&d.children,K=d?d.shapeFlag:0,q=m.children,{patchFlag:z,shapeFlag:Y}=m;if(z>0){if(z&128){$t(P,q,b,E,S,M,B,L,D);return}else if(z&256){Ge(P,q,b,E,S,M,B,L,D);return}}Y&8?(K&16&&H(P,S,M),q!==P&&c(b,q)):K&16?Y&16?$t(P,q,b,E,S,M,B,L,D):H(P,S,M,!0):(K&8&&c(b,""),Y&16&&k(q,b,E,S,M,B,L,D))},Ge=(d,m,b,E,S,M,B,L,D)=>{d=d||on,m=m||on;const P=d.length,K=m.length,q=Math.min(P,K);let z;for(z=0;z<q;z++){const Y=m[z]=D?St(m[z]):ze(m[z]);C(d[z],Y,b,null,S,M,B,L,D)}P>K?H(d,S,M,!0,!1,q):k(m,b,E,S,M,B,L,D,q)},$t=(d,m,b,E,S,M,B,L,D)=>{let P=0;const K=m.length;let q=d.length-1,z=K-1;for(;P<=q&&P<=z;){const Y=d[P],ne=m[P]=D?St(m[P]):ze(m[P]);if(ut(Y,ne))C(Y,ne,b,null,S,M,B,L,D);else break;P++}for(;P<=q&&P<=z;){const Y=d[q],ne=m[z]=D?St(m[z]):ze(m[z]);if(ut(Y,ne))C(Y,ne,b,null,S,M,B,L,D);else break;q--,z--}if(P>q){if(P<=z){const Y=z+1,ne=Y<K?m[Y].el:E;for(;P<=z;)C(null,m[P]=D?St(m[P]):ze(m[P]),b,ne,S,M,B,L,D),P++}}else if(P>z)for(;P<=q;)Be(d[P],S,M,!0),P++;else{const Y=P,ne=P,de=new Map;for(P=ne;P<=z;P++){const He=m[P]=D?St(m[P]):ze(m[P]);He.key!=null&&de.set(He.key,P)}let ce,ve=0;const Ze=z-ne+1;let Zt=!1,vs=0;const An=new Array(Ze);for(P=0;P<Ze;P++)An[P]=0;for(P=Y;P<=q;P++){const He=d[P];if(ve>=Ze){Be(He,S,M,!0);continue}let st;if(He.key!=null)st=de.get(He.key);else for(ce=ne;ce<=z;ce++)if(An[ce-ne]===0&&ut(He,m[ce])){st=ce;break}st===void 0?Be(He,S,M,!0):(An[st-ne]=P+1,st>=vs?vs=st:Zt=!0,C(He,m[st],b,null,S,M,B,L,D),ve++)}const bs=Zt?Uc(An):on;for(ce=bs.length-1,P=Ze-1;P>=0;P--){const He=ne+P,st=m[He],ws=He+1<K?m[He+1].el:E;An[P]===0?C(null,st,b,ws,S,M,B,L,D):Zt&&(ce<0||P!==bs[ce]?Xe(st,b,ws,2):ce--)}}},Xe=(d,m,b,E,S=null)=>{const{el:M,type:B,transition:L,children:D,shapeFlag:P}=d;if(P&6){Xe(d.component.subTree,m,b,E);return}if(P&128){d.suspense.move(m,b,E);return}if(P&64){B.move(d,m,b,ie);return}if(B===Pe){r(M,m,b);for(let q=0;q<D.length;q++)Xe(D[q],m,b,E);r(d.anchor,m,b);return}if(B===Bn){v(d,m,b);return}if(E!==2&&P&1&&L)if(E===0)L.beforeEnter(M),r(M,m,b),ke(()=>L.enter(M),S);else{const{leave:q,delayLeave:z,afterLeave:Y}=L,ne=()=>r(M,m,b),de=()=>{q(M,()=>{ne(),Y&&Y()})};z?z(M,ne,de):de()}else r(M,m,b)},Be=(d,m,b,E=!1,S=!1)=>{const{type:M,props:B,ref:L,children:D,dynamicChildren:P,shapeFlag:K,patchFlag:q,dirs:z}=d;if(L!=null&&br(L,null,b,d,!0),K&256){m.ctx.deactivate(d);return}const Y=K&1&&z,ne=!Qt(d);let de;if(ne&&(de=B&&B.onVnodeBeforeUnmount)&&Ne(de,m,d),K&6)x(d.component,b,E);else{if(K&128){d.suspense.unmount(b,E);return}Y&&lt(d,null,m,"beforeUnmount"),K&64?d.type.remove(d,m,b,S,ie,E):P&&(M!==Pe||q>0&&q&64)?H(P,m,b,!1,!0):(M===Pe&&q&384||!S&&K&16)&&H(D,m,b),E&&Xt(d)}(ne&&(de=B&&B.onVnodeUnmounted)||Y)&&ke(()=>{de&&Ne(de,m,d),Y&&lt(d,null,m,"unmounted")},b)},Xt=d=>{const{type:m,el:b,anchor:E,transition:S}=d;if(m===Pe){er(b,E);return}if(m===Bn){w(d);return}const M=()=>{o(b),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(d.shapeFlag&1&&S&&!S.persisted){const{leave:B,delayLeave:L}=S,D=()=>B(b,M);L?L(d.el,M,D):D()}else M()},er=(d,m)=>{let b;for(;d!==m;)b=p(d),o(d),d=b;o(m)},x=(d,m,b)=>{const{bum:E,scope:S,update:M,subTree:B,um:L}=d;E&&$n(E),S.stop(),M&&(M.active=!1,Be(B,d,m,b)),L&&ke(L,m),ke(()=>{d.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve())},H=(d,m,b,E=!1,S=!1,M=0)=>{for(let B=M;B<d.length;B++)Be(d[B],m,b,E,S)},$=d=>d.shapeFlag&6?$(d.component.subTree):d.shapeFlag&128?d.suspense.next():p(d.anchor||d.el),V=(d,m,b)=>{d==null?m._vnode&&Be(m._vnode,null,null,!0):C(m._vnode||null,d,m,null,null,null,b),Ts(),hr(),m._vnode=d},ie={p:C,um:Be,m:Xe,r:Xt,mt:j,mc:k,pc:ue,pbc:U,n:$,o:e};let ye,ee;return t&&([ye,ee]=t(ie)),{render:V,hydrate:ye,createApp:Bc(V,ye)}}function Bt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Nl(e,t,n=!1){const r=e.children,o=t.children;if(Q(r)&&Q(o))for(let s=0;s<r.length;s++){const i=r[s];let l=o[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[s]=St(o[s]),l.el=i.el),n||Nl(i,l))}}function Uc(e){const t=e.slice(),n=[0];let r,o,s,i,l;const a=e.length;for(r=0;r<a;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<u?s=l+1:i=l;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}const Fc=e=>e.__isTeleport,Pe=Symbol(void 0),yt=Symbol(void 0),$e=Symbol(void 0),Bn=Symbol(void 0),Nn=[];let We=null;function Le(e=!1){Nn.push(We=e?null:[])}function Hl(){Nn.pop(),We=Nn[Nn.length-1]||null}let hn=1;function Fs(e){hn+=e}function jl(e){return e.dynamicChildren=hn>0?We||on:null,Hl(),hn>0&&We&&We.push(e),e}function At(e,t,n,r,o,s){return jl(wr(e,t,n,r,o,s,!0))}function Yt(e,t,n,r,o){return jl(me(e,t,n,r,o,!0))}function gn(e){return e?e.__v_isVNode===!0:!1}function ut(e,t){return e.type===t.type&&e.key===t.key}const $r="__vInternal",Ul=({key:e})=>e!=null?e:null,cr=({ref:e,ref_key:t,ref_for:n})=>e!=null?Ee(e)||Se(e)||G(e)?{i:Ie,r:e,k:t,f:!!n}:e:null;function wr(e,t=null,n=null,r=0,o=null,s=e===Pe?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ul(t),ref:t&&cr(t),scopeId:Lr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};return l?(as(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=Ee(n)?8:16),hn>0&&!i&&We&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&We.push(a),a}const me=qc;function qc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Ec)&&(e=$e),gn(e)){const l=_t(e,t,!0);return n&&as(l,n),hn>0&&!s&&We&&(l.shapeFlag&6?We[We.indexOf(e)]=l:We.push(l)),l.patchFlag|=-2,l}if(Xc(e)&&(e=e.__vccOpts),t){t=Vc(t);let{class:l,style:a}=t;l&&!Ee(l)&&(t.class=gt(l)),ge(a)&&(ol(a)&&!Q(a)&&(a=Ae({},a)),t.style=dn(a))}const i=Ee(e)?1:yl(e)?128:Fc(e)?64:ge(e)?4:G(e)?2:0;return wr(e,t,n,r,o,i,s,!0)}function Vc(e){return e?ol(e)||$r in e?Ae({},e):e:null}function _t(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,l=t?Kc(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ul(l),ref:t&&t.ref?n&&o?Q(o)?o.concat(cr(t)):[o,cr(t)]:cr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_t(e.ssContent),ssFallback:e.ssFallback&&_t(e.ssFallback),el:e.el,anchor:e.anchor}}function Br(e=" ",t=0){return me(yt,null,e,t)}function gy(e,t){const n=me(Bn,null,e);return n.staticCount=t,n}function my(e="",t=!1){return t?(Le(),Yt($e,null,e)):me($e,null,e)}function ze(e){return e==null||typeof e=="boolean"?me($e):Q(e)?me(Pe,null,e.slice()):typeof e=="object"?St(e):me(yt,null,String(e))}function St(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_t(e)}function as(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),as(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!($r in t)?t._ctx=Ie:o===3&&Ie&&(Ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else G(t)?(t={default:t,_ctx:Ie},n=32):(t=String(t),r&64?(n=16,t=[Br(t)]):n=8);e.children=t,e.shapeFlag|=n}function Kc(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=gt([t.class,r.class]));else if(o==="style")t.style=dn([t.style,r.style]);else if(Yn(o)){const s=t[o],i=r[o];i&&s!==i&&!(Q(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Ne(e,t,n,r=null){Ye(e,t,7,[n,r])}const zc=$l();let Wc=0;function Qc(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||zc,s={uid:Wc++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new mu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ll(r,o),emitsOptions:ml(r,o),emit:null,emitted:null,propsDefaults:pe,inheritAttrs:r.inheritAttrs,ctx:pe,data:pe,props:pe,attrs:pe,slots:pe,refs:pe,setupState:pe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=Zu.bind(null,s),e.ce&&e.ce(s),s}let Ce=null;const bt=()=>Ce||Ie,Dt=e=>{Ce=e,e.scope.on()},Lt=()=>{Ce&&Ce.scope.off(),Ce=null};function Fl(e){return e.vnode.shapeFlag&4}let mn=!1;function Yc(e,t=!1){mn=t;const{props:n,children:r}=e.vnode,o=Fl(e);Oc(e,n,o,t),Dc(e,r);const s=o?Jc(e,t):void 0;return mn=!1,s}function Jc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=sl(new Proxy(e.ctx,Rc));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?Vl(e):null;Dt(e),wn();const s=Ot(r,e,0,[e.props,o]);if(En(),Lt(),Ko(s)){if(s.then(Lt,Lt),t)return s.then(i=>{Co(e,i,t)}).catch(i=>{Cn(i,e,0)});e.asyncDep=s}else Co(e,s,t)}else ql(e,t)}function Co(e,t,n){G(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=ul(t)),ql(e,n)}let qs;function ql(e,t,n){const r=e.type;if(!e.render){if(!t&&qs&&!r.render){const o=r.template||is(e).template;if(o){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:a}=r,u=Ae(Ae({isCustomElement:s,delimiters:l},i),a);r.render=qs(o,u)}}e.render=r.render||tt}Dt(e),wn(),Sc(e),En(),Lt()}function Gc(e){return new Proxy(e.attrs,{get(t,n){return Fe(e,"get","$attrs"),t[n]}})}function Vl(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=Gc(e))},slots:e.slots,emit:e.emit,expose:t}}function us(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ul(sl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in _r)return _r[n](e)}}))}function xo(e,t=!0){return G(e)?e.displayName||e.name:e.name||t&&e.__name}function Xc(e){return G(e)&&"__vccOpts"in e}const Re=(e,t)=>Qu(e,t,mn);function cs(){return Zc().slots}function Zc(){const e=bt();return e.setupContext||(e.setupContext=Vl(e))}function yy(e){const t=bt();let n=e();return Lt(),Ko(n)&&(n=n.catch(r=>{throw Dt(t),r})),[n,()=>Dt(t)]}function _e(e,t,n){const r=arguments.length;return r===2?ge(t)&&!Q(t)?gn(t)?me(e,null,[t]):me(e,t):me(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&gn(n)&&(n=[n]),me(e,t,n))}const ef="3.2.41",tf="http://www.w3.org/2000/svg",zt=typeof document<"u"?document:null,Vs=zt&&zt.createElement("template"),nf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?zt.createElementNS(tf,e):zt.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>zt.createTextNode(e),createComment:e=>zt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>zt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Vs.innerHTML=r?`<svg>${e}</svg>`:e;const l=Vs.content;if(r){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function rf(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function of(e,t,n){const r=e.style,o=Ee(n);if(n&&!o){for(const s in n)Ro(r,s,n[s]);if(t&&!Ee(t))for(const s in t)n[s]==null&&Ro(r,s,"")}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const Ks=/\s*!important$/;function Ro(e,t,n){if(Q(n))n.forEach(r=>Ro(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=sf(e,t);Ks.test(n)?e.setProperty(bn(r),n.replace(Ks,""),"important"):e[r]=n}}const zs=["Webkit","Moz","ms"],Jr={};function sf(e,t){const n=Jr[t];if(n)return n;let r=ct(t);if(r!=="filter"&&r in e)return Jr[t]=r;r=Pr(r);for(let o=0;o<zs.length;o++){const s=zs[o]+r;if(s in e)return Jr[t]=s}return t}const Ws="http://www.w3.org/1999/xlink";function lf(e,t,n,r,o){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Ws,t.slice(6,t.length)):e.setAttributeNS(Ws,t,n);else{const s=su(t);n==null||s&&!Fi(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function af(e,t,n,r,o,s,i){if(t==="innerHTML"||t==="textContent"){r&&i(r,o,s),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const a=n==null?"":n;(e.value!==a||e.tagName==="OPTION")&&(e.value=a),n==null&&e.removeAttribute(t);return}let l=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Fi(n):n==null&&a==="string"?(n="",l=!0):a==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(t)}function uf(e,t,n,r){e.addEventListener(t,n,r)}function cf(e,t,n,r){e.removeEventListener(t,n,r)}function ff(e,t,n,r,o=null){const s=e._vei||(e._vei={}),i=s[t];if(r&&i)i.value=r;else{const[l,a]=df(t);if(r){const u=s[t]=gf(r,o);uf(e,l,u,a)}else i&&(cf(e,l,i,a),s[t]=void 0)}}const Qs=/(?:Once|Passive|Capture)$/;function df(e){let t;if(Qs.test(e)){t={};let r;for(;r=e.match(Qs);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):bn(e.slice(2)),t]}let Gr=0;const pf=Promise.resolve(),hf=()=>Gr||(pf.then(()=>Gr=0),Gr=Date.now());function gf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ye(mf(r,n.value),t,5,[r])};return n.value=e,n.attached=hf(),n}function mf(e,t){if(Q(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Ys=/^on[a-z]/,yf=(e,t,n,r,o=!1,s,i,l,a)=>{t==="class"?rf(e,r,o):t==="style"?of(e,n,r):Yn(t)?Fo(t)||ff(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_f(e,t,r,o))?af(e,t,r,s,i,l,a):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),lf(e,t,r,o))};function _f(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Ys.test(t)&&G(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Ys.test(t)&&Ee(n)?!1:t in e}const Ct="transition",Tn="animation",Nr=(e,{slots:t})=>_e(wl,vf(e),t);Nr.displayName="Transition";const Kl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Nr.props=Ae({},wl.props,Kl);const Nt=(e,t=[])=>{Q(e)?e.forEach(n=>n(...t)):e&&e(...t)},Js=e=>e?Q(e)?e.some(t=>t.length>1):e.length>1:!1;function vf(e){const t={};for(const N in e)N in Kl||(t[N]=e[N]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:c=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,_=bf(o),C=_&&_[0],R=_&&_[1],{onBeforeEnter:y,onEnter:h,onEnterCancelled:v,onLeave:w,onLeaveCancelled:T,onBeforeAppear:O=y,onAppear:I=h,onAppearCancelled:k=v}=t,F=(N,X,j)=>{Ht(N,X?c:l),Ht(N,X?u:i),j&&j()},U=(N,X)=>{N._isLeaving=!1,Ht(N,f),Ht(N,g),Ht(N,p),X&&X()},W=N=>(X,j)=>{const Te=N?I:h,se=()=>F(X,N,j);Nt(Te,[X,se]),Gs(()=>{Ht(X,N?a:s),xt(X,N?c:l),Js(Te)||Xs(X,r,C,se)})};return Ae(t,{onBeforeEnter(N){Nt(y,[N]),xt(N,s),xt(N,i)},onBeforeAppear(N){Nt(O,[N]),xt(N,a),xt(N,u)},onEnter:W(!1),onAppear:W(!0),onLeave(N,X){N._isLeaving=!0;const j=()=>U(N,X);xt(N,f),Cf(),xt(N,p),Gs(()=>{!N._isLeaving||(Ht(N,f),xt(N,g),Js(w)||Xs(N,r,R,j))}),Nt(w,[N,j])},onEnterCancelled(N){F(N,!1),Nt(v,[N])},onAppearCancelled(N){F(N,!0),Nt(k,[N])},onLeaveCancelled(N){U(N),Nt(T,[N])}})}function bf(e){if(e==null)return null;if(ge(e))return[Xr(e.enter),Xr(e.leave)];{const t=Xr(e);return[t,t]}}function Xr(e){return Wo(e)}function xt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Ht(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Gs(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let wf=0;function Xs(e,t,n,r){const o=e._endId=++wf,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=Ef(e,t);if(!i)return r();const u=i+"end";let c=0;const f=()=>{e.removeEventListener(u,p),s()},p=g=>{g.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},l+1),e.addEventListener(u,p)}function Ef(e,t){const n=window.getComputedStyle(e),r=_=>(n[_]||"").split(", "),o=r(Ct+"Delay"),s=r(Ct+"Duration"),i=Zs(o,s),l=r(Tn+"Delay"),a=r(Tn+"Duration"),u=Zs(l,a);let c=null,f=0,p=0;t===Ct?i>0&&(c=Ct,f=i,p=s.length):t===Tn?u>0&&(c=Tn,f=u,p=a.length):(f=Math.max(i,u),c=f>0?i>u?Ct:Tn:null,p=c?c===Ct?s.length:a.length:0);const g=c===Ct&&/\b(transform|all)(,|$)/.test(n[Ct+"Property"]);return{type:c,timeout:f,propCount:p,hasTransform:g}}function Zs(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>ei(n)+ei(e[r])))}function ei(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Cf(){return document.body.offsetHeight}const zl=Ae({patchProp:yf},nf);let Hn,ti=!1;function xf(){return Hn||(Hn=Hc(zl))}function Rf(){return Hn=ti?Hn:jc(zl),ti=!0,Hn}const Sf=(...e)=>{const t=xf().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Wl(r);if(!o)return;const s=t._component;!G(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t},kf=(...e)=>{const t=Rf().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Wl(r);if(o)return n(o,!0,o instanceof SVGElement)},t};function Wl(e){return Ee(e)?document.querySelector(e):e}const Pf=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Af=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Tf=/^["{[]|^-?[0-9][0-9.]{0,14}$/;function Of(e,t){if(!(e==="__proto__"||e==="constructor"))return t}function fs(e,t={}){if(typeof e!="string")return e;const n=e.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="null")return null;if(n==="nan")return NaN;if(n==="infinity")return 1/0;if(n!=="undefined"){if(!Tf.test(e)){if(t.strict)throw new SyntaxError("Invalid JSON");return e}try{return Pf.test(e)||Af.test(e)?JSON.parse(e,Of):JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}}const Lf=/#/g,Mf=/&/g,Df=/=/g,Ql=/\+/g,If=/%5B/gi,$f=/%5D/gi,Bf=/%5E/gi,Nf=/%60/gi,Hf=/%7B/gi,jf=/%7C/gi,Uf=/%7D/gi,Ff=/%20/gi;function qf(e){return encodeURI(""+e).replace(jf,"|").replace(If,"[").replace($f,"]")}function So(e){return qf(e).replace(Ql,"%2B").replace(Ff,"+").replace(Lf,"%23").replace(Mf,"%26").replace(Nf,"`").replace(Hf,"{").replace(Uf,"}").replace(Bf,"^")}function Zr(e){return So(e).replace(Df,"%3D")}function Yl(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Vf(e){return Yl(e.replace(Ql," "))}function Kf(e=""){const t={};e[0]==="?"&&(e=e.substr(1));for(const n of e.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const o=Yl(r[1]);if(o==="__proto__"||o==="constructor")continue;const s=Vf(r[2]||"");t[o]?Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]:t[o]=s}return t}function zf(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${Zr(e)}=${So(n)}`).join("&"):`${Zr(e)}=${So(t)}`:Zr(e)}function Wf(e){return Object.keys(e).map(t=>zf(t,e[t])).join("&")}const Qf=/^\w+:(\/\/)?/,Yf=/^\/\/[^/]+/;function Hr(e,t=!1){return Qf.test(e)||t&&Yf.test(e)}const Jf=/\/$|\/\?/;function ko(e="",t=!1){return t?Jf.test(e):e.endsWith("/")}function ds(e="",t=!1){if(!t)return(ko(e)?e.slice(0,-1):e)||"/";if(!ko(e,!0))return e||"/";const[n,...r]=e.split("?");return(n.slice(0,-1)||"/")+(r.length?`?${r.join("?")}`:"")}function Jl(e="",t=!1){if(!t)return e.endsWith("/")?e:e+"/";if(ko(e,!0))return e||"/";const[n,...r]=e.split("?");return n+"/"+(r.length?`?${r.join("?")}`:"")}function Gl(e=""){return e.startsWith("/")}function Gf(e=""){return(Gl(e)?e.substr(1):e)||"/"}function Xf(e=""){return Gl(e)?e:"/"+e}function Xl(e,t){if(Zl(t)||Hr(e))return e;const n=ds(t);return e.startsWith(n)?e:Xn(n,e)}function ni(e,t){if(Zl(t))return e;const n=ds(t);if(!e.startsWith(n))return e;const r=e.substring(n.length);return r[0]==="/"?r:"/"+r}function Zf(e,t){const n=jr(e),r={...Kf(n.search),...t};return n.search=Wf(r),td(n)}function Zl(e){return!e||e==="/"}function ed(e){return e&&e!=="/"}function Xn(e,...t){let n=e||"";for(const r of t.filter(ed))n=n?Jl(n)+Gf(r):r;return n}function jr(e="",t){if(!Hr(e,!0))return t?jr(t+e):ri(e);const[n="",r,o=""]=(e.replace(/\\/g,"/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/)||[]).splice(1),[s="",i=""]=(o.match(/([^/?#]*)(.*)?/)||[]).splice(1),{pathname:l,search:a,hash:u}=ri(i);return{protocol:n,auth:r?r.substr(0,r.length-1):"",host:s,pathname:l,search:a,hash:u}}function ri(e=""){const[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function td(e){const t=e.pathname+(e.search?(e.search.startsWith("?")?"":"?")+e.search:"")+e.hash;return e.protocol?e.protocol+"//"+(e.auth?e.auth+"@":"")+e.host+t:t}class nd extends Error{constructor(){super(...arguments),this.name="FetchError"}}function rd(e,t,n){let r="";e&&n&&(r=`${n.status} ${n.statusText} (${e.toString()})`),t&&(r=`${t.message} (${r})`);const o=new nd(r);return Object.defineProperty(o,"request",{get(){return e}}),Object.defineProperty(o,"response",{get(){return n}}),Object.defineProperty(o,"data",{get(){return n&&n._data}}),o}const od=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function oi(e="GET"){return od.has(e.toUpperCase())}function sd(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const id=new Set(["image/svg","application/xml","application/xhtml","application/html"]),ld=/^application\/(?:[\w!#$%&*`\-.^~]*\+)?json(;.+)?$/i;function ad(e=""){if(!e)return"json";const t=e.split(";").shift();return ld.test(t)?"json":id.has(t)||t.startsWith("text/")?"text":"blob"}const ud=new Set([408,409,425,429,500,502,503,504]);function ea(e){const{fetch:t,Headers:n}=e;function r(i){const l=i.error&&i.error.name==="AbortError"||!1;if(i.options.retry!==!1&&!l){const u=typeof i.options.retry=="number"?i.options.retry:oi(i.options.method)?0:1,c=i.response&&i.response.status||500;if(u>0&&ud.has(c))return o(i.request,{...i.options,retry:u-1})}const a=rd(i.request,i.error,i.response);throw Error.captureStackTrace&&Error.captureStackTrace(a,o),a}const o=async function(l,a={}){const u={request:l,options:{...e.defaults,...a},response:void 0,error:void 0};u.options.onRequest&&await u.options.onRequest(u),typeof u.request=="string"&&(u.options.baseURL&&(u.request=Xl(u.request,u.options.baseURL)),(u.options.query||u.options.params)&&(u.request=Zf(u.request,{...u.options.params,...u.options.query})),u.options.body&&oi(u.options.method)&&sd(u.options.body)&&(u.options.body=typeof u.options.body=="string"?u.options.body:JSON.stringify(u.options.body),u.options.headers=new n(u.options.headers),u.options.headers.has("content-type")||u.options.headers.set("content-type","application/json"),u.options.headers.has("accept")||u.options.headers.set("accept","application/json"))),u.response=await t(u.request,u.options).catch(async f=>(u.error=f,u.options.onRequestError&&await u.options.onRequestError(u),r(u)));const c=(u.options.parseResponse?"json":u.options.responseType)||ad(u.response.headers.get("content-type")||"");if(c==="json"){const f=await u.response.text(),p=u.options.parseResponse||fs;u.response._data=p(f)}else c==="stream"?u.response._data=u.response.body:u.response._data=await u.response[c]();return u.options.onResponse&&await u.options.onResponse(u),u.response.ok||u.options.onResponseError&&await u.options.onResponseError(u),u.response.ok?u.response:r(u)},s=function(l,a){return o(l,a).then(u=>u._data)};return s.raw=o,s.create=(i={})=>ea({...e,defaults:{...e.defaults,...i}}),s}const ta=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),cd=ta.fetch||(()=>Promise.reject(new Error("[ohmyfetch] global.fetch is not supported!"))),fd=ta.Headers,dd=ea({fetch:cd,Headers:fd}),pd=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},Er=pd().app,hd=()=>Er.baseURL,gd=()=>Er.buildAssetsDir,md=(...e)=>Xn(na(),gd(),...e),na=(...e)=>{const t=Er.cdnURL||Er.baseURL;return e.length?Xn(t,...e):t};globalThis.__buildAssetsURL=md,globalThis.__publicAssetsURL=na;function Po(e,t={},n){for(const r in e){const o=e[r],s=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?Po(o,t,s):typeof o=="function"&&(t[s]=o)}return t}function yd(e,t){return e.reduce((n,r)=>n.then(()=>r.apply(void 0,t)),Promise.resolve(null))}function _d(e,t){return Promise.all(e.map(n=>n.apply(void 0,t)))}function eo(e,t){for(const n of e)n(t)}class vd{constructor(){this._hooks={},this._before=null,this._after=null,this._deprecatedMessages=null,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let i=s.message;i||(i=`${o} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=null)}}hookOnce(t,n){let r,o=(...s)=>(r(),r=null,o=null,n(...s));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];this._hooks[t]=void 0;for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Po(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{r.splice(0,r.length).forEach(o=>o())}}removeHooks(t){const n=Po(t);for(const r in n)this.removeHook(r,n[r])}callHook(t,...n){return this.callHookWith(yd,t,...n)}callHookParallel(t,...n){return this.callHookWith(_d,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&eo(this._before,o);const s=t(this._hooks[n]||[],r);return s instanceof Promise?s.finally(()=>{this._after&&o&&eo(this._after,o)}):(this._after&&o&&eo(this._after,o),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}function bd(){return new vd}function wd(){let e=null,t=!1;const n=r=>{if(e&&e!==r)throw new Error("Context conflict")};return{use:()=>{if(e==null)throw new Error("Context is not available");return e},tryUse:()=>e,set:(r,o)=>{o||n(r),e=r,t=!0},unset:()=>{e=null,t=!1},call:(r,o)=>{n(r),e=r;try{return o()}finally{t||(e=null)}},async callAsync(r,o){e=r;const s=()=>{e=r},i=()=>e===r?s:void 0;Ao.add(i);try{const l=o();return t||(e=null),await l}finally{Ao.delete(i)}}}}function Ed(){const e={};return{get(t){return e[t]||(e[t]=wd()),e[t],e[t]}}}const Cr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},si="__unctx__",Cd=Cr[si]||(Cr[si]=Ed()),xd=e=>Cd.get(e),ii="__unctx_async_handlers__",Ao=Cr[ii]||(Cr[ii]=new Set);function ra(e){const t=[];for(const o of Ao){const s=o();s&&t.push(s)}const n=()=>{for(const o of t)o()};let r=e();return"catch"in r&&(r=r.catch(o=>{throw n(),o})),[r,n]}const oa=xd("nuxt-app"),Rd="__nuxt_plugin";function Sd(e){let t=0;const n={provide:void 0,globalName:"nuxt",payload:rt({data:{},state:{},_errors:{},...window.__NUXT__}),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};t++;let s=!1;return()=>{if(!s&&(s=!0,t--,t===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},...e};n.hooks=bd(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(s,i)=>{const l="$"+s;ar(n,l,i),ar(n.vueApp.config.globalProperties,l,i)},ar(n.vueApp,"$nuxt",n),ar(n.vueApp.config.globalProperties,"$nuxt",n);const r=rt(n.payload.config),o=new Proxy(r,{get(s,i){var l;return i==="public"?s.public:(l=s[i])!=null?l:s.public[i]},set(s,i,l){return i==="public"||i==="app"?!1:(s[i]=l,s.public[i]=l,!0)}});return n.provide("config",o),n}async function kd(e,t){if(typeof t!="function")return;const{provide:n}=await kt(e,t,[e])||{};if(n&&typeof n=="object")for(const r in n)e.provide(r,n[r])}async function Pd(e,t){for(const n of t)await kd(e,n)}function Ad(e){return e.map(n=>typeof n!="function"?null:n.length>1?r=>n(r,r.provide):n).filter(Boolean)}function It(e){return e[Rd]=!0,e}function kt(e,t,n){const r=()=>n?t(...n):t();return oa.set(e),r()}function xe(){const e=oa.tryUse();if(!e){const t=bt();if(!t)throw new Error("nuxt instance unavailable");return t.appContext.app.$nuxt}return e}function Sn(){return xe().$config}function ar(e,t,n){Object.defineProperty(e,t,{get:()=>n})}const Td=()=>null;function Od(...e){var f,p,g,_,C,R,y,h,v;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[n,r,o={}]=e;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof r!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");o.server=(f=o.server)!=null?f:!0,o.default=(p=o.default)!=null?p:Td,o.defer&&console.warn("[useAsyncData] `defer` has been renamed to `lazy`. Support for `defer` will be removed in RC."),o.lazy=(_=(g=o.lazy)!=null?g:o.defer)!=null?_:!1,o.initialCache=(C=o.initialCache)!=null?C:!0,o.immediate=(R=o.immediate)!=null?R:!0;const s=xe(),i=()=>(s.isHydrating||o.initialCache)&&s.payload.data[n]!==void 0;s._asyncData[n]||(s._asyncData[n]={data:Qe(i()?s.payload.data[n]:(h=(y=o.default)==null?void 0:y.call(o))!=null?h:null),pending:Qe(!i()),error:Qe((v=s.payload._errors[n])!=null?v:null)});const l={...s._asyncData[n]};l.refresh=l.execute=(w={})=>{if(s._asyncDataPromises[n]){if(w.dedupe===!1)return s._asyncDataPromises[n];s._asyncDataPromises[n].cancelled=!0}if(w._initial&&i())return s.payload.data[n];l.pending.value=!0;const T=new Promise((O,I)=>{try{O(r(s))}catch(k){I(k)}}).then(O=>{if(T.cancelled)return s._asyncDataPromises[n];o.transform&&(O=o.transform(O)),o.pick&&(O=Ld(O,o.pick)),l.data.value=O,l.error.value=null}).catch(O=>{var I,k;if(T.cancelled)return s._asyncDataPromises[n];l.error.value=O,l.data.value=we((k=(I=o.default)==null?void 0:I.call(o))!=null?k:null)}).finally(()=>{T.cancelled||(l.pending.value=!1,s.payload.data[n]=l.data.value,l.error.value&&(s.payload._errors[n]=!0),delete s._asyncDataPromises[n])});return s._asyncDataPromises[n]=T,s._asyncDataPromises[n]};const a=()=>l.refresh({_initial:!0}),u=o.server!==!1&&s.payload.serverRendered;{const w=bt();if(w&&!w._nuxtOnBeforeMountCbs){w._nuxtOnBeforeMountCbs=[];const O=w._nuxtOnBeforeMountCbs;w&&(Rl(()=>{O.forEach(I=>{I()}),O.splice(0,O.length)}),yr(()=>O.splice(0,O.length)))}u&&s.isHydrating&&n in s.payload.data?l.pending.value=!1:w&&(s.payload.serverRendered&&s.isHydrating||o.lazy)&&o.immediate?w._nuxtOnBeforeMountCbs.push(a):o.immediate&&a(),o.watch&&Ue(o.watch,()=>l.refresh());const T=s.hook("app:data:refresh",O=>{if(!O||O.includes(n))return l.refresh()});w&&yr(T)}const c=Promise.resolve(s._asyncDataPromises[n]).then(()=>l);return Object.assign(c,l),c}function _y(e){const t=e?Array.isArray(e)?e:[e]:void 0;return xe().callHook("app:data:refresh",t)}function Ld(e,t){const n={};for(const r of t)n[r]=e[r];return n}const Md=decodeURIComponent,Dd=encodeURIComponent,Id=/; */,ur=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function $d(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");let n={},r=t||{},o=e.split(Id),s=r.decode||Md;for(let i=0;i<o.length;i++){let l=o[i],a=l.indexOf("=");if(a<0)continue;let u=l.substr(0,a).trim(),c=l.substr(++a,l.length).trim();c[0]=='"'&&(c=c.slice(1,-1)),n[u]==null&&(n[u]=Bd(c,s))}return n}function li(e,t,n){let r=n||{},o=r.encode||Dd;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!ur.test(e))throw new TypeError("argument name is invalid");let s=o(t);if(s&&!ur.test(s))throw new TypeError("argument val is invalid");let i=e+"="+s;if(r.maxAge!=null){let l=r.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(r.domain){if(!ur.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!ur.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function Bd(e,t){try{return t(e)}catch{return e}}class To extends Error{constructor(){super(...arguments),this.statusCode=500,this.fatal=!1,this.unhandled=!1,this.statusMessage=void 0}}To.__h3_error__=!0;function Oo(e){var n;if(typeof e=="string")return new To(e);if(Nd(e))return e;const t=new To((n=e.message)!=null?n:e.statusMessage,e.cause?{cause:e.cause}:void 0);if("stack"in e)try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}return e.statusCode&&(t.statusCode=e.statusCode),e.statusMessage&&(t.statusMessage=e.statusMessage),e.data&&(t.data=e.data),e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function Nd(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.__h3_error__)===!0}const Ur=()=>ts(xe().payload,"error"),Dn=e=>{const t=sa(e);try{xe().callHook("app:error",t);const r=Ur();r.value=r.value||t}catch{throw t}return t},Hd=async(e={})=>{const t=xe(),n=Ur();t.callHook("app:error:cleared",e),e.redirect&&await t.$router.replace(e.redirect),n.value=null},jd=e=>!!(e&&typeof e=="object"&&"__nuxt_error"in e),sa=e=>{const t=Oo(e);return t.__nuxt_error=!0,t};function ia(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[n,r]=e;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const o="$s"+n,s=xe(),i=ts(s.payload.state,o);if(i.value===void 0&&r){const l=r();if(Se(l))return s.payload.state[o]=l,l;i.value=l}return i}const Jt=()=>{var e;return(e=xe())==null?void 0:e.$router},kn=()=>bt()?nt("_route",xe()._route):xe()._route,Ud=e=>e,Fd=()=>{try{if(xe()._processingMiddleware)return!0}catch{return!0}return!1},qd=(e,t)=>{e||(e="/");const n=typeof e=="string"?e:e.path||"/",r=Hr(n,!0);if(r&&!(t!=null&&t.external))throw new Error("Navigating to external URL is not allowed by default. Use `nagivateTo (url, { external: true })`.");if(r&&jr(n).protocol==="script:")throw new Error("Cannot navigate to an URL with script protocol.");if(!r&&Fd())return e;const o=Jt();return r?(t!=null&&t.replace?location.replace(n):location.href=n,Promise.resolve()):t!=null&&t.replace?o.replace(e):o.push(e)},Vd={ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1};function Kd(e,t={}){t={...Vd,...t};const n=la(t);return n.dispatch(e),n.toString()}function la(e){const t=[];let n=[];const r=o=>{t.push(o)};return{toString(){return t.join("")},getContext(){return n},dispatch(o){return e.replacer&&(o=e.replacer(o)),this["_"+(o===null?"null":typeof o)](o)},_object(o){const s=/\[object (.*)\]/i,i=Object.prototype.toString.call(o),l=s.exec(i),a=l?l[1].toLowerCase():"unknown:["+i.toLowerCase()+"]";let u=null;if((u=n.indexOf(o))>=0)return this.dispatch("[CIRCULAR:"+u+"]");if(n.push(o),typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(o))return r("buffer:"),r(o.toString("utf8"));if(a!=="object"&&a!=="function"&&a!=="asyncfunction")if(this["_"+a])this["_"+a](o);else{if(e.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}else{let c=Object.keys(o);return e.unorderedObjects&&(c=c.sort()),e.respectType!==!1&&!ai(o)&&c.splice(0,0,"prototype","__proto__","letructor"),e.excludeKeys&&(c=c.filter(function(f){return!e.excludeKeys(f)})),r("object:"+c.length+":"),c.forEach(f=>{this.dispatch(f),r(":"),e.excludeValues||this.dispatch(o[f]),r(",")})}},_array(o,s){if(s=typeof s<"u"?s:e.unorderedArrays!==!1,r("array:"+o.length+":"),!s||o.length<=1)return o.forEach(a=>this.dispatch(a));const i=[],l=o.map(a=>{const u=la(e);return u.dispatch(a),i.push(u.getContext()),u.toString()});return n=n.concat(i),l.sort(),this._array(l,!1)},_date(o){return r("date:"+o.toJSON())},_symbol(o){return r("symbol:"+o.toString())},_error(o){return r("error:"+o.toString())},_boolean(o){return r("bool:"+o.toString())},_string(o){r("string:"+o.length+":"),r(o.toString())},_function(o){r("fn:"),ai(o)?this.dispatch("[native]"):this.dispatch(o.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(o.name)),e.respectFunctionProperties&&this._object(o)},_number(o){return r("number:"+o.toString())},_xml(o){return r("xml:"+o.toString())},_null(){return r("Null")},_undefined(){return r("Undefined")},_regexp(o){return r("regex:"+o.toString())},_uint8array(o){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(o))},_uint8clampedarray(o){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(o))},_int8array(o){return r("int8array:"),this.dispatch(Array.prototype.slice.call(o))},_uint16array(o){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(o))},_int16array(o){return r("int16array:"),this.dispatch(Array.prototype.slice.call(o))},_uint32array(o){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(o))},_int32array(o){return r("int32array:"),this.dispatch(Array.prototype.slice.call(o))},_float32array(o){return r("float32array:"),this.dispatch(Array.prototype.slice.call(o))},_float64array(o){return r("float64array:"),this.dispatch(Array.prototype.slice.call(o))},_arraybuffer(o){return r("arraybuffer:"),this.dispatch(new Uint8Array(o))},_url(o){return r("url:"+o.toString())},_map(o){r("map:");const s=Array.from(o);return this._array(s,e.unorderedSets!==!1)},_set(o){r("set:");const s=Array.from(o);return this._array(s,e.unorderedSets!==!1)},_file(o){return r("file:"),this.dispatch([o.name,o.size,o.type,o.lastModfied])},_blob(){if(e.ignoreUnknown)return r("[blob]");throw new Error(`Hashing Blob objects is currently not supported
 Use "options.replacer" or "options.ignoreUnknown"
-`)},_domwindow(){return r("domwindow")},_bigint(o){return r("bigint:"+o.toString())},_process(){return r("process")},_timer(){return r("timer")},_pipe(){return r("pipe")},_tcp(){return r("tcp")},_udp(){return r("udp")},_tty(){return r("tty")},_statwatcher(){return r("statwatcher")},_securecontext(){return r("securecontext")},_connection(){return r("connection")},_zlib(){return r("zlib")},_context(){return r("context")},_nodescript(){return r("nodescript")},_httpparser(){return r("httpparser")},_dataview(){return r("dataview")},_signal(){return r("signal")},_fsevent(){return r("fsevent")},_tlswrap(){return r("tlswrap")}}}function ai(e){return typeof e!="function"?!1:/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))!=null}class yn{constructor(t,n){t=this.words=t||[],n!==void 0?this.sigBytes=n:this.sigBytes=t.length*4}toString(t){return(t||zd).stringify(this)}concat(t){if(this.clamp(),this.sigBytes%4)for(let n=0;n<t.sigBytes;n++){const r=t.words[n>>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n<t.sigBytes;n+=4)this.words[this.sigBytes+n>>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new yn(this.words.slice(0))}}const zd={stringify(e){const t=[];for(let n=0;n<e.sigBytes;n++){const r=e.words[n>>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16)),t.push((r&15).toString(16))}return t.join("")}},Wd={stringify(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[];for(let r=0;r<e.sigBytes;r+=3){const o=e.words[r>>>2]>>>24-r%4*8&255,s=e.words[r+1>>>2]>>>24-(r+1)%4*8&255,i=e.words[r+2>>>2]>>>24-(r+2)%4*8&255,l=o<<16|s<<8|i;for(let a=0;a<4&&r*8+a*6<e.sigBytes*8;a++)n.push(t.charAt(l>>>6*(3-a)&63))}return n.join("")}},Qd={parse(e){const t=e.length,n=[];for(let r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new yn(n,t)}},Yd={parse(e){return Qd.parse(unescape(encodeURIComponent(e)))}};class Jd{constructor(){this._minBufferSize=0,this.blockSize=512/32,this.reset()}reset(){this._data=new yn,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=Yd.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const o=r*this.blockSize,s=Math.min(o*4,this._data.sigBytes);if(o){for(let i=0;i<o;i+=this.blockSize)this._doProcessBlock(this._data.words,i);n=this._data.words.splice(0,o),this._data.sigBytes-=s}return new yn(n,s)}}class Gd extends Jd{update(t){return this._append(t),this._process(),this}finalize(t){t&&this._append(t)}}const Xd=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Zd=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],jt=[];class ep extends Gd{constructor(){super(),this.reset()}reset(){super.reset(),this._hash=new yn(Xd.slice(0))}_doProcessBlock(t,n){const r=this._hash.words;let o=r[0],s=r[1],i=r[2],l=r[3],a=r[4],u=r[5],c=r[6],f=r[7];for(let p=0;p<64;p++){if(p<16)jt[p]=t[n+p]|0;else{const v=jt[p-15],w=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,T=jt[p-2],O=(T<<15|T>>>17)^(T<<13|T>>>19)^T>>>10;jt[p]=w+jt[p-7]+O+jt[p-16]}const g=a&u^~a&c,_=o&s^o&i^s&i,C=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),R=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),y=f+R+g+Zd[p]+jt[p],h=C+_;f=c,c=u,u=a,a=l+y|0,l=i,i=s,s=o,o=y+h|0}r[0]=r[0]+o|0,r[1]=r[1]+s|0,r[2]=r[2]+i|0,r[3]=r[3]+l|0,r[4]=r[4]+a|0,r[5]=r[5]+u|0,r[6]=r[6]+c|0,r[7]=r[7]+f|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function tp(e){return new ep().finalize(e).toString(Wd)}function aa(e,t={}){const n=typeof e=="string"?e:Kd(e,t);return tp(n).substr(0,10)}const np={path:"/",decode:e=>fs(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))};function ua(e,t){var s,i;const n={...np,...t},r=rp(n)||{},o=Qe((i=r[e])!=null?i:(s=n.default)==null?void 0:s.call(n));return Ue(o,()=>{sp(e,o.value,n)}),o}function rp(e={}){return $d(document.cookie,e)}function op(e,t,n={}){return t==null?li(e,t,{...n,maxAge:-1}):li(e,t,n)}function sp(e,t,n={}){document.cookie=op(e,t,n)}async function ca(e,t=Jt()){if(t._routePreloaded||(t._routePreloaded=new Set),t._routePreloaded.has(e))return;t._routePreloaded.add(e);const n=t._preloadPromises||(t._preloadPromises=[]);if(n.length>4)return Promise.all(n).then(()=>ca(e,t));const r=t.resolve(e).matched.map(o=>{var s;return(s=o.components)==null?void 0:s.default}).filter(o=>typeof o=="function");for(const o of r){const s=Promise.resolve(o()).catch(()=>{}).finally(()=>n.splice(n.indexOf(s)));n.push(s)}await Promise.all(n)}const ip="modulepreload",lp=function(e,t){return new URL(e,t).href},ui={},J=function(t,n,r){return!n||n.length===0?t():Promise.all(n.map(o=>{if(o=lp(o,r),o in ui)return;ui[o]=!0;const s=o.endsWith(".css"),i=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${i}`))return;const l=document.createElement("link");if(l.rel=s?"stylesheet":ip,s||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),s)return new Promise((a,u)=>{l.addEventListener("load",a),l.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};function ci(e,t={}){const n=ap(e,t),r=xe(),o=r._payloadCache=r._payloadCache||{};return o[e]||(o[e]=up(n).then(s=>s||(delete o[e],null))),o[e]}function ap(e,t={}){const n=jr(e);if(n.search)throw new Error("Payload URL cannot contain search params: "+e);const r=t.hash||(t.fresh?Date.now():"");return Xn(Sn().app.baseURL,n.pathname,r?`_payload.${r}.js`:"_payload.js")}async function up(e){const t=await J(()=>import(e),[],import.meta.url).catch(n=>{console.warn("[nuxt] Cannot load payload ",e,n)});return(t==null?void 0:t.default)||null}function cp(){return!!xe().payload.prerenderedAt}const fp=(...e)=>e.find(t=>t!==void 0),dp="noopener noreferrer",pp=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),hp=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)});function fa(e){const t=e.componentName||"NuxtLink";return Me({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(n,{slots:r}){const o=Jt(),s=Re(()=>n.to||n.href||""),i=Re(()=>n.external||n.target&&n.target!=="_self"?!0:typeof s.value=="object"?!1:s.value===""||Hr(s.value,!0)),l=Qe(!1),a=Qe(null);if(n.prefetch!==!1&&n.noPrefetch!==!0&&typeof s.value=="string"&&n.target!=="_blank"&&!mp()){const c=xe(),f=gp();let p,g=null;Gn(()=>{p=pp(()=>{var _;(_=a==null?void 0:a.value)!=null&&_.tagName&&(g=f.observe(a.value,async()=>{g==null||g(),g=null,await Promise.all([c.hooks.callHook("link:prefetch",s.value).catch(()=>{}),!i.value&&ca(s.value,o).catch(()=>{})]),l.value=!0}))})}),Rn(()=>{p&&hp(p),g==null||g(),g=null})}return()=>{var g,_,C;if(!i.value)return _e(Ir("RouterLink"),{ref:R=>{a.value=R==null?void 0:R.$el},to:s.value,...l.value&&!n.custom?{class:n.prefetchedClass||e.prefetchedClass}:{},activeClass:n.activeClass||e.activeClass,exactActiveClass:n.exactActiveClass||e.exactActiveClass,replace:n.replace,ariaCurrentValue:n.ariaCurrentValue,custom:n.custom},r.default);const u=typeof s.value=="object"?(_=(g=o.resolve(s.value))==null?void 0:g.href)!=null?_:null:s.value||null,c=n.target||null,f=n.noRel?null:fp(n.rel,e.externalRelAttribute,u?dp:"")||null,p=()=>qd(u,{replace:n.replace});return n.custom?r.default?r.default({href:u,navigate:p,route:o.resolve(u),rel:f,target:c,isActive:!1,isExactActive:!1}):null:_e("a",{ref:a,href:u,rel:f,target:c},(C=r.default)==null?void 0:C.call(r))}}})}const da=fa({componentName:"NuxtLink"});function gp(){const e=xe();if(e._observer)return e._observer;let t=null;const n=new Map,r=(s,i)=>(t||(t=new IntersectionObserver(l=>{for(const a of l){const u=n.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&u&&u()}})),n.set(s,i),t.observe(s),()=>{n.delete(s),t.unobserve(s),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function mp(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}const vy=Object.freeze(Object.defineProperty({__proto__:null,defineNuxtLink:fa,default:da},Symbol.toStringTag,{value:"Module"}));function to(e){return e!==null&&typeof e=="object"}function Lo(e,t,n=".",r){if(!to(t))return Lo(e,{},n,r);const o=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const i=e[s];i!=null&&(r&&r(o,s,i,n)||(Array.isArray(i)&&Array.isArray(o[s])?o[s]=i.concat(o[s]):to(i)&&to(o[s])?o[s]=Lo(i,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=i))}return o}function yp(e){return(...t)=>t.reduce((n,r)=>Lo(n,r,"",e),{})}const _p=yp((e,t,n,r)=>{if(typeof e[t]<"u"&&typeof n=="function")return e[t]=n(e[t]),!0}),vp={};_p(vp);function pa(e){xe()._useHead(e)}const no={ProseA:re(()=>J(()=>import("./ProseA.989de2dc.js"),[],import.meta.url).then(e=>e.default||e)),ProseCode:re(()=>J(()=>import("./ProseCode.e3af85ab.js"),["ProseCode.e3af85ab.js","UiIconCopy.85420456.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"],import.meta.url).then(e=>e.default||e)),ContentDoc:re(()=>J(()=>Promise.resolve().then(()=>Ag),void 0,import.meta.url).then(e=>e.default||e)),ContentList:re(()=>J(()=>import("./ContentList.4822352c.js"),[],import.meta.url).then(e=>e.default||e)),ContentNavigation:re(()=>J(()=>import("./ContentNavigation.0dd1020e.js"),["ContentNavigation.0dd1020e.js","ContentNavigation.eba111bf.css","navigation.b4be76a2.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.4822352c.js","ContentSlot.1089f928.js","DocumentDrivenEmpty.5bf46e6a.js","DocumentDrivenNotFound.ef779f55.js","Markdown.b05e9d28.js"],import.meta.url).then(e=>e.default||e)),ContentQuery:re(()=>J(()=>Promise.resolve().then(()=>kg),void 0,import.meta.url).then(e=>e.default||e)),ContentRenderer:re(()=>J(()=>Promise.resolve().then(()=>vg),void 0,import.meta.url).then(e=>e.default||e)),ContentRendererMarkdown:re(()=>J(()=>Promise.resolve().then(()=>_g),void 0,import.meta.url).then(e=>e.default||e)),ContentSlot:re(()=>J(()=>import("./ContentSlot.1089f928.js"),[],import.meta.url).then(e=>e.default||e)),DocumentDrivenEmpty:re(()=>J(()=>import("./DocumentDrivenEmpty.5bf46e6a.js"),[],import.meta.url).then(e=>e.default||e)),DocumentDrivenNotFound:re(()=>J(()=>import("./DocumentDrivenNotFound.ef779f55.js"),[],import.meta.url).then(e=>e.default||e)),Markdown:re(()=>J(()=>import("./Markdown.b05e9d28.js"),["Markdown.b05e9d28.js","ContentSlot.1089f928.js"],import.meta.url).then(e=>e.default||e)),ProseBlockquote:re(()=>J(()=>import("./ProseBlockquote.934e49f9.js"),[],import.meta.url).then(e=>e.default||e)),ProseCodeInline:re(()=>J(()=>import("./ProseCodeInline.25efea15.js"),[],import.meta.url).then(e=>e.default||e)),ProseEm:re(()=>J(()=>import("./ProseEm.dcb566d5.js"),[],import.meta.url).then(e=>e.default||e)),ProseH1:re(()=>J(()=>import("./ProseH1.aae753c9.js"),[],import.meta.url).then(e=>e.default||e)),ProseH2:re(()=>J(()=>import("./ProseH2.e5674627.js"),[],import.meta.url).then(e=>e.default||e)),ProseH3:re(()=>J(()=>import("./ProseH3.ed0e0070.js"),[],import.meta.url).then(e=>e.default||e)),ProseH4:re(()=>J(()=>import("./ProseH4.8c1e2a49.js"),[],import.meta.url).then(e=>e.default||e)),ProseH5:re(()=>J(()=>import("./ProseH5.f46443f6.js"),[],import.meta.url).then(e=>e.default||e)),ProseH6:re(()=>J(()=>import("./ProseH6.1d12eb9f.js"),[],import.meta.url).then(e=>e.default||e)),ProseHr:re(()=>J(()=>import("./ProseHr.3c09cbb6.js"),[],import.meta.url).then(e=>e.default||e)),ProseImg:re(()=>J(()=>import("./ProseImg.f4223a04.js"),[],import.meta.url).then(e=>e.default||e)),ProseLi:re(()=>J(()=>import("./ProseLi.f5f48b70.js"),[],import.meta.url).then(e=>e.default||e)),ProseOl:re(()=>J(()=>import("./ProseOl.8ecd42ef.js"),[],import.meta.url).then(e=>e.default||e)),ProseP:re(()=>J(()=>import("./ProseP.1e37594f.js"),[],import.meta.url).then(e=>e.default||e)),ProseStrong:re(()=>J(()=>import("./ProseStrong.f3ca6279.js"),[],import.meta.url).then(e=>e.default||e)),ProseTable:re(()=>J(()=>import("./ProseTable.848e00bb.js"),[],import.meta.url).then(e=>e.default||e)),ProseTbody:re(()=>J(()=>import("./ProseTbody.52634c80.js"),[],import.meta.url).then(e=>e.default||e)),ProseTd:re(()=>J(()=>import("./ProseTd.340aed92.js"),[],import.meta.url).then(e=>e.default||e)),ProseTh:re(()=>J(()=>import("./ProseTh.898f7f75.js"),[],import.meta.url).then(e=>e.default||e)),ProseThead:re(()=>J(()=>import("./ProseThead.e6b0aae2.js"),[],import.meta.url).then(e=>e.default||e)),ProseTr:re(()=>J(()=>import("./ProseTr.c191348d.js"),[],import.meta.url).then(e=>e.default||e)),ProseUl:re(()=>J(()=>import("./ProseUl.7c14583d.js"),[],import.meta.url).then(e=>e.default||e))},bp=It(e=>{for(const t in no)e.vueApp.component(t,no[t]),e.vueApp.component("Lazy"+t,no[t])});var fi;const wp=typeof window<"u";wp&&((fi=window==null?void 0:window.navigator)==null?void 0:fi.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ep(e){return typeof e=="function"?e():we(e)}var Cp="usehead",di="head:count",ro="data-head-attrs",ha="data-meta-body",ps=(e,t)=>e.map(n=>(n.input&&(t||!n.resolved)&&(n.input=xr(n.input)),n)),xp=(e,t)=>{const n=r=>{var o;if((o=r.options)!=null&&o.renderPriority)return r.options.renderPriority;switch(r.tag){case"base":return-1;case"meta":return r.props.charset?-2:r.props["http-equiv"]==="content-security-policy"?0:10;default:return 10}};return n(e)-n(t)},Rp=e=>{const{props:t,tag:n,options:r}=e;if(n==="base"||n==="title"||n==="titleTemplate")return n;if(n==="link"&&t.rel==="canonical")return"canonical";if(t.charset)return"charset";if(r!=null&&r.key)return`${n}:${r.key}`;const o=["id"];n==="meta"&&o.push("name","property","http-equiv");for(const s of o)if(typeof t[s]<"u")return`${n}:${s}:${t[s]}`;return e.runtime.position};function xr(e){const t=Ep(e);return!e||!t?t:Array.isArray(t)?t.map(xr):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([n,r])=>n==="titleTemplate"?[n,we(r)]:[n,xr(r)])):t}var Sp=(e,t,n)=>{var r;t={...t};const o={tag:e,props:{},runtime:{entryId:n.id},options:{...n.options}};return["hid","vmid","key"].forEach(s=>{t[s]&&(o.options.key=t[s],delete t[s])}),["children","innerHTML","textContent"].forEach(s=>{typeof t[s]<"u"&&(o.children=t[s],delete t[s])}),["body","renderPriority"].forEach(s=>{typeof t[s]<"u"&&(o.options[s]=t[s],delete t[s])}),(r=o.options)!=null&&r.body&&(t[ha]=!0),o.props=t,o},kp=e=>Object.entries(e.input).filter(([,t])=>typeof t<"u").map(([t,n])=>(Array.isArray(n)?n:[n]).map(r=>{switch(t){case"title":case"titleTemplate":return{tag:t,children:r,props:{},runtime:{entryId:e.id},options:e.options};case"base":case"meta":case"link":case"style":case"script":case"noscript":case"htmlAttrs":case"bodyAttrs":return Sp(t,r,e);default:return!1}})).flat().filter(t=>!!t),pi=(e,t)=>e==null?t||null:typeof e=="function"?e(t):e.replace("%s",t!=null?t:""),ga=e=>{const t={};ps(e).forEach((i,l)=>{kp(i).forEach((u,c)=>{u.runtime=u.runtime||{},u.runtime.position=l*1e4+c,t[Rp(u)]=u})});let r=Object.values(t).sort((i,l)=>i.runtime.position-l.runtime.position).sort(xp);const o=r.findIndex(i=>i.tag==="titleTemplate"),s=r.findIndex(i=>i.tag==="title");if(s!==-1&&o!==-1){const i=pi(r[o].children,r[s].children);i!==null?r[s].children=i||r[s].children:r=r.filter((l,a)=>a!==s),r=r.filter((l,a)=>a!==o)}else if(o!==-1){const i=pi(r[o].children);i!==null?(r[o].children=i,r[o].tag="title"):r=r.filter((l,a)=>a!==o)}return r};function hi(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){const r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}var gi=(e,t)=>{const n=e.getAttribute(ro);if(n)for(const o of n.split(","))o in t||e.removeAttribute(o);const r=[];for(const o in t){const s=t[o];s!=null&&(s===!1?e.removeAttribute(o):e.setAttribute(o,s),r.push(o))}r.length?e.setAttribute(ro,r.join(",")):e.removeAttribute(ro)},Pp=(e,t)=>{var n;const r=t.createElement(e.tag);return Object.entries(e.props).forEach(([o,s])=>{s!==!1&&r.setAttribute(o,s===!0?"":String(s))}),e.children&&((n=e.options)!=null&&n.safe?e.tag!=="script"&&(r.textContent=e.children):r.innerHTML=e.children),r},Ap=(e=window.document,t,n)=>{var r,o;const s=e.head,i=e.body;let l=s.querySelector(`meta[name="${di}"]`);const a=i.querySelectorAll(`[${ha}]`),u=l?Number(l.getAttribute("content")):0,c=[],f=[];if(a)for(let g=0;g<a.length;g++)a[g]&&((r=a[g].tagName)==null?void 0:r.toLowerCase())===t&&f.push(a[g]);if(l)for(let g=0,_=l.previousElementSibling;g<u;g++,_=(_==null?void 0:_.previousElementSibling)||null)((o=_==null?void 0:_.tagName)==null?void 0:o.toLowerCase())===t&&c.push(_);else l=e.createElement("meta"),l.setAttribute("name",di),l.setAttribute("content","0"),s.append(l);let p=n.map(g=>{var C;var _;return{element:Pp(g,e),body:(C=(_=g.options)==null?void 0:_.body)!=null?C:!1}});p=p.filter(g=>{for(let _=0;_<c.length;_++){const C=c[_];if(hi(C,g.element))return c.splice(_,1),!1}for(let _=0;_<f.length;_++){const C=f[_];if(hi(C,g.element))return f.splice(_,1),!1}return!0}),f.forEach(g=>{var _;return(_=g.parentNode)==null?void 0:_.removeChild(g)}),c.forEach(g=>{var _;return(_=g.parentNode)==null?void 0:_.removeChild(g)}),p.forEach(g=>{g.body?i.insertAdjacentElement("beforeend",g.element):s.insertBefore(g.element,l)}),l.setAttribute("content",`${u-c.length+p.filter(g=>!g.body).length}`)},Tp=async(e,t,n)=>{var r,o;const s={};n||(n=window.document);for(const u in e.hooks["before:dom"])if(await e.hooks["before:dom"][u]()===!1)return;const i=ps(e.headEntries);for(const u in e.hooks["resolved:entries"])await e.hooks["resolved:entries"][u](i);const l=ga(i);for(const u in e.hooks["resolved:tags"])await e.hooks["resolved:tags"][u](l);for(const u of l)switch(u.tag){case"title":typeof u.children<"u"&&(n.title=u.children);break;case"base":case"meta":case"link":case"style":case"script":case"noscript":s[u.tag]=s[u.tag]||[],s[u.tag].push(u);break}gi(n.documentElement,((r=l.find(u=>u.tag==="htmlAttrs"))==null?void 0:r.props)||{}),gi(n.body,((o=l.find(u=>u.tag==="bodyAttrs"))==null?void 0:o.props)||{});const a=new Set([...Object.keys(s),...t]);for(const u of a)Ap(n,u,s[u]||[]);t.clear(),Object.keys(s).forEach(u=>t.add(u))},Op=typeof window<"u",Lp=e=>{let t=[],n=0;const r=new Set;let o=null;const s={install(i){i.config.globalProperties&&(i.config.globalProperties.$head=s),i.provide(Cp,s)},hooks:{"before:dom":[],"resolved:tags":[],"resolved:entries":[]},get headEntries(){return t},get headTags(){const i=ps(s.headEntries);return ga(i)},addHeadObjs(i,l){return s.addEntry(i,l)},addEntry(i,l={}){let a=!1;l!=null&&l.resolved&&(a=!0,delete l.resolved);const u={id:n++,options:l,resolved:a,input:i};return t.push(u),{remove(){t=t.filter(c=>c.id!==u.id)},update(c){t=t.map(f=>(f.id===u.id&&(f.input=c),f))}}},async updateDOM(i,l){const a=()=>(o=null,Tp(s,r,i));return l?a():o=o||new Promise(u=>xn(()=>u(a())))},addReactiveEntry(i,l={}){let a=null;const u=uc(()=>{const c=xr(i);a===null?a=s.addEntry(c,{...l,resolved:!0}):a.update(c),Op&&s.updateDOM()});return()=>{u(),a&&a.remove()}}};return e&&s.addEntry(e),s};const Mp={meta:[{name:"viewport",content:"width=device-width, initial-scale=1"},{charset:"utf-8"}],link:[],style:[],script:[],noscript:[]},Dp={name:"layout",mode:"out-in"},Ip={name:"page",mode:"out-in"},$p=!1,Bp=It(e=>{const t=Lp();t.addEntry(Mp,{resolved:!0}),e.vueApp.use(t);{let n=!0;t.hooks["before:dom"].push(()=>!n),e.hooks.hookOnce("app:mounted",()=>{n=!1,t.updateDOM(),Jt().beforeEach(()=>{n=!0}),Jt().afterEach(()=>{n&&(n=!1,t.updateDOM())})})}e._useHead=(n,r)=>{const o=t.addReactiveEntry(n,r);!bt()||Rn(()=>{o(),t.updateDOM()})}}),Np={created(){const e=bt();if(!e)return;const t=e.type;if(!t||!("head"in t))return;const n=xe(),r=typeof t.head=="function"?()=>t.head(n):t.head;pa(r)}},Hp=It(e=>{e.vueApp.mixin(Np)});/*!
+`)},_domwindow(){return r("domwindow")},_bigint(o){return r("bigint:"+o.toString())},_process(){return r("process")},_timer(){return r("timer")},_pipe(){return r("pipe")},_tcp(){return r("tcp")},_udp(){return r("udp")},_tty(){return r("tty")},_statwatcher(){return r("statwatcher")},_securecontext(){return r("securecontext")},_connection(){return r("connection")},_zlib(){return r("zlib")},_context(){return r("context")},_nodescript(){return r("nodescript")},_httpparser(){return r("httpparser")},_dataview(){return r("dataview")},_signal(){return r("signal")},_fsevent(){return r("fsevent")},_tlswrap(){return r("tlswrap")}}}function ai(e){return typeof e!="function"?!1:/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))!=null}class yn{constructor(t,n){t=this.words=t||[],n!==void 0?this.sigBytes=n:this.sigBytes=t.length*4}toString(t){return(t||zd).stringify(this)}concat(t){if(this.clamp(),this.sigBytes%4)for(let n=0;n<t.sigBytes;n++){const r=t.words[n>>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n<t.sigBytes;n+=4)this.words[this.sigBytes+n>>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new yn(this.words.slice(0))}}const zd={stringify(e){const t=[];for(let n=0;n<e.sigBytes;n++){const r=e.words[n>>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16)),t.push((r&15).toString(16))}return t.join("")}},Wd={stringify(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[];for(let r=0;r<e.sigBytes;r+=3){const o=e.words[r>>>2]>>>24-r%4*8&255,s=e.words[r+1>>>2]>>>24-(r+1)%4*8&255,i=e.words[r+2>>>2]>>>24-(r+2)%4*8&255,l=o<<16|s<<8|i;for(let a=0;a<4&&r*8+a*6<e.sigBytes*8;a++)n.push(t.charAt(l>>>6*(3-a)&63))}return n.join("")}},Qd={parse(e){const t=e.length,n=[];for(let r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new yn(n,t)}},Yd={parse(e){return Qd.parse(unescape(encodeURIComponent(e)))}};class Jd{constructor(){this._minBufferSize=0,this.blockSize=512/32,this.reset()}reset(){this._data=new yn,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=Yd.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const o=r*this.blockSize,s=Math.min(o*4,this._data.sigBytes);if(o){for(let i=0;i<o;i+=this.blockSize)this._doProcessBlock(this._data.words,i);n=this._data.words.splice(0,o),this._data.sigBytes-=s}return new yn(n,s)}}class Gd extends Jd{update(t){return this._append(t),this._process(),this}finalize(t){t&&this._append(t)}}const Xd=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Zd=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],jt=[];class ep extends Gd{constructor(){super(),this.reset()}reset(){super.reset(),this._hash=new yn(Xd.slice(0))}_doProcessBlock(t,n){const r=this._hash.words;let o=r[0],s=r[1],i=r[2],l=r[3],a=r[4],u=r[5],c=r[6],f=r[7];for(let p=0;p<64;p++){if(p<16)jt[p]=t[n+p]|0;else{const v=jt[p-15],w=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,T=jt[p-2],O=(T<<15|T>>>17)^(T<<13|T>>>19)^T>>>10;jt[p]=w+jt[p-7]+O+jt[p-16]}const g=a&u^~a&c,_=o&s^o&i^s&i,C=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),R=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),y=f+R+g+Zd[p]+jt[p],h=C+_;f=c,c=u,u=a,a=l+y|0,l=i,i=s,s=o,o=y+h|0}r[0]=r[0]+o|0,r[1]=r[1]+s|0,r[2]=r[2]+i|0,r[3]=r[3]+l|0,r[4]=r[4]+a|0,r[5]=r[5]+u|0,r[6]=r[6]+c|0,r[7]=r[7]+f|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function tp(e){return new ep().finalize(e).toString(Wd)}function aa(e,t={}){const n=typeof e=="string"?e:Kd(e,t);return tp(n).substr(0,10)}const np={path:"/",decode:e=>fs(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))};function ua(e,t){var s,i;const n={...np,...t},r=rp(n)||{},o=Qe((i=r[e])!=null?i:(s=n.default)==null?void 0:s.call(n));return Ue(o,()=>{sp(e,o.value,n)}),o}function rp(e={}){return $d(document.cookie,e)}function op(e,t,n={}){return t==null?li(e,t,{...n,maxAge:-1}):li(e,t,n)}function sp(e,t,n={}){document.cookie=op(e,t,n)}async function ca(e,t=Jt()){if(t._routePreloaded||(t._routePreloaded=new Set),t._routePreloaded.has(e))return;t._routePreloaded.add(e);const n=t._preloadPromises||(t._preloadPromises=[]);if(n.length>4)return Promise.all(n).then(()=>ca(e,t));const r=t.resolve(e).matched.map(o=>{var s;return(s=o.components)==null?void 0:s.default}).filter(o=>typeof o=="function");for(const o of r){const s=Promise.resolve(o()).catch(()=>{}).finally(()=>n.splice(n.indexOf(s)));n.push(s)}await Promise.all(n)}const ip="modulepreload",lp=function(e,t){return new URL(e,t).href},ui={},J=function(t,n,r){return!n||n.length===0?t():Promise.all(n.map(o=>{if(o=lp(o,r),o in ui)return;ui[o]=!0;const s=o.endsWith(".css"),i=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${i}`))return;const l=document.createElement("link");if(l.rel=s?"stylesheet":ip,s||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),s)return new Promise((a,u)=>{l.addEventListener("load",a),l.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};function ci(e,t={}){const n=ap(e,t),r=xe(),o=r._payloadCache=r._payloadCache||{};return o[e]||(o[e]=up(n).then(s=>s||(delete o[e],null))),o[e]}function ap(e,t={}){const n=jr(e);if(n.search)throw new Error("Payload URL cannot contain search params: "+e);const r=t.hash||(t.fresh?Date.now():"");return Xn(Sn().app.baseURL,n.pathname,r?`_payload.${r}.js`:"_payload.js")}async function up(e){const t=await J(()=>import(e),[],import.meta.url).catch(n=>{console.warn("[nuxt] Cannot load payload ",e,n)});return(t==null?void 0:t.default)||null}function cp(){return!!xe().payload.prerenderedAt}const fp=(...e)=>e.find(t=>t!==void 0),dp="noopener noreferrer",pp=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),hp=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)});function fa(e){const t=e.componentName||"NuxtLink";return Me({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(n,{slots:r}){const o=Jt(),s=Re(()=>n.to||n.href||""),i=Re(()=>n.external||n.target&&n.target!=="_self"?!0:typeof s.value=="object"?!1:s.value===""||Hr(s.value,!0)),l=Qe(!1),a=Qe(null);if(n.prefetch!==!1&&n.noPrefetch!==!0&&typeof s.value=="string"&&n.target!=="_blank"&&!mp()){const c=xe(),f=gp();let p,g=null;Gn(()=>{p=pp(()=>{var _;(_=a==null?void 0:a.value)!=null&&_.tagName&&(g=f.observe(a.value,async()=>{g==null||g(),g=null,await Promise.all([c.hooks.callHook("link:prefetch",s.value).catch(()=>{}),!i.value&&ca(s.value,o).catch(()=>{})]),l.value=!0}))})}),Rn(()=>{p&&hp(p),g==null||g(),g=null})}return()=>{var g,_,C;if(!i.value)return _e(Ir("RouterLink"),{ref:R=>{a.value=R==null?void 0:R.$el},to:s.value,...l.value&&!n.custom?{class:n.prefetchedClass||e.prefetchedClass}:{},activeClass:n.activeClass||e.activeClass,exactActiveClass:n.exactActiveClass||e.exactActiveClass,replace:n.replace,ariaCurrentValue:n.ariaCurrentValue,custom:n.custom},r.default);const u=typeof s.value=="object"?(_=(g=o.resolve(s.value))==null?void 0:g.href)!=null?_:null:s.value||null,c=n.target||null,f=n.noRel?null:fp(n.rel,e.externalRelAttribute,u?dp:"")||null,p=()=>qd(u,{replace:n.replace});return n.custom?r.default?r.default({href:u,navigate:p,route:o.resolve(u),rel:f,target:c,isActive:!1,isExactActive:!1}):null:_e("a",{ref:a,href:u,rel:f,target:c},(C=r.default)==null?void 0:C.call(r))}}})}const da=fa({componentName:"NuxtLink"});function gp(){const e=xe();if(e._observer)return e._observer;let t=null;const n=new Map,r=(s,i)=>(t||(t=new IntersectionObserver(l=>{for(const a of l){const u=n.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&u&&u()}})),n.set(s,i),t.observe(s),()=>{n.delete(s),t.unobserve(s),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function mp(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}const vy=Object.freeze(Object.defineProperty({__proto__:null,defineNuxtLink:fa,default:da},Symbol.toStringTag,{value:"Module"}));function to(e){return e!==null&&typeof e=="object"}function Lo(e,t,n=".",r){if(!to(t))return Lo(e,{},n,r);const o=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const i=e[s];i!=null&&(r&&r(o,s,i,n)||(Array.isArray(i)&&Array.isArray(o[s])?o[s]=i.concat(o[s]):to(i)&&to(o[s])?o[s]=Lo(i,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=i))}return o}function yp(e){return(...t)=>t.reduce((n,r)=>Lo(n,r,"",e),{})}const _p=yp((e,t,n,r)=>{if(typeof e[t]<"u"&&typeof n=="function")return e[t]=n(e[t]),!0}),vp={};_p(vp);function pa(e){xe()._useHead(e)}const no={ProseA:re(()=>J(()=>import("./ProseA.435cdbf8.js"),[],import.meta.url).then(e=>e.default||e)),ProseCode:re(()=>J(()=>import("./ProseCode.1f9853bd.js"),["ProseCode.1f9853bd.js","UiIconCopy.46b801d4.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"],import.meta.url).then(e=>e.default||e)),ContentDoc:re(()=>J(()=>Promise.resolve().then(()=>Ag),void 0,import.meta.url).then(e=>e.default||e)),ContentList:re(()=>J(()=>import("./ContentList.9cb0e4d7.js"),[],import.meta.url).then(e=>e.default||e)),ContentNavigation:re(()=>J(()=>import("./ContentNavigation.34b892d1.js"),["ContentNavigation.34b892d1.js","ContentNavigation.eba111bf.css","navigation.e6541d9a.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.9cb0e4d7.js","ContentSlot.7d84bf08.js","DocumentDrivenEmpty.a80465d8.js","DocumentDrivenNotFound.0314c024.js","Markdown.e057438e.js"],import.meta.url).then(e=>e.default||e)),ContentQuery:re(()=>J(()=>Promise.resolve().then(()=>kg),void 0,import.meta.url).then(e=>e.default||e)),ContentRenderer:re(()=>J(()=>Promise.resolve().then(()=>vg),void 0,import.meta.url).then(e=>e.default||e)),ContentRendererMarkdown:re(()=>J(()=>Promise.resolve().then(()=>_g),void 0,import.meta.url).then(e=>e.default||e)),ContentSlot:re(()=>J(()=>import("./ContentSlot.7d84bf08.js"),[],import.meta.url).then(e=>e.default||e)),DocumentDrivenEmpty:re(()=>J(()=>import("./DocumentDrivenEmpty.a80465d8.js"),[],import.meta.url).then(e=>e.default||e)),DocumentDrivenNotFound:re(()=>J(()=>import("./DocumentDrivenNotFound.0314c024.js"),[],import.meta.url).then(e=>e.default||e)),Markdown:re(()=>J(()=>import("./Markdown.e057438e.js"),["Markdown.e057438e.js","ContentSlot.7d84bf08.js"],import.meta.url).then(e=>e.default||e)),ProseBlockquote:re(()=>J(()=>import("./ProseBlockquote.caaa6911.js"),[],import.meta.url).then(e=>e.default||e)),ProseCodeInline:re(()=>J(()=>import("./ProseCodeInline.747a7c37.js"),[],import.meta.url).then(e=>e.default||e)),ProseEm:re(()=>J(()=>import("./ProseEm.0c0df6bc.js"),[],import.meta.url).then(e=>e.default||e)),ProseH1:re(()=>J(()=>import("./ProseH1.8c4f33f5.js"),[],import.meta.url).then(e=>e.default||e)),ProseH2:re(()=>J(()=>import("./ProseH2.83df4280.js"),[],import.meta.url).then(e=>e.default||e)),ProseH3:re(()=>J(()=>import("./ProseH3.af0f4af9.js"),[],import.meta.url).then(e=>e.default||e)),ProseH4:re(()=>J(()=>import("./ProseH4.44266402.js"),[],import.meta.url).then(e=>e.default||e)),ProseH5:re(()=>J(()=>import("./ProseH5.478a71ed.js"),[],import.meta.url).then(e=>e.default||e)),ProseH6:re(()=>J(()=>import("./ProseH6.b302c2bb.js"),[],import.meta.url).then(e=>e.default||e)),ProseHr:re(()=>J(()=>import("./ProseHr.ec7cc3d3.js"),[],import.meta.url).then(e=>e.default||e)),ProseImg:re(()=>J(()=>import("./ProseImg.fb70c53a.js"),[],import.meta.url).then(e=>e.default||e)),ProseLi:re(()=>J(()=>import("./ProseLi.94808e98.js"),[],import.meta.url).then(e=>e.default||e)),ProseOl:re(()=>J(()=>import("./ProseOl.79cf88eb.js"),[],import.meta.url).then(e=>e.default||e)),ProseP:re(()=>J(()=>import("./ProseP.6c5d1090.js"),[],import.meta.url).then(e=>e.default||e)),ProseStrong:re(()=>J(()=>import("./ProseStrong.e221982f.js"),[],import.meta.url).then(e=>e.default||e)),ProseTable:re(()=>J(()=>import("./ProseTable.38c46255.js"),[],import.meta.url).then(e=>e.default||e)),ProseTbody:re(()=>J(()=>import("./ProseTbody.19692760.js"),[],import.meta.url).then(e=>e.default||e)),ProseTd:re(()=>J(()=>import("./ProseTd.44b1749b.js"),[],import.meta.url).then(e=>e.default||e)),ProseTh:re(()=>J(()=>import("./ProseTh.25f9816d.js"),[],import.meta.url).then(e=>e.default||e)),ProseThead:re(()=>J(()=>import("./ProseThead.7e525844.js"),[],import.meta.url).then(e=>e.default||e)),ProseTr:re(()=>J(()=>import("./ProseTr.91c3a4e0.js"),[],import.meta.url).then(e=>e.default||e)),ProseUl:re(()=>J(()=>import("./ProseUl.85dc1033.js"),[],import.meta.url).then(e=>e.default||e))},bp=It(e=>{for(const t in no)e.vueApp.component(t,no[t]),e.vueApp.component("Lazy"+t,no[t])});var fi;const wp=typeof window<"u";wp&&((fi=window==null?void 0:window.navigator)==null?void 0:fi.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ep(e){return typeof e=="function"?e():we(e)}var Cp="usehead",di="head:count",ro="data-head-attrs",ha="data-meta-body",ps=(e,t)=>e.map(n=>(n.input&&(t||!n.resolved)&&(n.input=xr(n.input)),n)),xp=(e,t)=>{const n=r=>{var o;if((o=r.options)!=null&&o.renderPriority)return r.options.renderPriority;switch(r.tag){case"base":return-1;case"meta":return r.props.charset?-2:r.props["http-equiv"]==="content-security-policy"?0:10;default:return 10}};return n(e)-n(t)},Rp=e=>{const{props:t,tag:n,options:r}=e;if(n==="base"||n==="title"||n==="titleTemplate")return n;if(n==="link"&&t.rel==="canonical")return"canonical";if(t.charset)return"charset";if(r!=null&&r.key)return`${n}:${r.key}`;const o=["id"];n==="meta"&&o.push("name","property","http-equiv");for(const s of o)if(typeof t[s]<"u")return`${n}:${s}:${t[s]}`;return e.runtime.position};function xr(e){const t=Ep(e);return!e||!t?t:Array.isArray(t)?t.map(xr):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([n,r])=>n==="titleTemplate"?[n,we(r)]:[n,xr(r)])):t}var Sp=(e,t,n)=>{var r;t={...t};const o={tag:e,props:{},runtime:{entryId:n.id},options:{...n.options}};return["hid","vmid","key"].forEach(s=>{t[s]&&(o.options.key=t[s],delete t[s])}),["children","innerHTML","textContent"].forEach(s=>{typeof t[s]<"u"&&(o.children=t[s],delete t[s])}),["body","renderPriority"].forEach(s=>{typeof t[s]<"u"&&(o.options[s]=t[s],delete t[s])}),(r=o.options)!=null&&r.body&&(t[ha]=!0),o.props=t,o},kp=e=>Object.entries(e.input).filter(([,t])=>typeof t<"u").map(([t,n])=>(Array.isArray(n)?n:[n]).map(r=>{switch(t){case"title":case"titleTemplate":return{tag:t,children:r,props:{},runtime:{entryId:e.id},options:e.options};case"base":case"meta":case"link":case"style":case"script":case"noscript":case"htmlAttrs":case"bodyAttrs":return Sp(t,r,e);default:return!1}})).flat().filter(t=>!!t),pi=(e,t)=>e==null?t||null:typeof e=="function"?e(t):e.replace("%s",t!=null?t:""),ga=e=>{const t={};ps(e).forEach((i,l)=>{kp(i).forEach((u,c)=>{u.runtime=u.runtime||{},u.runtime.position=l*1e4+c,t[Rp(u)]=u})});let r=Object.values(t).sort((i,l)=>i.runtime.position-l.runtime.position).sort(xp);const o=r.findIndex(i=>i.tag==="titleTemplate"),s=r.findIndex(i=>i.tag==="title");if(s!==-1&&o!==-1){const i=pi(r[o].children,r[s].children);i!==null?r[s].children=i||r[s].children:r=r.filter((l,a)=>a!==s),r=r.filter((l,a)=>a!==o)}else if(o!==-1){const i=pi(r[o].children);i!==null?(r[o].children=i,r[o].tag="title"):r=r.filter((l,a)=>a!==o)}return r};function hi(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){const r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}var gi=(e,t)=>{const n=e.getAttribute(ro);if(n)for(const o of n.split(","))o in t||e.removeAttribute(o);const r=[];for(const o in t){const s=t[o];s!=null&&(s===!1?e.removeAttribute(o):e.setAttribute(o,s),r.push(o))}r.length?e.setAttribute(ro,r.join(",")):e.removeAttribute(ro)},Pp=(e,t)=>{var n;const r=t.createElement(e.tag);return Object.entries(e.props).forEach(([o,s])=>{s!==!1&&r.setAttribute(o,s===!0?"":String(s))}),e.children&&((n=e.options)!=null&&n.safe?e.tag!=="script"&&(r.textContent=e.children):r.innerHTML=e.children),r},Ap=(e=window.document,t,n)=>{var r,o;const s=e.head,i=e.body;let l=s.querySelector(`meta[name="${di}"]`);const a=i.querySelectorAll(`[${ha}]`),u=l?Number(l.getAttribute("content")):0,c=[],f=[];if(a)for(let g=0;g<a.length;g++)a[g]&&((r=a[g].tagName)==null?void 0:r.toLowerCase())===t&&f.push(a[g]);if(l)for(let g=0,_=l.previousElementSibling;g<u;g++,_=(_==null?void 0:_.previousElementSibling)||null)((o=_==null?void 0:_.tagName)==null?void 0:o.toLowerCase())===t&&c.push(_);else l=e.createElement("meta"),l.setAttribute("name",di),l.setAttribute("content","0"),s.append(l);let p=n.map(g=>{var C;var _;return{element:Pp(g,e),body:(C=(_=g.options)==null?void 0:_.body)!=null?C:!1}});p=p.filter(g=>{for(let _=0;_<c.length;_++){const C=c[_];if(hi(C,g.element))return c.splice(_,1),!1}for(let _=0;_<f.length;_++){const C=f[_];if(hi(C,g.element))return f.splice(_,1),!1}return!0}),f.forEach(g=>{var _;return(_=g.parentNode)==null?void 0:_.removeChild(g)}),c.forEach(g=>{var _;return(_=g.parentNode)==null?void 0:_.removeChild(g)}),p.forEach(g=>{g.body?i.insertAdjacentElement("beforeend",g.element):s.insertBefore(g.element,l)}),l.setAttribute("content",`${u-c.length+p.filter(g=>!g.body).length}`)},Tp=async(e,t,n)=>{var r,o;const s={};n||(n=window.document);for(const u in e.hooks["before:dom"])if(await e.hooks["before:dom"][u]()===!1)return;const i=ps(e.headEntries);for(const u in e.hooks["resolved:entries"])await e.hooks["resolved:entries"][u](i);const l=ga(i);for(const u in e.hooks["resolved:tags"])await e.hooks["resolved:tags"][u](l);for(const u of l)switch(u.tag){case"title":typeof u.children<"u"&&(n.title=u.children);break;case"base":case"meta":case"link":case"style":case"script":case"noscript":s[u.tag]=s[u.tag]||[],s[u.tag].push(u);break}gi(n.documentElement,((r=l.find(u=>u.tag==="htmlAttrs"))==null?void 0:r.props)||{}),gi(n.body,((o=l.find(u=>u.tag==="bodyAttrs"))==null?void 0:o.props)||{});const a=new Set([...Object.keys(s),...t]);for(const u of a)Ap(n,u,s[u]||[]);t.clear(),Object.keys(s).forEach(u=>t.add(u))},Op=typeof window<"u",Lp=e=>{let t=[],n=0;const r=new Set;let o=null;const s={install(i){i.config.globalProperties&&(i.config.globalProperties.$head=s),i.provide(Cp,s)},hooks:{"before:dom":[],"resolved:tags":[],"resolved:entries":[]},get headEntries(){return t},get headTags(){const i=ps(s.headEntries);return ga(i)},addHeadObjs(i,l){return s.addEntry(i,l)},addEntry(i,l={}){let a=!1;l!=null&&l.resolved&&(a=!0,delete l.resolved);const u={id:n++,options:l,resolved:a,input:i};return t.push(u),{remove(){t=t.filter(c=>c.id!==u.id)},update(c){t=t.map(f=>(f.id===u.id&&(f.input=c),f))}}},async updateDOM(i,l){const a=()=>(o=null,Tp(s,r,i));return l?a():o=o||new Promise(u=>xn(()=>u(a())))},addReactiveEntry(i,l={}){let a=null;const u=uc(()=>{const c=xr(i);a===null?a=s.addEntry(c,{...l,resolved:!0}):a.update(c),Op&&s.updateDOM()});return()=>{u(),a&&a.remove()}}};return e&&s.addEntry(e),s};const Mp={meta:[{name:"viewport",content:"width=device-width, initial-scale=1"},{charset:"utf-8"}],link:[],style:[],script:[],noscript:[]},Dp={name:"layout",mode:"out-in"},Ip={name:"page",mode:"out-in"},$p=!1,Bp=It(e=>{const t=Lp();t.addEntry(Mp,{resolved:!0}),e.vueApp.use(t);{let n=!0;t.hooks["before:dom"].push(()=>!n),e.hooks.hookOnce("app:mounted",()=>{n=!1,t.updateDOM(),Jt().beforeEach(()=>{n=!0}),Jt().afterEach(()=>{n&&(n=!1,t.updateDOM())})})}e._useHead=(n,r)=>{const o=t.addReactiveEntry(n,r);!bt()||Rn(()=>{o(),t.updateDOM()})}}),Np={created(){const e=bt();if(!e)return;const t=e.type;if(!t||!("head"in t))return;const n=xe(),r=typeof t.head=="function"?()=>t.head(n):t.head;pa(r)}},Hp=It(e=>{e.vueApp.mixin(Np)});/*!
   * vue-router v4.1.5
   * (c) 2022 Eduardo San Martin Morote
   * @license MIT
-  */const nn=typeof window<"u";function jp(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ae=Object.assign;function oo(e,t){const n={};for(const r in t){const o=t[r];n[r]=ot(o)?o.map(e):e(o)}return n}const jn=()=>{},ot=Array.isArray,Up=/\/$/,Fp=e=>e.replace(Up,"");function so(e,t,n="/"){let r,o={},s="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return l<a&&l>=0&&(a=-1),a>-1&&(r=t.slice(0,a),s=t.slice(a+1,l>-1?l:t.length),o=e(s)),l>-1&&(r=r||t.slice(0,l),i=t.slice(l,t.length)),r=zp(r!=null?r:t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:i}}function qp(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function mi(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Vp(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&_n(t.matched[r],n.matched[o])&&ma(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function _n(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ma(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Kp(e[n],t[n]))return!1;return!0}function Kp(e,t){return ot(e)?yi(e,t):ot(t)?yi(t,e):e===t}function yi(e,t){return ot(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function zp(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o=n.length-1,s,i;for(s=0;s<r.length;s++)if(i=r[s],i!==".")if(i==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(s-(s===r.length?1:0)).join("/")}var Qn;(function(e){e.pop="pop",e.push="push"})(Qn||(Qn={}));var Un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Un||(Un={}));function Wp(e){if(!e)if(nn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Fp(e)}const Qp=/^[^#]+#/;function Yp(e,t){return e.replace(Qp,"#")+t}function Jp(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Fr=()=>({left:window.pageXOffset,top:window.pageYOffset});function Gp(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Jp(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function _i(e,t){return(history.state?history.state.position-t:-1)+e}const Mo=new Map;function Xp(e,t){Mo.set(e,t)}function Zp(e){const t=Mo.get(e);return Mo.delete(e),t}let eh=()=>location.protocol+"//"+location.host;function ya(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let l=o.includes(e.slice(s))?e.slice(s).length:1,a=o.slice(l);return a[0]!=="/"&&(a="/"+a),mi(a,"")}return mi(n,e)+r+o}function th(e,t,n,r){let o=[],s=[],i=null;const l=({state:p})=>{const g=ya(e,location),_=n.value,C=t.value;let R=0;if(p){if(n.value=g,t.value=p,i&&i===_){i=null;return}R=C?p.position-C.position:0}else r(g);o.forEach(y=>{y(n.value,_,{delta:R,type:Qn.pop,direction:R?R>0?Un.forward:Un.back:Un.unknown})})};function a(){i=n.value}function u(p){o.push(p);const g=()=>{const _=o.indexOf(p);_>-1&&o.splice(_,1)};return s.push(g),g}function c(){const{history:p}=window;!p.state||p.replaceState(ae({},p.state,{scroll:Fr()}),"")}function f(){for(const p of s)p();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c),{pauseListeners:a,listen:u,destroy:f}}function vi(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Fr():null}}function nh(e){const{history:t,location:n}=window,r={value:ya(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(a,u,c){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:eh()+e+a;try{t[c?"replaceState":"pushState"](u,"",p),o.value=u}catch(g){console.error(g),n[c?"replace":"assign"](p)}}function i(a,u){const c=ae({},t.state,vi(o.value.back,a,o.value.forward,!0),u,{position:o.value.position});s(a,c,!0),r.value=a}function l(a,u){const c=ae({},o.value,t.state,{forward:a,scroll:Fr()});s(c.current,c,!0);const f=ae({},vi(r.value,a,null),{position:c.position+1},u);s(a,f,!1),r.value=a}return{location:r,state:o,push:l,replace:i}}function _a(e){e=Wp(e);const t=nh(e),n=th(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=ae({location:"",base:e,go:r,createHref:Yp.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function rh(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),_a(e)}function oh(e){return typeof e=="string"||e&&typeof e=="object"}function va(e){return typeof e=="string"||typeof e=="symbol"}const Rt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ba=Symbol("");var bi;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(bi||(bi={}));function vn(e,t){return ae(new Error,{type:e,[ba]:!0},t)}function ft(e,t){return e instanceof Error&&ba in e&&(t==null||!!(e.type&t))}const wi="[^/]+?",sh={sensitive:!1,strict:!1,start:!0,end:!0},ih=/[.+*?^${}()[\]/\\]/g;function lh(e,t){const n=ae({},sh,t),r=[];let o=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(o+="/");for(let f=0;f<u.length;f++){const p=u[f];let g=40+(n.sensitive?.25:0);if(p.type===0)f||(o+="/"),o+=p.value.replace(ih,"\\$&"),g+=40;else if(p.type===1){const{value:_,repeatable:C,optional:R,regexp:y}=p;s.push({name:_,repeatable:C,optional:R});const h=y||wi;if(h!==wi){g+=10;try{new RegExp(`(${h})`)}catch(w){throw new Error(`Invalid custom RegExp for param "${_}" (${h}): `+w.message)}}let v=C?`((?:${h})(?:/(?:${h}))*)`:`(${h})`;f||(v=R&&u.length<2?`(?:/${v})`:"/"+v),R&&(v+="?"),o+=v,g+=20,R&&(g+=-8),C&&(g+=-20),h===".*"&&(g+=-50)}c.push(g)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(u){const c=u.match(i),f={};if(!c)return null;for(let p=1;p<c.length;p++){const g=c[p]||"",_=s[p-1];f[_.name]=g&&_.repeatable?g.split("/"):g}return f}function a(u){let c="",f=!1;for(const p of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const g of p)if(g.type===0)c+=g.value;else if(g.type===1){const{value:_,repeatable:C,optional:R}=g,y=_ in u?u[_]:"";if(ot(y)&&!C)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const h=ot(y)?y.join("/"):y;if(!h)if(R)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${_}"`);c+=h}}return c||"/"}return{re:i,score:r,keys:s,parse:l,stringify:a}}function ah(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function uh(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const s=ah(r[n],o[n]);if(s)return s;n++}if(Math.abs(o.length-r.length)===1){if(Ei(r))return 1;if(Ei(o))return-1}return o.length-r.length}function Ei(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ch={type:0,value:""},fh=/[a-zA-Z0-9_]/;function dh(e){if(!e)return[[]];if(e==="/")return[[ch]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let l=0,a,u="",c="";function f(){!u||(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:a==="/"?(u&&f(),i()):a===":"?(f(),n=1):p();break;case 4:p(),n=r;break;case 1:a==="("?n=2:fh.test(a)?p():(f(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=3:c+=a;break;case 3:f(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),f(),i(),o}function ph(e,t,n){const r=lh(dh(e.path),n),o=ae(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function hh(e,t){const n=[],r=new Map;t=Ri({strict:!1,end:!0,sensitive:!1},t);function o(c){return r.get(c)}function s(c,f,p){const g=!p,_=gh(c);_.aliasOf=p&&p.record;const C=Ri(t,c),R=[_];if("alias"in c){const v=typeof c.alias=="string"?[c.alias]:c.alias;for(const w of v)R.push(ae({},_,{components:p?p.record.components:_.components,path:w,aliasOf:p?p.record:_}))}let y,h;for(const v of R){const{path:w}=v;if(f&&w[0]!=="/"){const T=f.record.path,O=T[T.length-1]==="/"?"":"/";v.path=f.record.path+(w&&O+w)}if(y=ph(v,f,C),p?p.alias.push(y):(h=h||y,h!==y&&h.alias.push(y),g&&c.name&&!xi(y)&&i(c.name)),_.children){const T=_.children;for(let O=0;O<T.length;O++)s(T[O],y,p&&p.children[O])}p=p||y,a(y)}return h?()=>{i(h)}:jn}function i(c){if(va(c)){const f=r.get(c);f&&(r.delete(c),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(c);f>-1&&(n.splice(f,1),c.record.name&&r.delete(c.record.name),c.children.forEach(i),c.alias.forEach(i))}}function l(){return n}function a(c){let f=0;for(;f<n.length&&uh(c,n[f])>=0&&(c.record.path!==n[f].record.path||!wa(c,n[f]));)f++;n.splice(f,0,c),c.record.name&&!xi(c)&&r.set(c.record.name,c)}function u(c,f){let p,g={},_,C;if("name"in c&&c.name){if(p=r.get(c.name),!p)throw vn(1,{location:c});C=p.record.name,g=ae(Ci(f.params,p.keys.filter(h=>!h.optional).map(h=>h.name)),c.params&&Ci(c.params,p.keys.map(h=>h.name))),_=p.stringify(g)}else if("path"in c)_=c.path,p=n.find(h=>h.re.test(_)),p&&(g=p.parse(_),C=p.record.name);else{if(p=f.name?r.get(f.name):n.find(h=>h.re.test(f.path)),!p)throw vn(1,{location:c,currentLocation:f});C=p.record.name,g=ae({},f.params,c.params),_=p.stringify(g)}const R=[];let y=p;for(;y;)R.unshift(y.record),y=y.parent;return{name:C,path:_,params:g,matched:R,meta:yh(R)}}return e.forEach(c=>s(c)),{addRoute:s,resolve:u,removeRoute:i,getRoutes:l,getRecordMatcher:o}}function Ci(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function gh(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:mh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function mh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function xi(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yh(e){return e.reduce((t,n)=>ae(t,n.meta),{})}function Ri(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function wa(e,t){return t.children.some(n=>n===e||wa(e,n))}const Ea=/#/g,_h=/&/g,vh=/\//g,bh=/=/g,wh=/\?/g,Ca=/\+/g,Eh=/%5B/g,Ch=/%5D/g,xa=/%5E/g,xh=/%60/g,Ra=/%7B/g,Rh=/%7C/g,Sa=/%7D/g,Sh=/%20/g;function hs(e){return encodeURI(""+e).replace(Rh,"|").replace(Eh,"[").replace(Ch,"]")}function kh(e){return hs(e).replace(Ra,"{").replace(Sa,"}").replace(xa,"^")}function Do(e){return hs(e).replace(Ca,"%2B").replace(Sh,"+").replace(Ea,"%23").replace(_h,"%26").replace(xh,"`").replace(Ra,"{").replace(Sa,"}").replace(xa,"^")}function Ph(e){return Do(e).replace(bh,"%3D")}function Ah(e){return hs(e).replace(Ea,"%23").replace(wh,"%3F")}function Th(e){return e==null?"":Ah(e).replace(vh,"%2F")}function Rr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Oh(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(Ca," "),i=s.indexOf("="),l=Rr(i<0?s:s.slice(0,i)),a=i<0?null:Rr(s.slice(i+1));if(l in t){let u=t[l];ot(u)||(u=t[l]=[u]),u.push(a)}else t[l]=a}return t}function Si(e){let t="";for(let n in e){const r=e[n];if(n=Ph(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(ot(r)?r.map(s=>s&&Do(s)):[r&&Do(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Lh(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=ot(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Mh=Symbol(""),ki=Symbol(""),gs=Symbol(""),ms=Symbol(""),Io=Symbol("");function On(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Pt(e,t,n,r,o){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((i,l)=>{const a=f=>{f===!1?l(vn(4,{from:n,to:t})):f instanceof Error?l(f):oh(f)?l(vn(2,{from:t,to:f})):(s&&r.enterCallbacks[o]===s&&typeof f=="function"&&s.push(f),i())},u=e.call(r&&r.instances[o],t,n,a);let c=Promise.resolve(u);e.length<3&&(c=c.then(a)),c.catch(f=>l(f))})}function io(e,t,n,r){const o=[];for(const s of e)for(const i in s.components){let l=s.components[i];if(!(t!=="beforeRouteEnter"&&!s.instances[i]))if(Dh(l)){const u=(l.__vccOpts||l)[t];u&&o.push(Pt(u,n,r,s,i))}else{let a=l();o.push(()=>a.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${s.path}"`));const c=jp(u)?u.default:u;s.components[i]=c;const p=(c.__vccOpts||c)[t];return p&&Pt(p,n,r,s,i)()}))}}return o}function Dh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Pi(e){const t=nt(gs),n=nt(ms),r=Re(()=>t.resolve(we(e.to))),o=Re(()=>{const{matched:a}=r.value,{length:u}=a,c=a[u-1],f=n.matched;if(!c||!f.length)return-1;const p=f.findIndex(_n.bind(null,c));if(p>-1)return p;const g=Ai(a[u-2]);return u>1&&Ai(c)===g&&f[f.length-1].path!==g?f.findIndex(_n.bind(null,a[u-2])):p}),s=Re(()=>o.value>-1&&Nh(n.params,r.value.params)),i=Re(()=>o.value>-1&&o.value===n.matched.length-1&&ma(n.params,r.value.params));function l(a={}){return Bh(a)?t[we(e.replace)?"replace":"push"](we(e.to)).catch(jn):Promise.resolve()}return{route:r,href:Re(()=>r.value.href),isActive:s,isExactActive:i,navigate:l}}const Ih=Me({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Pi,setup(e,{slots:t}){const n=rt(Pi(e)),{options:r}=nt(gs),o=Re(()=>({[Ti(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ti(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:_e("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),$h=Ih;function Bh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Nh(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!ot(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function Ai(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ti=(e,t,n)=>e!=null?e:t!=null?t:n,Hh=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=nt(Io),o=Re(()=>e.route||r.value),s=nt(ki,0),i=Re(()=>{let u=we(s);const{matched:c}=o.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),l=Re(()=>o.value.matched[i.value]);cn(ki,Re(()=>i.value+1)),cn(Mh,l),cn(Io,o);const a=Qe();return Ue(()=>[a.value,l.value,e.name],([u,c,f],[p,g,_])=>{c&&(c.instances[f]=u,g&&g!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=g.leaveGuards),c.updateGuards.size||(c.updateGuards=g.updateGuards))),u&&c&&(!g||!_n(c,g)||!p)&&(c.enterCallbacks[f]||[]).forEach(C=>C(u))},{flush:"post"}),()=>{const u=o.value,c=e.name,f=l.value,p=f&&f.components[c];if(!p)return Oi(n.default,{Component:p,route:u});const g=f.props[c],_=g?g===!0?u.params:typeof g=="function"?g(u):g:null,R=_e(p,ae({},_,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(f.instances[c]=null)},ref:a}));return Oi(n.default,{Component:R,route:u})||R}}});function Oi(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ka=Hh;function jh(e){const t=hh(e.routes,e),n=e.parseQuery||Oh,r=e.stringifyQuery||Si,o=e.history,s=On(),i=On(),l=On(),a=go(Rt);let u=Rt;nn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=oo.bind(null,x=>""+x),f=oo.bind(null,Th),p=oo.bind(null,Rr);function g(x,H){let $,V;return va(x)?($=t.getRecordMatcher(x),V=H):V=x,t.addRoute(V,$)}function _(x){const H=t.getRecordMatcher(x);H&&t.removeRoute(H)}function C(){return t.getRoutes().map(x=>x.record)}function R(x){return!!t.getRecordMatcher(x)}function y(x,H){if(H=ae({},H||a.value),typeof x=="string"){const d=so(n,x,H.path),m=t.resolve({path:d.path},H),b=o.createHref(d.fullPath);return ae(d,m,{params:p(m.params),hash:Rr(d.hash),redirectedFrom:void 0,href:b})}let $;if("path"in x)$=ae({},x,{path:so(n,x.path,H.path).path});else{const d=ae({},x.params);for(const m in d)d[m]==null&&delete d[m];$=ae({},x,{params:f(x.params)}),H.params=f(H.params)}const V=t.resolve($,H),ie=x.hash||"";V.params=c(p(V.params));const ye=qp(r,ae({},x,{hash:kh(ie),path:V.path})),ee=o.createHref(ye);return ae({fullPath:ye,hash:ie,query:r===Si?Lh(x.query):x.query||{}},V,{redirectedFrom:void 0,href:ee})}function h(x){return typeof x=="string"?so(n,x,a.value.path):ae({},x)}function v(x,H){if(u!==x)return vn(8,{from:H,to:x})}function w(x){return I(x)}function T(x){return w(ae(h(x),{replace:!0}))}function O(x){const H=x.matched[x.matched.length-1];if(H&&H.redirect){const{redirect:$}=H;let V=typeof $=="function"?$(x):$;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=h(V):{path:V},V.params={}),ae({query:x.query,hash:x.hash,params:"path"in V?{}:x.params},V)}}function I(x,H){const $=u=y(x),V=a.value,ie=x.state,ye=x.force,ee=x.replace===!0,d=O($);if(d)return I(ae(h(d),{state:typeof d=="object"?ae({},ie,d.state):ie,force:ye,replace:ee}),H||$);const m=$;m.redirectedFrom=H;let b;return!ye&&Vp(r,V,$)&&(b=vn(16,{to:m,from:V}),$t(V,V,!0,!1)),(b?Promise.resolve(b):F(m,V)).catch(E=>ft(E)?ft(E,2)?E:Ge(E):fe(E,m,V)).then(E=>{if(E){if(ft(E,2))return I(ae({replace:ee},h(E.to),{state:typeof E.to=="object"?ae({},ie,E.to.state):ie,force:ye}),H||m)}else E=W(m,V,!0,ee,ie);return U(m,V,E),E})}function k(x,H){const $=v(x,H);return $?Promise.reject($):Promise.resolve()}function F(x,H){let $;const[V,ie,ye]=Uh(x,H);$=io(V.reverse(),"beforeRouteLeave",x,H);for(const d of V)d.leaveGuards.forEach(m=>{$.push(Pt(m,x,H))});const ee=k.bind(null,x,H);return $.push(ee),en($).then(()=>{$=[];for(const d of s.list())$.push(Pt(d,x,H));return $.push(ee),en($)}).then(()=>{$=io(ie,"beforeRouteUpdate",x,H);for(const d of ie)d.updateGuards.forEach(m=>{$.push(Pt(m,x,H))});return $.push(ee),en($)}).then(()=>{$=[];for(const d of x.matched)if(d.beforeEnter&&!H.matched.includes(d))if(ot(d.beforeEnter))for(const m of d.beforeEnter)$.push(Pt(m,x,H));else $.push(Pt(d.beforeEnter,x,H));return $.push(ee),en($)}).then(()=>(x.matched.forEach(d=>d.enterCallbacks={}),$=io(ye,"beforeRouteEnter",x,H),$.push(ee),en($))).then(()=>{$=[];for(const d of i.list())$.push(Pt(d,x,H));return $.push(ee),en($)}).catch(d=>ft(d,8)?d:Promise.reject(d))}function U(x,H,$){for(const V of l.list())V(x,H,$)}function W(x,H,$,V,ie){const ye=v(x,H);if(ye)return ye;const ee=H===Rt,d=nn?history.state:{};$&&(V||ee?o.replace(x.fullPath,ae({scroll:ee&&d&&d.scroll},ie)):o.push(x.fullPath,ie)),a.value=x,$t(x,H,$,ee),Ge()}let N;function X(){N||(N=o.listen((x,H,$)=>{if(!er.listening)return;const V=y(x),ie=O(V);if(ie){I(ae(ie,{replace:!0}),V).catch(jn);return}u=V;const ye=a.value;nn&&Xp(_i(ye.fullPath,$.delta),Fr()),F(V,ye).catch(ee=>ft(ee,12)?ee:ft(ee,2)?(I(ee.to,V).then(d=>{ft(d,20)&&!$.delta&&$.type===Qn.pop&&o.go(-1,!1)}).catch(jn),Promise.reject()):($.delta&&o.go(-$.delta,!1),fe(ee,V,ye))).then(ee=>{ee=ee||W(V,ye,!1),ee&&($.delta&&!ft(ee,8)?o.go(-$.delta,!1):$.type===Qn.pop&&ft(ee,20)&&o.go(-1,!1)),U(V,ye,ee)}).catch(jn)}))}let j=On(),Te=On(),se;function fe(x,H,$){Ge(x);const V=Te.list();return V.length?V.forEach(ie=>ie(x,H,$)):console.error(x),Promise.reject(x)}function ue(){return se&&a.value!==Rt?Promise.resolve():new Promise((x,H)=>{j.add([x,H])})}function Ge(x){return se||(se=!x,X(),j.list().forEach(([H,$])=>x?$(x):H()),j.reset()),x}function $t(x,H,$,V){const{scrollBehavior:ie}=e;if(!nn||!ie)return Promise.resolve();const ye=!$&&Zp(_i(x.fullPath,0))||(V||!$)&&history.state&&history.state.scroll||null;return xn().then(()=>ie(x,H,ye)).then(ee=>ee&&Gp(ee)).catch(ee=>fe(ee,x,H))}const Xe=x=>o.go(x);let Be;const Xt=new Set,er={currentRoute:a,listening:!0,addRoute:g,removeRoute:_,hasRoute:R,getRoutes:C,resolve:y,options:e,push:w,replace:T,go:Xe,back:()=>Xe(-1),forward:()=>Xe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:Te.add,isReady:ue,install(x){const H=this;x.component("RouterLink",$h),x.component("RouterView",ka),x.config.globalProperties.$router=H,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>we(a)}),nn&&!Be&&a.value===Rt&&(Be=!0,w(o.location).catch(ie=>{}));const $={};for(const ie in Rt)$[ie]=Re(()=>a.value[ie]);x.provide(gs,H),x.provide(ms,rt($)),x.provide(Io,a);const V=x.unmount;Xt.add(x),x.unmount=function(){Xt.delete(x),Xt.size<1&&(u=Rt,N&&N(),N=null,a.value=Rt,Be=!1,se=!1),V()}}};return er}function en(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Uh(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const l=t.matched[i];l&&(e.matched.find(u=>_n(u,l))?r.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(u=>_n(u,a))||o.push(a))}return[n,r,o]}function Fh(){return nt(ms)}const qh=/[0-9]/;function Vh(e=""){return qh.test(e)?null:e.toUpperCase()===e}const Kh=["-","_","/","."];function zh(e,t=Kh){const n=[];if(!e||typeof e!="string")return n;let r="",o=null,s=null;for(const i of e.split("")){const l=t.includes(i);if(l===!0){n.push(r),r="",o=null;continue}const a=Vh(i);if(s===!1){if(o===!1&&a===!0){n.push(r),r=i,o=a;continue}if(o===!0&&a===!1&&r.length>1){const u=r[r.length-1];n.push(r.substr(0,r.length-1)),r=u+i,o=a;continue}}r+=i,o=a,s=l}return n.push(r),n}function Wh(e){return e?e[0].toUpperCase()+e.substring(1):""}function Qh(e=""){return(Array.isArray(e)?e:zh(e)).map(t=>Wh(t)).join("")}class Zn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zn.prototype.property={};Zn.prototype.normal={};Zn.prototype.space=null;function Pa(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Zn(n,r,t)}function $o(e){return e.toLowerCase()}class Je{constructor(t,n){this.property=t,this.attribute=n}}Je.prototype.space=null;Je.prototype.boolean=!1;Je.prototype.booleanish=!1;Je.prototype.overloadedBoolean=!1;Je.prototype.number=!1;Je.prototype.commaSeparated=!1;Je.prototype.spaceSeparated=!1;Je.prototype.commaOrSpaceSeparated=!1;Je.prototype.mustUseProperty=!1;Je.prototype.defined=!1;let Yh=0;const Z=Gt(),be=Gt(),Aa=Gt(),A=Gt(),he=Gt(),fn=Gt(),je=Gt();function Gt(){return 2**++Yh}const Bo=Object.freeze(Object.defineProperty({__proto__:null,boolean:Z,booleanish:be,overloadedBoolean:Aa,number:A,spaceSeparated:he,commaSeparated:fn,commaOrSpaceSeparated:je},Symbol.toStringTag,{value:"Module"})),lo=Object.keys(Bo);class ys extends Je{constructor(t,n,r,o){let s=-1;if(super(t,n),Li(this,"space",o),typeof r=="number")for(;++s<lo.length;){const i=lo[s];Li(this,lo[s],(r&Bo[i])===Bo[i])}}}ys.prototype.defined=!0;function Li(e,t,n){n&&(e[t]=n)}const Jh={}.hasOwnProperty;function Pn(e){const t={},n={};let r;for(r in e.properties)if(Jh.call(e.properties,r)){const o=e.properties[r],s=new ys(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[$o(r)]=r,n[$o(s.attribute)]=r}return new Zn(t,n,e.space)}const Ta=Pn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Oa=Pn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function La(e,t){return t in e?e[t]:t}function Ma(e,t){return La(e,t.toLowerCase())}const Da=Pn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ma,properties:{xmlns:null,xmlnsXLink:null}}),Ia=Pn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:be,ariaAutoComplete:null,ariaBusy:be,ariaChecked:be,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:he,ariaCurrent:null,ariaDescribedBy:he,ariaDetails:null,ariaDisabled:be,ariaDropEffect:he,ariaErrorMessage:null,ariaExpanded:be,ariaFlowTo:he,ariaGrabbed:be,ariaHasPopup:null,ariaHidden:be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:he,ariaLevel:A,ariaLive:null,ariaModal:be,ariaMultiLine:be,ariaMultiSelectable:be,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:be,ariaReadOnly:be,ariaRelevant:null,ariaRequired:be,ariaRoleDescription:he,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:be,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null}}),Gh=Pn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ma,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fn,acceptCharset:he,accessKey:he,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:he,autoFocus:Z,autoPlay:Z,capture:Z,charSet:null,checked:Z,cite:null,className:he,cols:A,colSpan:null,content:null,contentEditable:be,controls:Z,controlsList:he,coords:A|fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Aa,draggable:be,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:he,height:A,hidden:Z,high:A,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:he,itemRef:he,itemScope:Z,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:A,pattern:null,ping:he,placeholder:null,playsInline:Z,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:he,required:Z,reversed:Z,rows:A,rowSpan:A,sandbox:he,scope:null,scoped:Z,seamless:Z,selected:Z,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:be,width:A,wrap:null,align:null,aLink:null,archive:he,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:be,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:A,security:null,unselectable:null}}),Xh=Pn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:La,properties:{about:je,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:he,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fn,g2:fn,glyphName:fn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:he,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:je,rev:je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:je,requiredFeatures:je,requiredFonts:je,requiredFormats:je,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:je,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:je,to:null,transform:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Zh=/^data[-\w.:]+$/i,Mi=/-[a-z]/g,eg=/[A-Z]/g;function tg(e,t){const n=$o(t);let r=t,o=Je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Zh.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Mi,rg);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Mi.test(s)){let i=s.replace(eg,ng);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ys}return new o(r,t)}function ng(e){return"-"+e.toLowerCase()}function rg(e){return e.charAt(1).toUpperCase()}const og=Pa([Oa,Ta,Da,Ia,Gh],"html");Pa([Oa,Ta,Da,Ia,Xh],"svg");var by=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $a={exports:{}};const ig=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];(function(e){e.exports=ig})($a);const Ba=sg($a.exports),Fn="default",Na=/^@|^v-on:/,Ha=/^:|^v-bind:/,ja=/^v-model/,lg=["select","textarea","input"],Ua=Me({name:"ContentRendererMarkdown",props:{value:{type:Object,required:!0},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"},components:{type:Object,default:()=>({})}},async setup(e){var n;const{content:{tags:t={}}}=Sn().public;return await yg(e.value.body,{tags:{...t,...((n=e.value)==null?void 0:n._components)||{},...e.components}}),{tags:t}},render(e){var u;const{tags:t,tag:n,value:r,components:o}=e;if(!r)return null;let s=r.body||r;e.excerpt&&r.excerpt&&(s=r.excerpt);const i={...r,tags:{...t,...(r==null?void 0:r._components)||{},...o}};let l=i.component||n;typeof i.component=="object"&&(l=i.component.name),l=Fa(l);const a=(s.children||[]).map(c=>fr(c,_e,i));return _e(l,{...(u=i.component)==null?void 0:u.props,...this.$attrs},{default:Va(a)})}});function fr(e,t,n,r={}){var a;if(e.type==="text")return t(yt,e.value);const o=e.tag,s=typeof((a=e.props)==null?void 0:a.__ignoreMap)>"u"&&n.tags[o]||o;if(e.tag==="binding")return ag(e,t,n,r);const i=Fa(s);typeof i=="object"&&(i.tag=o);const l=cg(e,n);return t(i,l,ug(e,t,n,{...r,...l}))}function ag(e,t,n,r={}){var a;const o={...r,$route:()=>kn(),$document:n,$doc:n},s=/\.|\[(\d+)\]/,l=((a=e.props)==null?void 0:a.value.trim().split(s).filter(Boolean)).reduce((u,c)=>c in u?typeof u[c]=="function"?u[c]():u[c]:{},o);return t(yt,l)}function ug(e,t,n,r){const s=(e.children||[]).reduce((l,a)=>{if(!Ka(a))return l[Fn].push(fr(a,t,n,r)),l;if(gg(a))return l[Fn].push(...(a.children||[]).map(c=>fr(c,t,n,r))),l;const u=qa(a);return l[u]=(a.children||[]).map(c=>fr(c,t,n,r)),l},{[Fn]:[]}),i=Object.entries(s).map(([l,a])=>[l,Va(a)]);return Object.fromEntries(i)}function cg(e,t){const{tag:n="",props:r={}}=e;return Object.keys(r).reduce(function(o,s){if(s==="__ignoreMap")return o;const i=r[s];if(ja.test(s)&&!lg.includes(n))return fg(s,i,o,t);if(s==="v-bind")return dg(s,i,o,t);if(Na.test(s))return pg(s,i,o,t);if(Ha.test(s))return hg(s,i,o,t);const{attribute:l}=tg(og,s);return Array.isArray(i)&&i.every(a=>typeof a=="string")?(o[l]=i.join(" "),o):(o[l]=i,o)},{})}function fg(e,t,n,r){const o=f=>+f,s=f=>f.trim(),i=f=>f,l=e.replace(ja,"").split(".").filter(f=>f).reduce((f,p)=>(f[p]=!0,f),{}),a="value",u=l.lazy?"change":"input",c=l.number?o:l.trim?s:i;return n[a]=qr(t,r),n.on=n.on||{},n.on[u]=f=>r[t]=c(f),n}function dg(e,t,n,r){const o=qr(t,r);return n=Object.assign(n,o),n}function pg(e,t,n,r){return e=e.replace(Na,""),n.on=n.on||{},n.on[e]=()=>qr(t,r),n}function hg(e,t,n,r){return e=e.replace(Ha,""),n[e]=qr(t,r),n}const Fa=e=>{if(!Ba.includes(e)){const t=Ir(Qh(e),!1);if(typeof t=="object")return t}return e};function qr(e,t){const n=e.split(".").reduce((r,o)=>typeof r=="object"?r[o]:void 0,t);return typeof n>"u"?fs(e):n}function qa(e){let t="";for(const n of Object.keys(e.props||{}))if(!(!n.startsWith("#")&&!n.startsWith("v-slot:"))){t=n.split(/[:#]/,2)[1];break}return t||Fn}function Va(e){return e.length?()=>mg(e):void 0}function gg(e){return Ka(e)&&qa(e)===Fn}function Ka(e){return e.tag==="template"}function mg(e){const t=[];for(const n of e){const r=t[t.length-1];n.type===yt&&(r==null?void 0:r.type)===yt?r.children=r.children+n.children:t.push(n)}return t}async function yg(e,t){const n=Array.from(new Set(r(e,t)));await Promise.all(n.map(async o=>{const s=Ir(o);(s==null?void 0:s.__asyncLoader)&&!s.__asyncResolved&&await s.__asyncLoader()}));function r(o,s){var a;if(o.type==="text"||o.tag==="binding")return[];const i=typeof((a=o.props)==null?void 0:a.__ignoreMap)>"u"&&s.tags[o.tag]||o.tag,l=[];o.type!=="root"&&!Ba.includes(i)&&l.push(i);for(const u of o.children||[])l.push(...r(u,s));return l}}const _g=Object.freeze(Object.defineProperty({__proto__:null,default:Ua},Symbol.toStringTag,{value:"Module"})),za=Me({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(e){Ue(()=>e.excerpt,t=>{var n,r,o;t&&!((n=e.value)!=null&&n.excerpt)&&(console.warn(`No excerpt found for document content/${(r=e==null?void 0:e.value)==null?void 0:r._path}.${(o=e==null?void 0:e.value)==null?void 0:o._extension}!`),console.warn("Make sure to use <!--more--> in your content if you want to use excerpt feature."))},{immediate:!0})},render(e){var s,i;const t=cs(),{value:n,excerpt:r,tag:o}=e;return!n&&(t==null?void 0:t.empty)?t.empty({value:n,excerpt:r,tag:o,...this.$attrs}):t!=null&&t.default?t.default({value:n,excerpt:r,tag:o,...this.$attrs}):n&&(n==null?void 0:n._type)==="markdown"&&((i=(s=n==null?void 0:n.body)==null?void 0:s.children)==null?void 0:i.length)?_e(Ua,{value:n,excerpt:r,tag:o,...this.$attrs}):_e("pre",null,JSON.stringify({message:"You should use slots with <ContentRenderer>",value:n,excerpt:r,tag:o},null,2))}}),vg=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"}));function bg(e){return JSON.stringify(e,wg)}function wg(e,t){return t instanceof RegExp?`--REGEX ${t.toString()}`:t}const Eg=["p","h1","h2","h3","h4","h5","h6","li"];function No(e,t){return e.type===t||typeof e.type=="object"&&e.type.tag===t||e.tag===t}function Wa(e){return No(e,"text")||typeof e.children=="string"}function Qa(e){return Array.isArray(e.children)||typeof e.children=="string"?e.children:typeof e.children.default=="function"?e.children.default():[]}function Ho(e){if(!e)return"";if(Array.isArray(e))return e.map(Ho).join("");if(Wa(e))return e.children||e.value;const t=Qa(e);return Array.isArray(t)?t.map(Ho).join(""):""}function _s(e,t=["p"]){if(Array.isArray(e))return e.flatMap(r=>_s(r,t));let n=e;return t.some(r=>r==="*"||No(e,r))&&(n=Qa(e)||e,!Array.isArray(n)&&Eg.some(r=>No(e,r))&&(n=[n])),n}function Ya(e,t=["p"]){return e=Array.isArray(e)?e:[e],t.length?e.flatMap(n=>Ya(_s(n,[t[0]]),t.slice(1))).filter(n=>!(Wa(n)&&Ho(n).trim()==="")):e}const Cg=e=>Xl(e,"/api/"+Sn().public.content.base),wy=()=>({unwrap:_s,flatUnwrap:Ya}),Ey=()=>{throw console.warn("useContent is only accessible when you are using `documentDriven` mode."),console.warn("Learn more by visiting: https://content.nuxtjs.org/guide/writing/document-driven"),new Error("useContent is only accessible when you are using `documentDriven` mode.")},xg=()=>{var t;const{clientDB:e}=Sn().content;return!!(e!=null&&e.isSPA||((t=kn().query)==null?void 0:t.preview)||ua("previewToken").value)},Rg="_list_1w161_1",Cy={list:Rg},Ja=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Di=(e,t=kn())=>{const n=we(e);Ue(()=>we(e),(o=n)=>{if(!t.path||!o)return;const s=Object.assign({},(o==null?void 0:o.head)||{}),i=s.title||(o==null?void 0:o.title);i&&(s.title=i),s.meta=[...s.meta||[]];const l=(s==null?void 0:s.description)||(o==null?void 0:o.description);l&&s.meta.filter(u=>u.name==="description").length===0&&s.meta.push({name:"description",content:l});const a=(s==null?void 0:s.image)||(o==null?void 0:o.image);if(a&&s.meta.filter(u=>u.property==="og:image").length===0&&(typeof a=="string"&&s.meta.push({property:"og:image",content:a}),typeof a=="object")){const u=["src","secure_url","type","width","height","alt"];for(const c of u)c==="src"&&a.src?s.meta.push({property:"og:image",content:a[c]}):a[c]&&s.meta.push({property:`og:image:${c}`,content:a[c]})}xn(()=>pa(s))},{immediate:!0})},Ii=(e,t)=>t.split(".").reduce((n,r)=>n&&n[r],e),Ga=(e,t)=>Object.keys(e).filter(t).reduce((n,r)=>Object.assign(n,{[r]:e[r]}),{}),xy=e=>t=>Array.isArray(t)?t.map(n=>e(n)):e(t),Xa=e=>{const t=[],n=[];for(const r of e)["$","_"].includes(r)?t.push(r):n.push(r);return{prefixes:t,properties:n}},Ry=(e=[])=>t=>{if(e.length===0||!t)return t;const{prefixes:n,properties:r}=Xa(e);return Ga(t,o=>!r.includes(o)&&!n.includes(o[0]))},Sy=(e=[])=>t=>{if(e.length===0||!t)return t;const{prefixes:n,properties:r}=Xa(e);return Ga(t,o=>r.includes(o)||n.includes(o[0]))},ky=(e,t)=>{const n=new Intl.Collator(t.$locale,{numeric:t.$numeric,caseFirst:t.$caseFirst,sensitivity:t.$sensitivity}),r=Object.keys(t).filter(o=>!o.startsWith("$"));for(const o of r)e=e.sort((s,i)=>{const l=[Ii(s,o),Ii(i,o)].map(a=>{if(a!==null)return a instanceof Date?a.toISOString():a});return t[o]===-1&&l.reverse(),n.compare(l[0],l[1])});return e},Py=(e,t="Expected an array")=>{if(!Array.isArray(e))throw new TypeError(t)},tn=e=>Array.isArray(e)?e:e?[e]:[],Sg=["sort","where","only","without"],$i=(e,t)=>{const n={...t};for(const s of Sg)n[s]&&(n[s]=tn(n[s]));const r=(s,i=l=>l)=>(...l)=>(n[s]=i(...l),o),o={params:()=>n,only:r("only",tn),without:r("without",tn),where:r("where",s=>[...tn(n.where),s]),sort:r("sort",s=>[...tn(n.sort),...tn(s)]),limit:r("limit",s=>parseInt(String(s),10)),skip:r("skip",s=>parseInt(String(s),10)),find:()=>e(o),findOne:()=>(n.first=!0,e(o)),findSurround:(s,i)=>(n.surround={query:s,...i},e(o)),locale:s=>o.where({_locale:s})};return o},Bi=e=>async t=>{var s;e&&(t.params().first&&(t.params().where||[]).length===0?t.where({_path:ds(e)}):t.where({_path:new RegExp(`^${e.replace(/[-[\]{}()*+.,^$\s/]/g,"\\$&")}`)})),(s=t.params().sort)!=null&&s.length||t.sort({_file:1,$numeric:!0});const n=t.params(),r=Cg(`/query/${aa(n)}.json`);if(xg())return(await J(()=>import("./client-db.4629eda6.js"),[],import.meta.url).then(l=>l.useContentDatabase())).fetch(t);const o=await $fetch(r,{method:"GET",responseType:"json",params:{_params:bg(n),previewToken:ua("previewToken").value}});if(typeof o=="string"&&o.startsWith("<!DOCTYPE html>"))throw new Error("Not found");return o};function Ni(e,...t){return typeof e=="string"?$i(Bi(Xf(Xn(e,...t)))):$i(Bi(),e)}const Za=Me({name:"ContentQuery",props:{path:{type:String,required:!1,default:void 0},only:{type:Array,required:!1,default:void 0},without:{type:Array,required:!1,default:void 0},where:{type:Object,required:!1,default:void 0},sort:{type:Object,required:!1,default:void 0},limit:{type:Number,required:!1,default:void 0},skip:{type:Number,required:!1,default:void 0},locale:{type:String,required:!1,default:void 0},find:{type:String,required:!1,default:void 0}},async setup(e){const{path:t,only:n,without:r,where:o,sort:s,limit:i,skip:l,locale:a,find:u}=cl(e),c=Re(()=>{var g;return(g=t.value)==null?void 0:g.includes("/_")}),{data:f,refresh:p}=await Od(`content-query-${aa(e)}`,()=>{let g;return t.value?g=Ni(t.value):g=Ni(),n.value&&(g=g.only(n.value)),r.value&&(g=g.without(r.value)),o.value&&(g=g.where(o.value)),s.value&&(g=g.sort(s.value)),i.value&&(g=g.limit(i.value)),l.value&&(g=g.skip(l.value)),a.value&&(g=g.where({_locale:a.value})),u.value==="one"?g.findOne():u.value==="surround"?t.value?g.findSurround(t):(console.warn("[Content] Surround queries requires `path` prop to be set."),console.warn("[Content] Query without `path` will return regular `find()` results."),g.find()):g.find()});return{isPartial:c,data:f,refresh:p}},render(e){var R;const t=cs(),{data:n,refresh:r,isPartial:o,path:s,only:i,without:l,where:a,sort:u,limit:c,skip:f,locale:p,find:g}=e,_={path:s,only:i,without:l,where:a,sort:u,limit:c,skip:f,locale:p,find:g};if(_.find==="one"){if(!n&&(t==null?void 0:t["not-found"]))return t["not-found"]({props:_,...this.$attrs});if((n==null?void 0:n._type)==="markdown"&&!((R=n==null?void 0:n.body)!=null&&R.children.length))return t.empty({props:_,...this.$attrs})}else if((!n||!n.length)&&t!=null&&t["not-found"])return t["not-found"]({props:_,...this.$attrs});return t!=null&&t.default?t.default({data:n,refresh:r,isPartial:o,props:_,...this.$attrs}):((y,h)=>_e("pre",null,JSON.stringify({message:"You should use slots with <ContentQuery>!",slot:y,data:h},null,2)))("default",{data:n,props:_,isPartial:o})}}),kg=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"})),Pg=Me({name:"ContentDoc",props:{tag:{type:String,required:!1,default:"div"},excerpt:{type:Boolean,default:!1},path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0},head:{type:Boolean,required:!1,default:!0}},render(e){const t=cs(),{tag:n,excerpt:r,path:o,query:s,head:i}=e,l={...s||{},path:o||(s==null?void 0:s.path)||Jl(kn().path),find:"one"},a=(u,c)=>_e("pre",null,JSON.stringify({message:"You should use slots with <ContentDoc>",slot:u,data:c},null,2));return _e(Za,l,{default:t!=null&&t.default?({data:u,refresh:c,isPartial:f})=>{var p;return i&&Di(u),(p=t.default)==null?void 0:p.call(t,{doc:u,refresh:c,isPartial:f,excerpt:r,...this.$attrs})}:({data:u})=>(i&&Di(u),_e(za,{value:u,excerpt:r,tag:n,...this.$attrs},{empty:c=>t!=null&&t.empty?t.empty(c):a("default",u)})),empty:u=>{var c;return((c=t==null?void 0:t.empty)==null?void 0:c.call(t,u))||_e("p",null,"Document is empty, overwrite this content with #empty slot in <ContentDoc>.")},"not-found":u=>{var c;return((c=t==null?void 0:t["not-found"])==null?void 0:c.call(t,u))||_e("p",null,"Document not found, overwrite this content with #not-found slot in <ContentDoc>.")}})}}),Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Pg},Symbol.toStringTag,{value:"Module"})),Ut=void 0,Tg="_grid_15n56_1",Og="_text_15n56_7",Ay={grid:Tg,text:Og},Lg="_rating_11ify_1",Mg="_star_11ify_10",Dg="_filled_11ify_29",Ty={rating:Lg,star:Mg,filled:Dg},Ig="_card_e1njf_1",Oy={card:Ig},$g="_grid_1kefv_1",Bg="_title_1kefv_11",Ng="_icon_1kefv_15",Hg="_text_1kefv_20",jg="_description_1kefv_26",Ly={grid:$g,title:Bg,icon:Ng,text:Hg,description:jg},Ug=""+new URL("react-logo.8351f38f.svg",import.meta.url).href,Fg=""+new URL("react-native-logo.bdbaa7c9.svg",import.meta.url).href,qg=""+new URL("react-ssr-logo.3593105e.svg",import.meta.url).href,Vg=""+new URL("ts-logo.5847c362.svg",import.meta.url).href,Kg=""+new URL("golang-logo.f772e478.svg",import.meta.url).href,zg=""+new URL("html-logo.1f694231.svg",import.meta.url).href,Wg=""+new URL("arch-logo.838efbc7.svg",import.meta.url).href,Qg=""+new URL("gql-logo.1e66e5b3.svg",import.meta.url).href,Yg=""+new URL("swagger-logo.b314537c.svg",import.meta.url).href,Jg=""+new URL("vue-logo.17ff892a.svg",import.meta.url).href,Gg=""+new URL("postgres-logo.d981f813.svg",import.meta.url).href,Xg=""+new URL("docker-logo.7f942bd1.svg",import.meta.url).href;var te=(e=>(e.React="React",e.ReactNative="ReactNative",e.ReactSSR="ReactSSR",e.Ts="Ts",e.GoLang="GoLang",e.HTML="HTML",e.Arch="Arch",e.GQL="GQL",e.Swagger="Swagger",e.Vue="Vue",e.Postgres="Postgres",e.Docker="Docker",e))(te||{});const Ve={React:Ug,ReactNative:Fg,ReactSSR:qg,Ts:Vg,GoLang:Kg,HTML:zg,Arch:Wg,GQL:Qg,Swagger:Yg,Vue:Jg,Postgres:Gg,Docker:Xg},Ke={React:"React",ReactNative:"Typescript",ReactSSR:"SSR (Next, Gatsby)",Ts:"Vue.js & Nuxt",GoLang:"React Native",HTML:"Golang",Arch:"Docker",GQL:"HTML, CSS, SVG",Swagger:"Linux Shell",Vue:"GraphQL",Postgres:"REST API",Docker:"SQL"},My=[{title:Ke[te.React],description:"Classes and FC-s, hooks, context, redux, redux-saga, mobx",level:5,icon:Ve[te.React]},{title:Ke[te.ReactNative],description:"For both frontend and backend development: generics, guards, infers",level:4,icon:Ve[te.Ts]},{title:Ke[te.ReactSSR],description:"Automated generation, incremental, static, and dynamic rendering",level:4,icon:Ve[te.ReactSSR]},{title:Ke[te.Ts],description:"Common SPA-s and SSR blogs like this one, with composition API, and Vuex",level:3,icon:Ve[te.Vue]},{title:Ke[te.GoLang],description:"Basic developing and releasing experience without native modules",level:3,icon:Ve[te.ReactNative]},{title:Ke[te.HTML],description:"Monolith and microservice apps with REST, GraphQL, and GRPC",level:2,icon:Ve[te.GoLang]},{title:Ke[te.Arch],description:"Docker, docker-compose, private registries, gitlab-ci, and drone-ci",level:4,icon:Ve[te.Docker]},{title:Ke[te.GQL],description:"Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS",level:5,icon:Ve[te.HTML]},{title:Ke[te.Swagger],description:"Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!",level:4,icon:Ve[te.Arch]},{title:Ke[te.Vue],description:"Both server- and client-side. Queries, mutations, cache manipulation",level:4,icon:Ve[te.GQL]},{title:Ke[te.Postgres],description:"With Axios, fetch, express, gorilla-mux, and gin-gonic",level:4,icon:Ve[te.Swagger]},{title:Ke[te.Docker],description:"Base queries, JOIN-s, indexes and simpl query optimizations",level:2,icon:Ve[te.Postgres]}],Zg="_list_89lzg_1",Dy={list:Zg},em="_button_aq4bi_1",tm="_prefixed_aq4bi_41",nm="_suffixed_aq4bi_41",rm="_title_aq4bi_48",om="_prefix_aq4bi_41",sm="_suffix_aq4bi_41",Iy={button:em,"variant-primary":"_variant-primary_aq4bi_9","variant-outline":"_variant-outline_aq4bi_12","size-md":"_size-md_aq4bi_37",prefixed:tm,suffixed:nm,title:rm,prefix:om,suffix:sm},im="_card_1wy9v_1",lm="_thumbnail_1wy9v_7",am="_image_1wy9v_14",um="_content_1wy9v_20",cm="_head_1wy9v_27",fm="_title_1wy9v_31",dm="_url_1wy9v_35",pm="_description_1wy9v_39",hm="_buttons_1wy9v_46",$y={card:im,thumbnail:lm,image:am,content:um,head:cm,title:fm,url:dm,description:pm,buttons:hm},gm=""+new URL("vault48.40538b94.png",import.meta.url).href,mm=""+new URL("orchid-map.2f398715.png",import.meta.url).href,ym=""+new URL("obsidian-garden.39e6dff3.png",import.meta.url).href,By=[{name:"Vault48",description:`Community blog with a long 13-year history, features photo, video and audio embedding.
+  */const nn=typeof window<"u";function jp(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ae=Object.assign;function oo(e,t){const n={};for(const r in t){const o=t[r];n[r]=ot(o)?o.map(e):e(o)}return n}const jn=()=>{},ot=Array.isArray,Up=/\/$/,Fp=e=>e.replace(Up,"");function so(e,t,n="/"){let r,o={},s="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return l<a&&l>=0&&(a=-1),a>-1&&(r=t.slice(0,a),s=t.slice(a+1,l>-1?l:t.length),o=e(s)),l>-1&&(r=r||t.slice(0,l),i=t.slice(l,t.length)),r=zp(r!=null?r:t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:i}}function qp(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function mi(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Vp(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&_n(t.matched[r],n.matched[o])&&ma(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function _n(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ma(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Kp(e[n],t[n]))return!1;return!0}function Kp(e,t){return ot(e)?yi(e,t):ot(t)?yi(t,e):e===t}function yi(e,t){return ot(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function zp(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o=n.length-1,s,i;for(s=0;s<r.length;s++)if(i=r[s],i!==".")if(i==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(s-(s===r.length?1:0)).join("/")}var Qn;(function(e){e.pop="pop",e.push="push"})(Qn||(Qn={}));var Un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Un||(Un={}));function Wp(e){if(!e)if(nn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Fp(e)}const Qp=/^[^#]+#/;function Yp(e,t){return e.replace(Qp,"#")+t}function Jp(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Fr=()=>({left:window.pageXOffset,top:window.pageYOffset});function Gp(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Jp(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function _i(e,t){return(history.state?history.state.position-t:-1)+e}const Mo=new Map;function Xp(e,t){Mo.set(e,t)}function Zp(e){const t=Mo.get(e);return Mo.delete(e),t}let eh=()=>location.protocol+"//"+location.host;function ya(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let l=o.includes(e.slice(s))?e.slice(s).length:1,a=o.slice(l);return a[0]!=="/"&&(a="/"+a),mi(a,"")}return mi(n,e)+r+o}function th(e,t,n,r){let o=[],s=[],i=null;const l=({state:p})=>{const g=ya(e,location),_=n.value,C=t.value;let R=0;if(p){if(n.value=g,t.value=p,i&&i===_){i=null;return}R=C?p.position-C.position:0}else r(g);o.forEach(y=>{y(n.value,_,{delta:R,type:Qn.pop,direction:R?R>0?Un.forward:Un.back:Un.unknown})})};function a(){i=n.value}function u(p){o.push(p);const g=()=>{const _=o.indexOf(p);_>-1&&o.splice(_,1)};return s.push(g),g}function c(){const{history:p}=window;!p.state||p.replaceState(ae({},p.state,{scroll:Fr()}),"")}function f(){for(const p of s)p();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c),{pauseListeners:a,listen:u,destroy:f}}function vi(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Fr():null}}function nh(e){const{history:t,location:n}=window,r={value:ya(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(a,u,c){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:eh()+e+a;try{t[c?"replaceState":"pushState"](u,"",p),o.value=u}catch(g){console.error(g),n[c?"replace":"assign"](p)}}function i(a,u){const c=ae({},t.state,vi(o.value.back,a,o.value.forward,!0),u,{position:o.value.position});s(a,c,!0),r.value=a}function l(a,u){const c=ae({},o.value,t.state,{forward:a,scroll:Fr()});s(c.current,c,!0);const f=ae({},vi(r.value,a,null),{position:c.position+1},u);s(a,f,!1),r.value=a}return{location:r,state:o,push:l,replace:i}}function _a(e){e=Wp(e);const t=nh(e),n=th(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=ae({location:"",base:e,go:r,createHref:Yp.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function rh(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),_a(e)}function oh(e){return typeof e=="string"||e&&typeof e=="object"}function va(e){return typeof e=="string"||typeof e=="symbol"}const Rt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ba=Symbol("");var bi;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(bi||(bi={}));function vn(e,t){return ae(new Error,{type:e,[ba]:!0},t)}function ft(e,t){return e instanceof Error&&ba in e&&(t==null||!!(e.type&t))}const wi="[^/]+?",sh={sensitive:!1,strict:!1,start:!0,end:!0},ih=/[.+*?^${}()[\]/\\]/g;function lh(e,t){const n=ae({},sh,t),r=[];let o=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(o+="/");for(let f=0;f<u.length;f++){const p=u[f];let g=40+(n.sensitive?.25:0);if(p.type===0)f||(o+="/"),o+=p.value.replace(ih,"\\$&"),g+=40;else if(p.type===1){const{value:_,repeatable:C,optional:R,regexp:y}=p;s.push({name:_,repeatable:C,optional:R});const h=y||wi;if(h!==wi){g+=10;try{new RegExp(`(${h})`)}catch(w){throw new Error(`Invalid custom RegExp for param "${_}" (${h}): `+w.message)}}let v=C?`((?:${h})(?:/(?:${h}))*)`:`(${h})`;f||(v=R&&u.length<2?`(?:/${v})`:"/"+v),R&&(v+="?"),o+=v,g+=20,R&&(g+=-8),C&&(g+=-20),h===".*"&&(g+=-50)}c.push(g)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(u){const c=u.match(i),f={};if(!c)return null;for(let p=1;p<c.length;p++){const g=c[p]||"",_=s[p-1];f[_.name]=g&&_.repeatable?g.split("/"):g}return f}function a(u){let c="",f=!1;for(const p of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const g of p)if(g.type===0)c+=g.value;else if(g.type===1){const{value:_,repeatable:C,optional:R}=g,y=_ in u?u[_]:"";if(ot(y)&&!C)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const h=ot(y)?y.join("/"):y;if(!h)if(R)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${_}"`);c+=h}}return c||"/"}return{re:i,score:r,keys:s,parse:l,stringify:a}}function ah(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function uh(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const s=ah(r[n],o[n]);if(s)return s;n++}if(Math.abs(o.length-r.length)===1){if(Ei(r))return 1;if(Ei(o))return-1}return o.length-r.length}function Ei(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ch={type:0,value:""},fh=/[a-zA-Z0-9_]/;function dh(e){if(!e)return[[]];if(e==="/")return[[ch]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let l=0,a,u="",c="";function f(){!u||(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:a==="/"?(u&&f(),i()):a===":"?(f(),n=1):p();break;case 4:p(),n=r;break;case 1:a==="("?n=2:fh.test(a)?p():(f(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=3:c+=a;break;case 3:f(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),f(),i(),o}function ph(e,t,n){const r=lh(dh(e.path),n),o=ae(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function hh(e,t){const n=[],r=new Map;t=Ri({strict:!1,end:!0,sensitive:!1},t);function o(c){return r.get(c)}function s(c,f,p){const g=!p,_=gh(c);_.aliasOf=p&&p.record;const C=Ri(t,c),R=[_];if("alias"in c){const v=typeof c.alias=="string"?[c.alias]:c.alias;for(const w of v)R.push(ae({},_,{components:p?p.record.components:_.components,path:w,aliasOf:p?p.record:_}))}let y,h;for(const v of R){const{path:w}=v;if(f&&w[0]!=="/"){const T=f.record.path,O=T[T.length-1]==="/"?"":"/";v.path=f.record.path+(w&&O+w)}if(y=ph(v,f,C),p?p.alias.push(y):(h=h||y,h!==y&&h.alias.push(y),g&&c.name&&!xi(y)&&i(c.name)),_.children){const T=_.children;for(let O=0;O<T.length;O++)s(T[O],y,p&&p.children[O])}p=p||y,a(y)}return h?()=>{i(h)}:jn}function i(c){if(va(c)){const f=r.get(c);f&&(r.delete(c),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(c);f>-1&&(n.splice(f,1),c.record.name&&r.delete(c.record.name),c.children.forEach(i),c.alias.forEach(i))}}function l(){return n}function a(c){let f=0;for(;f<n.length&&uh(c,n[f])>=0&&(c.record.path!==n[f].record.path||!wa(c,n[f]));)f++;n.splice(f,0,c),c.record.name&&!xi(c)&&r.set(c.record.name,c)}function u(c,f){let p,g={},_,C;if("name"in c&&c.name){if(p=r.get(c.name),!p)throw vn(1,{location:c});C=p.record.name,g=ae(Ci(f.params,p.keys.filter(h=>!h.optional).map(h=>h.name)),c.params&&Ci(c.params,p.keys.map(h=>h.name))),_=p.stringify(g)}else if("path"in c)_=c.path,p=n.find(h=>h.re.test(_)),p&&(g=p.parse(_),C=p.record.name);else{if(p=f.name?r.get(f.name):n.find(h=>h.re.test(f.path)),!p)throw vn(1,{location:c,currentLocation:f});C=p.record.name,g=ae({},f.params,c.params),_=p.stringify(g)}const R=[];let y=p;for(;y;)R.unshift(y.record),y=y.parent;return{name:C,path:_,params:g,matched:R,meta:yh(R)}}return e.forEach(c=>s(c)),{addRoute:s,resolve:u,removeRoute:i,getRoutes:l,getRecordMatcher:o}}function Ci(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function gh(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:mh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function mh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function xi(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yh(e){return e.reduce((t,n)=>ae(t,n.meta),{})}function Ri(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function wa(e,t){return t.children.some(n=>n===e||wa(e,n))}const Ea=/#/g,_h=/&/g,vh=/\//g,bh=/=/g,wh=/\?/g,Ca=/\+/g,Eh=/%5B/g,Ch=/%5D/g,xa=/%5E/g,xh=/%60/g,Ra=/%7B/g,Rh=/%7C/g,Sa=/%7D/g,Sh=/%20/g;function hs(e){return encodeURI(""+e).replace(Rh,"|").replace(Eh,"[").replace(Ch,"]")}function kh(e){return hs(e).replace(Ra,"{").replace(Sa,"}").replace(xa,"^")}function Do(e){return hs(e).replace(Ca,"%2B").replace(Sh,"+").replace(Ea,"%23").replace(_h,"%26").replace(xh,"`").replace(Ra,"{").replace(Sa,"}").replace(xa,"^")}function Ph(e){return Do(e).replace(bh,"%3D")}function Ah(e){return hs(e).replace(Ea,"%23").replace(wh,"%3F")}function Th(e){return e==null?"":Ah(e).replace(vh,"%2F")}function Rr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Oh(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(Ca," "),i=s.indexOf("="),l=Rr(i<0?s:s.slice(0,i)),a=i<0?null:Rr(s.slice(i+1));if(l in t){let u=t[l];ot(u)||(u=t[l]=[u]),u.push(a)}else t[l]=a}return t}function Si(e){let t="";for(let n in e){const r=e[n];if(n=Ph(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(ot(r)?r.map(s=>s&&Do(s)):[r&&Do(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Lh(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=ot(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Mh=Symbol(""),ki=Symbol(""),gs=Symbol(""),ms=Symbol(""),Io=Symbol("");function On(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Pt(e,t,n,r,o){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((i,l)=>{const a=f=>{f===!1?l(vn(4,{from:n,to:t})):f instanceof Error?l(f):oh(f)?l(vn(2,{from:t,to:f})):(s&&r.enterCallbacks[o]===s&&typeof f=="function"&&s.push(f),i())},u=e.call(r&&r.instances[o],t,n,a);let c=Promise.resolve(u);e.length<3&&(c=c.then(a)),c.catch(f=>l(f))})}function io(e,t,n,r){const o=[];for(const s of e)for(const i in s.components){let l=s.components[i];if(!(t!=="beforeRouteEnter"&&!s.instances[i]))if(Dh(l)){const u=(l.__vccOpts||l)[t];u&&o.push(Pt(u,n,r,s,i))}else{let a=l();o.push(()=>a.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${s.path}"`));const c=jp(u)?u.default:u;s.components[i]=c;const p=(c.__vccOpts||c)[t];return p&&Pt(p,n,r,s,i)()}))}}return o}function Dh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Pi(e){const t=nt(gs),n=nt(ms),r=Re(()=>t.resolve(we(e.to))),o=Re(()=>{const{matched:a}=r.value,{length:u}=a,c=a[u-1],f=n.matched;if(!c||!f.length)return-1;const p=f.findIndex(_n.bind(null,c));if(p>-1)return p;const g=Ai(a[u-2]);return u>1&&Ai(c)===g&&f[f.length-1].path!==g?f.findIndex(_n.bind(null,a[u-2])):p}),s=Re(()=>o.value>-1&&Nh(n.params,r.value.params)),i=Re(()=>o.value>-1&&o.value===n.matched.length-1&&ma(n.params,r.value.params));function l(a={}){return Bh(a)?t[we(e.replace)?"replace":"push"](we(e.to)).catch(jn):Promise.resolve()}return{route:r,href:Re(()=>r.value.href),isActive:s,isExactActive:i,navigate:l}}const Ih=Me({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Pi,setup(e,{slots:t}){const n=rt(Pi(e)),{options:r}=nt(gs),o=Re(()=>({[Ti(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ti(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:_e("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),$h=Ih;function Bh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Nh(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!ot(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function Ai(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ti=(e,t,n)=>e!=null?e:t!=null?t:n,Hh=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=nt(Io),o=Re(()=>e.route||r.value),s=nt(ki,0),i=Re(()=>{let u=we(s);const{matched:c}=o.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),l=Re(()=>o.value.matched[i.value]);cn(ki,Re(()=>i.value+1)),cn(Mh,l),cn(Io,o);const a=Qe();return Ue(()=>[a.value,l.value,e.name],([u,c,f],[p,g,_])=>{c&&(c.instances[f]=u,g&&g!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=g.leaveGuards),c.updateGuards.size||(c.updateGuards=g.updateGuards))),u&&c&&(!g||!_n(c,g)||!p)&&(c.enterCallbacks[f]||[]).forEach(C=>C(u))},{flush:"post"}),()=>{const u=o.value,c=e.name,f=l.value,p=f&&f.components[c];if(!p)return Oi(n.default,{Component:p,route:u});const g=f.props[c],_=g?g===!0?u.params:typeof g=="function"?g(u):g:null,R=_e(p,ae({},_,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(f.instances[c]=null)},ref:a}));return Oi(n.default,{Component:R,route:u})||R}}});function Oi(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ka=Hh;function jh(e){const t=hh(e.routes,e),n=e.parseQuery||Oh,r=e.stringifyQuery||Si,o=e.history,s=On(),i=On(),l=On(),a=go(Rt);let u=Rt;nn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=oo.bind(null,x=>""+x),f=oo.bind(null,Th),p=oo.bind(null,Rr);function g(x,H){let $,V;return va(x)?($=t.getRecordMatcher(x),V=H):V=x,t.addRoute(V,$)}function _(x){const H=t.getRecordMatcher(x);H&&t.removeRoute(H)}function C(){return t.getRoutes().map(x=>x.record)}function R(x){return!!t.getRecordMatcher(x)}function y(x,H){if(H=ae({},H||a.value),typeof x=="string"){const d=so(n,x,H.path),m=t.resolve({path:d.path},H),b=o.createHref(d.fullPath);return ae(d,m,{params:p(m.params),hash:Rr(d.hash),redirectedFrom:void 0,href:b})}let $;if("path"in x)$=ae({},x,{path:so(n,x.path,H.path).path});else{const d=ae({},x.params);for(const m in d)d[m]==null&&delete d[m];$=ae({},x,{params:f(x.params)}),H.params=f(H.params)}const V=t.resolve($,H),ie=x.hash||"";V.params=c(p(V.params));const ye=qp(r,ae({},x,{hash:kh(ie),path:V.path})),ee=o.createHref(ye);return ae({fullPath:ye,hash:ie,query:r===Si?Lh(x.query):x.query||{}},V,{redirectedFrom:void 0,href:ee})}function h(x){return typeof x=="string"?so(n,x,a.value.path):ae({},x)}function v(x,H){if(u!==x)return vn(8,{from:H,to:x})}function w(x){return I(x)}function T(x){return w(ae(h(x),{replace:!0}))}function O(x){const H=x.matched[x.matched.length-1];if(H&&H.redirect){const{redirect:$}=H;let V=typeof $=="function"?$(x):$;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=h(V):{path:V},V.params={}),ae({query:x.query,hash:x.hash,params:"path"in V?{}:x.params},V)}}function I(x,H){const $=u=y(x),V=a.value,ie=x.state,ye=x.force,ee=x.replace===!0,d=O($);if(d)return I(ae(h(d),{state:typeof d=="object"?ae({},ie,d.state):ie,force:ye,replace:ee}),H||$);const m=$;m.redirectedFrom=H;let b;return!ye&&Vp(r,V,$)&&(b=vn(16,{to:m,from:V}),$t(V,V,!0,!1)),(b?Promise.resolve(b):F(m,V)).catch(E=>ft(E)?ft(E,2)?E:Ge(E):fe(E,m,V)).then(E=>{if(E){if(ft(E,2))return I(ae({replace:ee},h(E.to),{state:typeof E.to=="object"?ae({},ie,E.to.state):ie,force:ye}),H||m)}else E=W(m,V,!0,ee,ie);return U(m,V,E),E})}function k(x,H){const $=v(x,H);return $?Promise.reject($):Promise.resolve()}function F(x,H){let $;const[V,ie,ye]=Uh(x,H);$=io(V.reverse(),"beforeRouteLeave",x,H);for(const d of V)d.leaveGuards.forEach(m=>{$.push(Pt(m,x,H))});const ee=k.bind(null,x,H);return $.push(ee),en($).then(()=>{$=[];for(const d of s.list())$.push(Pt(d,x,H));return $.push(ee),en($)}).then(()=>{$=io(ie,"beforeRouteUpdate",x,H);for(const d of ie)d.updateGuards.forEach(m=>{$.push(Pt(m,x,H))});return $.push(ee),en($)}).then(()=>{$=[];for(const d of x.matched)if(d.beforeEnter&&!H.matched.includes(d))if(ot(d.beforeEnter))for(const m of d.beforeEnter)$.push(Pt(m,x,H));else $.push(Pt(d.beforeEnter,x,H));return $.push(ee),en($)}).then(()=>(x.matched.forEach(d=>d.enterCallbacks={}),$=io(ye,"beforeRouteEnter",x,H),$.push(ee),en($))).then(()=>{$=[];for(const d of i.list())$.push(Pt(d,x,H));return $.push(ee),en($)}).catch(d=>ft(d,8)?d:Promise.reject(d))}function U(x,H,$){for(const V of l.list())V(x,H,$)}function W(x,H,$,V,ie){const ye=v(x,H);if(ye)return ye;const ee=H===Rt,d=nn?history.state:{};$&&(V||ee?o.replace(x.fullPath,ae({scroll:ee&&d&&d.scroll},ie)):o.push(x.fullPath,ie)),a.value=x,$t(x,H,$,ee),Ge()}let N;function X(){N||(N=o.listen((x,H,$)=>{if(!er.listening)return;const V=y(x),ie=O(V);if(ie){I(ae(ie,{replace:!0}),V).catch(jn);return}u=V;const ye=a.value;nn&&Xp(_i(ye.fullPath,$.delta),Fr()),F(V,ye).catch(ee=>ft(ee,12)?ee:ft(ee,2)?(I(ee.to,V).then(d=>{ft(d,20)&&!$.delta&&$.type===Qn.pop&&o.go(-1,!1)}).catch(jn),Promise.reject()):($.delta&&o.go(-$.delta,!1),fe(ee,V,ye))).then(ee=>{ee=ee||W(V,ye,!1),ee&&($.delta&&!ft(ee,8)?o.go(-$.delta,!1):$.type===Qn.pop&&ft(ee,20)&&o.go(-1,!1)),U(V,ye,ee)}).catch(jn)}))}let j=On(),Te=On(),se;function fe(x,H,$){Ge(x);const V=Te.list();return V.length?V.forEach(ie=>ie(x,H,$)):console.error(x),Promise.reject(x)}function ue(){return se&&a.value!==Rt?Promise.resolve():new Promise((x,H)=>{j.add([x,H])})}function Ge(x){return se||(se=!x,X(),j.list().forEach(([H,$])=>x?$(x):H()),j.reset()),x}function $t(x,H,$,V){const{scrollBehavior:ie}=e;if(!nn||!ie)return Promise.resolve();const ye=!$&&Zp(_i(x.fullPath,0))||(V||!$)&&history.state&&history.state.scroll||null;return xn().then(()=>ie(x,H,ye)).then(ee=>ee&&Gp(ee)).catch(ee=>fe(ee,x,H))}const Xe=x=>o.go(x);let Be;const Xt=new Set,er={currentRoute:a,listening:!0,addRoute:g,removeRoute:_,hasRoute:R,getRoutes:C,resolve:y,options:e,push:w,replace:T,go:Xe,back:()=>Xe(-1),forward:()=>Xe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:Te.add,isReady:ue,install(x){const H=this;x.component("RouterLink",$h),x.component("RouterView",ka),x.config.globalProperties.$router=H,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>we(a)}),nn&&!Be&&a.value===Rt&&(Be=!0,w(o.location).catch(ie=>{}));const $={};for(const ie in Rt)$[ie]=Re(()=>a.value[ie]);x.provide(gs,H),x.provide(ms,rt($)),x.provide(Io,a);const V=x.unmount;Xt.add(x),x.unmount=function(){Xt.delete(x),Xt.size<1&&(u=Rt,N&&N(),N=null,a.value=Rt,Be=!1,se=!1),V()}}};return er}function en(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Uh(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const l=t.matched[i];l&&(e.matched.find(u=>_n(u,l))?r.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(u=>_n(u,a))||o.push(a))}return[n,r,o]}function Fh(){return nt(ms)}const qh=/[0-9]/;function Vh(e=""){return qh.test(e)?null:e.toUpperCase()===e}const Kh=["-","_","/","."];function zh(e,t=Kh){const n=[];if(!e||typeof e!="string")return n;let r="",o=null,s=null;for(const i of e.split("")){const l=t.includes(i);if(l===!0){n.push(r),r="",o=null;continue}const a=Vh(i);if(s===!1){if(o===!1&&a===!0){n.push(r),r=i,o=a;continue}if(o===!0&&a===!1&&r.length>1){const u=r[r.length-1];n.push(r.substr(0,r.length-1)),r=u+i,o=a;continue}}r+=i,o=a,s=l}return n.push(r),n}function Wh(e){return e?e[0].toUpperCase()+e.substring(1):""}function Qh(e=""){return(Array.isArray(e)?e:zh(e)).map(t=>Wh(t)).join("")}class Zn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zn.prototype.property={};Zn.prototype.normal={};Zn.prototype.space=null;function Pa(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Zn(n,r,t)}function $o(e){return e.toLowerCase()}class Je{constructor(t,n){this.property=t,this.attribute=n}}Je.prototype.space=null;Je.prototype.boolean=!1;Je.prototype.booleanish=!1;Je.prototype.overloadedBoolean=!1;Je.prototype.number=!1;Je.prototype.commaSeparated=!1;Je.prototype.spaceSeparated=!1;Je.prototype.commaOrSpaceSeparated=!1;Je.prototype.mustUseProperty=!1;Je.prototype.defined=!1;let Yh=0;const Z=Gt(),be=Gt(),Aa=Gt(),A=Gt(),he=Gt(),fn=Gt(),je=Gt();function Gt(){return 2**++Yh}const Bo=Object.freeze(Object.defineProperty({__proto__:null,boolean:Z,booleanish:be,overloadedBoolean:Aa,number:A,spaceSeparated:he,commaSeparated:fn,commaOrSpaceSeparated:je},Symbol.toStringTag,{value:"Module"})),lo=Object.keys(Bo);class ys extends Je{constructor(t,n,r,o){let s=-1;if(super(t,n),Li(this,"space",o),typeof r=="number")for(;++s<lo.length;){const i=lo[s];Li(this,lo[s],(r&Bo[i])===Bo[i])}}}ys.prototype.defined=!0;function Li(e,t,n){n&&(e[t]=n)}const Jh={}.hasOwnProperty;function Pn(e){const t={},n={};let r;for(r in e.properties)if(Jh.call(e.properties,r)){const o=e.properties[r],s=new ys(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[$o(r)]=r,n[$o(s.attribute)]=r}return new Zn(t,n,e.space)}const Ta=Pn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Oa=Pn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function La(e,t){return t in e?e[t]:t}function Ma(e,t){return La(e,t.toLowerCase())}const Da=Pn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ma,properties:{xmlns:null,xmlnsXLink:null}}),Ia=Pn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:be,ariaAutoComplete:null,ariaBusy:be,ariaChecked:be,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:he,ariaCurrent:null,ariaDescribedBy:he,ariaDetails:null,ariaDisabled:be,ariaDropEffect:he,ariaErrorMessage:null,ariaExpanded:be,ariaFlowTo:he,ariaGrabbed:be,ariaHasPopup:null,ariaHidden:be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:he,ariaLevel:A,ariaLive:null,ariaModal:be,ariaMultiLine:be,ariaMultiSelectable:be,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:be,ariaReadOnly:be,ariaRelevant:null,ariaRequired:be,ariaRoleDescription:he,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:be,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null}}),Gh=Pn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ma,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fn,acceptCharset:he,accessKey:he,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:he,autoFocus:Z,autoPlay:Z,capture:Z,charSet:null,checked:Z,cite:null,className:he,cols:A,colSpan:null,content:null,contentEditable:be,controls:Z,controlsList:he,coords:A|fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Aa,draggable:be,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:he,height:A,hidden:Z,high:A,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:he,itemRef:he,itemScope:Z,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:A,pattern:null,ping:he,placeholder:null,playsInline:Z,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:he,required:Z,reversed:Z,rows:A,rowSpan:A,sandbox:he,scope:null,scoped:Z,seamless:Z,selected:Z,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:be,width:A,wrap:null,align:null,aLink:null,archive:he,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:be,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:A,security:null,unselectable:null}}),Xh=Pn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:La,properties:{about:je,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:he,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fn,g2:fn,glyphName:fn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:he,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:je,rev:je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:je,requiredFeatures:je,requiredFonts:je,requiredFormats:je,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:je,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:je,to:null,transform:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Zh=/^data[-\w.:]+$/i,Mi=/-[a-z]/g,eg=/[A-Z]/g;function tg(e,t){const n=$o(t);let r=t,o=Je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Zh.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Mi,rg);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Mi.test(s)){let i=s.replace(eg,ng);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ys}return new o(r,t)}function ng(e){return"-"+e.toLowerCase()}function rg(e){return e.charAt(1).toUpperCase()}const og=Pa([Oa,Ta,Da,Ia,Gh],"html");Pa([Oa,Ta,Da,Ia,Xh],"svg");var by=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $a={exports:{}};const ig=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];(function(e){e.exports=ig})($a);const Ba=sg($a.exports),Fn="default",Na=/^@|^v-on:/,Ha=/^:|^v-bind:/,ja=/^v-model/,lg=["select","textarea","input"],Ua=Me({name:"ContentRendererMarkdown",props:{value:{type:Object,required:!0},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"},components:{type:Object,default:()=>({})}},async setup(e){var n;const{content:{tags:t={}}}=Sn().public;return await yg(e.value.body,{tags:{...t,...((n=e.value)==null?void 0:n._components)||{},...e.components}}),{tags:t}},render(e){var u;const{tags:t,tag:n,value:r,components:o}=e;if(!r)return null;let s=r.body||r;e.excerpt&&r.excerpt&&(s=r.excerpt);const i={...r,tags:{...t,...(r==null?void 0:r._components)||{},...o}};let l=i.component||n;typeof i.component=="object"&&(l=i.component.name),l=Fa(l);const a=(s.children||[]).map(c=>fr(c,_e,i));return _e(l,{...(u=i.component)==null?void 0:u.props,...this.$attrs},{default:Va(a)})}});function fr(e,t,n,r={}){var a;if(e.type==="text")return t(yt,e.value);const o=e.tag,s=typeof((a=e.props)==null?void 0:a.__ignoreMap)>"u"&&n.tags[o]||o;if(e.tag==="binding")return ag(e,t,n,r);const i=Fa(s);typeof i=="object"&&(i.tag=o);const l=cg(e,n);return t(i,l,ug(e,t,n,{...r,...l}))}function ag(e,t,n,r={}){var a;const o={...r,$route:()=>kn(),$document:n,$doc:n},s=/\.|\[(\d+)\]/,l=((a=e.props)==null?void 0:a.value.trim().split(s).filter(Boolean)).reduce((u,c)=>c in u?typeof u[c]=="function"?u[c]():u[c]:{},o);return t(yt,l)}function ug(e,t,n,r){const s=(e.children||[]).reduce((l,a)=>{if(!Ka(a))return l[Fn].push(fr(a,t,n,r)),l;if(gg(a))return l[Fn].push(...(a.children||[]).map(c=>fr(c,t,n,r))),l;const u=qa(a);return l[u]=(a.children||[]).map(c=>fr(c,t,n,r)),l},{[Fn]:[]}),i=Object.entries(s).map(([l,a])=>[l,Va(a)]);return Object.fromEntries(i)}function cg(e,t){const{tag:n="",props:r={}}=e;return Object.keys(r).reduce(function(o,s){if(s==="__ignoreMap")return o;const i=r[s];if(ja.test(s)&&!lg.includes(n))return fg(s,i,o,t);if(s==="v-bind")return dg(s,i,o,t);if(Na.test(s))return pg(s,i,o,t);if(Ha.test(s))return hg(s,i,o,t);const{attribute:l}=tg(og,s);return Array.isArray(i)&&i.every(a=>typeof a=="string")?(o[l]=i.join(" "),o):(o[l]=i,o)},{})}function fg(e,t,n,r){const o=f=>+f,s=f=>f.trim(),i=f=>f,l=e.replace(ja,"").split(".").filter(f=>f).reduce((f,p)=>(f[p]=!0,f),{}),a="value",u=l.lazy?"change":"input",c=l.number?o:l.trim?s:i;return n[a]=qr(t,r),n.on=n.on||{},n.on[u]=f=>r[t]=c(f),n}function dg(e,t,n,r){const o=qr(t,r);return n=Object.assign(n,o),n}function pg(e,t,n,r){return e=e.replace(Na,""),n.on=n.on||{},n.on[e]=()=>qr(t,r),n}function hg(e,t,n,r){return e=e.replace(Ha,""),n[e]=qr(t,r),n}const Fa=e=>{if(!Ba.includes(e)){const t=Ir(Qh(e),!1);if(typeof t=="object")return t}return e};function qr(e,t){const n=e.split(".").reduce((r,o)=>typeof r=="object"?r[o]:void 0,t);return typeof n>"u"?fs(e):n}function qa(e){let t="";for(const n of Object.keys(e.props||{}))if(!(!n.startsWith("#")&&!n.startsWith("v-slot:"))){t=n.split(/[:#]/,2)[1];break}return t||Fn}function Va(e){return e.length?()=>mg(e):void 0}function gg(e){return Ka(e)&&qa(e)===Fn}function Ka(e){return e.tag==="template"}function mg(e){const t=[];for(const n of e){const r=t[t.length-1];n.type===yt&&(r==null?void 0:r.type)===yt?r.children=r.children+n.children:t.push(n)}return t}async function yg(e,t){const n=Array.from(new Set(r(e,t)));await Promise.all(n.map(async o=>{const s=Ir(o);(s==null?void 0:s.__asyncLoader)&&!s.__asyncResolved&&await s.__asyncLoader()}));function r(o,s){var a;if(o.type==="text"||o.tag==="binding")return[];const i=typeof((a=o.props)==null?void 0:a.__ignoreMap)>"u"&&s.tags[o.tag]||o.tag,l=[];o.type!=="root"&&!Ba.includes(i)&&l.push(i);for(const u of o.children||[])l.push(...r(u,s));return l}}const _g=Object.freeze(Object.defineProperty({__proto__:null,default:Ua},Symbol.toStringTag,{value:"Module"})),za=Me({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(e){Ue(()=>e.excerpt,t=>{var n,r,o;t&&!((n=e.value)!=null&&n.excerpt)&&(console.warn(`No excerpt found for document content/${(r=e==null?void 0:e.value)==null?void 0:r._path}.${(o=e==null?void 0:e.value)==null?void 0:o._extension}!`),console.warn("Make sure to use <!--more--> in your content if you want to use excerpt feature."))},{immediate:!0})},render(e){var s,i;const t=cs(),{value:n,excerpt:r,tag:o}=e;return!n&&(t==null?void 0:t.empty)?t.empty({value:n,excerpt:r,tag:o,...this.$attrs}):t!=null&&t.default?t.default({value:n,excerpt:r,tag:o,...this.$attrs}):n&&(n==null?void 0:n._type)==="markdown"&&((i=(s=n==null?void 0:n.body)==null?void 0:s.children)==null?void 0:i.length)?_e(Ua,{value:n,excerpt:r,tag:o,...this.$attrs}):_e("pre",null,JSON.stringify({message:"You should use slots with <ContentRenderer>",value:n,excerpt:r,tag:o},null,2))}}),vg=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"}));function bg(e){return JSON.stringify(e,wg)}function wg(e,t){return t instanceof RegExp?`--REGEX ${t.toString()}`:t}const Eg=["p","h1","h2","h3","h4","h5","h6","li"];function No(e,t){return e.type===t||typeof e.type=="object"&&e.type.tag===t||e.tag===t}function Wa(e){return No(e,"text")||typeof e.children=="string"}function Qa(e){return Array.isArray(e.children)||typeof e.children=="string"?e.children:typeof e.children.default=="function"?e.children.default():[]}function Ho(e){if(!e)return"";if(Array.isArray(e))return e.map(Ho).join("");if(Wa(e))return e.children||e.value;const t=Qa(e);return Array.isArray(t)?t.map(Ho).join(""):""}function _s(e,t=["p"]){if(Array.isArray(e))return e.flatMap(r=>_s(r,t));let n=e;return t.some(r=>r==="*"||No(e,r))&&(n=Qa(e)||e,!Array.isArray(n)&&Eg.some(r=>No(e,r))&&(n=[n])),n}function Ya(e,t=["p"]){return e=Array.isArray(e)?e:[e],t.length?e.flatMap(n=>Ya(_s(n,[t[0]]),t.slice(1))).filter(n=>!(Wa(n)&&Ho(n).trim()==="")):e}const Cg=e=>Xl(e,"/api/"+Sn().public.content.base),wy=()=>({unwrap:_s,flatUnwrap:Ya}),Ey=()=>{throw console.warn("useContent is only accessible when you are using `documentDriven` mode."),console.warn("Learn more by visiting: https://content.nuxtjs.org/guide/writing/document-driven"),new Error("useContent is only accessible when you are using `documentDriven` mode.")},xg=()=>{var t;const{clientDB:e}=Sn().content;return!!(e!=null&&e.isSPA||((t=kn().query)==null?void 0:t.preview)||ua("previewToken").value)},Rg="_list_1w161_1",Cy={list:Rg},Ja=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Di=(e,t=kn())=>{const n=we(e);Ue(()=>we(e),(o=n)=>{if(!t.path||!o)return;const s=Object.assign({},(o==null?void 0:o.head)||{}),i=s.title||(o==null?void 0:o.title);i&&(s.title=i),s.meta=[...s.meta||[]];const l=(s==null?void 0:s.description)||(o==null?void 0:o.description);l&&s.meta.filter(u=>u.name==="description").length===0&&s.meta.push({name:"description",content:l});const a=(s==null?void 0:s.image)||(o==null?void 0:o.image);if(a&&s.meta.filter(u=>u.property==="og:image").length===0&&(typeof a=="string"&&s.meta.push({property:"og:image",content:a}),typeof a=="object")){const u=["src","secure_url","type","width","height","alt"];for(const c of u)c==="src"&&a.src?s.meta.push({property:"og:image",content:a[c]}):a[c]&&s.meta.push({property:`og:image:${c}`,content:a[c]})}xn(()=>pa(s))},{immediate:!0})},Ii=(e,t)=>t.split(".").reduce((n,r)=>n&&n[r],e),Ga=(e,t)=>Object.keys(e).filter(t).reduce((n,r)=>Object.assign(n,{[r]:e[r]}),{}),xy=e=>t=>Array.isArray(t)?t.map(n=>e(n)):e(t),Xa=e=>{const t=[],n=[];for(const r of e)["$","_"].includes(r)?t.push(r):n.push(r);return{prefixes:t,properties:n}},Ry=(e=[])=>t=>{if(e.length===0||!t)return t;const{prefixes:n,properties:r}=Xa(e);return Ga(t,o=>!r.includes(o)&&!n.includes(o[0]))},Sy=(e=[])=>t=>{if(e.length===0||!t)return t;const{prefixes:n,properties:r}=Xa(e);return Ga(t,o=>r.includes(o)||n.includes(o[0]))},ky=(e,t)=>{const n=new Intl.Collator(t.$locale,{numeric:t.$numeric,caseFirst:t.$caseFirst,sensitivity:t.$sensitivity}),r=Object.keys(t).filter(o=>!o.startsWith("$"));for(const o of r)e=e.sort((s,i)=>{const l=[Ii(s,o),Ii(i,o)].map(a=>{if(a!==null)return a instanceof Date?a.toISOString():a});return t[o]===-1&&l.reverse(),n.compare(l[0],l[1])});return e},Py=(e,t="Expected an array")=>{if(!Array.isArray(e))throw new TypeError(t)},tn=e=>Array.isArray(e)?e:e?[e]:[],Sg=["sort","where","only","without"],$i=(e,t)=>{const n={...t};for(const s of Sg)n[s]&&(n[s]=tn(n[s]));const r=(s,i=l=>l)=>(...l)=>(n[s]=i(...l),o),o={params:()=>n,only:r("only",tn),without:r("without",tn),where:r("where",s=>[...tn(n.where),s]),sort:r("sort",s=>[...tn(n.sort),...tn(s)]),limit:r("limit",s=>parseInt(String(s),10)),skip:r("skip",s=>parseInt(String(s),10)),find:()=>e(o),findOne:()=>(n.first=!0,e(o)),findSurround:(s,i)=>(n.surround={query:s,...i},e(o)),locale:s=>o.where({_locale:s})};return o},Bi=e=>async t=>{var s;e&&(t.params().first&&(t.params().where||[]).length===0?t.where({_path:ds(e)}):t.where({_path:new RegExp(`^${e.replace(/[-[\]{}()*+.,^$\s/]/g,"\\$&")}`)})),(s=t.params().sort)!=null&&s.length||t.sort({_file:1,$numeric:!0});const n=t.params(),r=Cg(`/query/${aa(n)}.json`);if(xg())return(await J(()=>import("./client-db.438de858.js"),[],import.meta.url).then(l=>l.useContentDatabase())).fetch(t);const o=await $fetch(r,{method:"GET",responseType:"json",params:{_params:bg(n),previewToken:ua("previewToken").value}});if(typeof o=="string"&&o.startsWith("<!DOCTYPE html>"))throw new Error("Not found");return o};function Ni(e,...t){return typeof e=="string"?$i(Bi(Xf(Xn(e,...t)))):$i(Bi(),e)}const Za=Me({name:"ContentQuery",props:{path:{type:String,required:!1,default:void 0},only:{type:Array,required:!1,default:void 0},without:{type:Array,required:!1,default:void 0},where:{type:Object,required:!1,default:void 0},sort:{type:Object,required:!1,default:void 0},limit:{type:Number,required:!1,default:void 0},skip:{type:Number,required:!1,default:void 0},locale:{type:String,required:!1,default:void 0},find:{type:String,required:!1,default:void 0}},async setup(e){const{path:t,only:n,without:r,where:o,sort:s,limit:i,skip:l,locale:a,find:u}=cl(e),c=Re(()=>{var g;return(g=t.value)==null?void 0:g.includes("/_")}),{data:f,refresh:p}=await Od(`content-query-${aa(e)}`,()=>{let g;return t.value?g=Ni(t.value):g=Ni(),n.value&&(g=g.only(n.value)),r.value&&(g=g.without(r.value)),o.value&&(g=g.where(o.value)),s.value&&(g=g.sort(s.value)),i.value&&(g=g.limit(i.value)),l.value&&(g=g.skip(l.value)),a.value&&(g=g.where({_locale:a.value})),u.value==="one"?g.findOne():u.value==="surround"?t.value?g.findSurround(t):(console.warn("[Content] Surround queries requires `path` prop to be set."),console.warn("[Content] Query without `path` will return regular `find()` results."),g.find()):g.find()});return{isPartial:c,data:f,refresh:p}},render(e){var R;const t=cs(),{data:n,refresh:r,isPartial:o,path:s,only:i,without:l,where:a,sort:u,limit:c,skip:f,locale:p,find:g}=e,_={path:s,only:i,without:l,where:a,sort:u,limit:c,skip:f,locale:p,find:g};if(_.find==="one"){if(!n&&(t==null?void 0:t["not-found"]))return t["not-found"]({props:_,...this.$attrs});if((n==null?void 0:n._type)==="markdown"&&!((R=n==null?void 0:n.body)!=null&&R.children.length))return t.empty({props:_,...this.$attrs})}else if((!n||!n.length)&&t!=null&&t["not-found"])return t["not-found"]({props:_,...this.$attrs});return t!=null&&t.default?t.default({data:n,refresh:r,isPartial:o,props:_,...this.$attrs}):((y,h)=>_e("pre",null,JSON.stringify({message:"You should use slots with <ContentQuery>!",slot:y,data:h},null,2)))("default",{data:n,props:_,isPartial:o})}}),kg=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"})),Pg=Me({name:"ContentDoc",props:{tag:{type:String,required:!1,default:"div"},excerpt:{type:Boolean,default:!1},path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0},head:{type:Boolean,required:!1,default:!0}},render(e){const t=cs(),{tag:n,excerpt:r,path:o,query:s,head:i}=e,l={...s||{},path:o||(s==null?void 0:s.path)||Jl(kn().path),find:"one"},a=(u,c)=>_e("pre",null,JSON.stringify({message:"You should use slots with <ContentDoc>",slot:u,data:c},null,2));return _e(Za,l,{default:t!=null&&t.default?({data:u,refresh:c,isPartial:f})=>{var p;return i&&Di(u),(p=t.default)==null?void 0:p.call(t,{doc:u,refresh:c,isPartial:f,excerpt:r,...this.$attrs})}:({data:u})=>(i&&Di(u),_e(za,{value:u,excerpt:r,tag:n,...this.$attrs},{empty:c=>t!=null&&t.empty?t.empty(c):a("default",u)})),empty:u=>{var c;return((c=t==null?void 0:t.empty)==null?void 0:c.call(t,u))||_e("p",null,"Document is empty, overwrite this content with #empty slot in <ContentDoc>.")},"not-found":u=>{var c;return((c=t==null?void 0:t["not-found"])==null?void 0:c.call(t,u))||_e("p",null,"Document not found, overwrite this content with #not-found slot in <ContentDoc>.")}})}}),Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Pg},Symbol.toStringTag,{value:"Module"})),Ut=void 0,Tg="_grid_15n56_1",Og="_text_15n56_7",Ay={grid:Tg,text:Og},Lg="_rating_11ify_1",Mg="_star_11ify_10",Dg="_filled_11ify_29",Ty={rating:Lg,star:Mg,filled:Dg},Ig="_card_e1njf_1",Oy={card:Ig},$g="_grid_1kefv_1",Bg="_title_1kefv_11",Ng="_icon_1kefv_15",Hg="_text_1kefv_20",jg="_description_1kefv_26",Ly={grid:$g,title:Bg,icon:Ng,text:Hg,description:jg},Ug=""+new URL("react-logo.8351f38f.svg",import.meta.url).href,Fg=""+new URL("react-native-logo.bdbaa7c9.svg",import.meta.url).href,qg=""+new URL("react-ssr-logo.3593105e.svg",import.meta.url).href,Vg=""+new URL("ts-logo.5847c362.svg",import.meta.url).href,Kg=""+new URL("golang-logo.f772e478.svg",import.meta.url).href,zg=""+new URL("html-logo.1f694231.svg",import.meta.url).href,Wg=""+new URL("arch-logo.838efbc7.svg",import.meta.url).href,Qg=""+new URL("gql-logo.1e66e5b3.svg",import.meta.url).href,Yg=""+new URL("swagger-logo.b314537c.svg",import.meta.url).href,Jg=""+new URL("vue-logo.17ff892a.svg",import.meta.url).href,Gg=""+new URL("postgres-logo.d981f813.svg",import.meta.url).href,Xg=""+new URL("docker-logo.7f942bd1.svg",import.meta.url).href;var te=(e=>(e.React="React",e.ReactNative="ReactNative",e.ReactSSR="ReactSSR",e.Ts="Ts",e.GoLang="GoLang",e.HTML="HTML",e.Arch="Arch",e.GQL="GQL",e.Swagger="Swagger",e.Vue="Vue",e.Postgres="Postgres",e.Docker="Docker",e))(te||{});const Ve={React:Ug,ReactNative:Fg,ReactSSR:qg,Ts:Vg,GoLang:Kg,HTML:zg,Arch:Wg,GQL:Qg,Swagger:Yg,Vue:Jg,Postgres:Gg,Docker:Xg},Ke={React:"React",ReactNative:"Typescript",ReactSSR:"SSR (Next, Gatsby)",Ts:"Vue.js & Nuxt",GoLang:"React Native",HTML:"Golang",Arch:"Docker",GQL:"HTML, CSS, SVG",Swagger:"Linux Shell",Vue:"GraphQL",Postgres:"REST API",Docker:"SQL"},My=[{title:Ke[te.React],description:"Classes and FC-s, hooks, context, redux, redux-saga, mobx",level:5,icon:Ve[te.React]},{title:Ke[te.ReactNative],description:"For both frontend and backend development: generics, guards, infers",level:4,icon:Ve[te.Ts]},{title:Ke[te.ReactSSR],description:"Automated generation, incremental, static, and dynamic rendering",level:4,icon:Ve[te.ReactSSR]},{title:Ke[te.Ts],description:"Common SPA-s and SSR blogs like this one, with composition API, and Vuex",level:3,icon:Ve[te.Vue]},{title:Ke[te.GoLang],description:"Basic developing and releasing experience without native modules",level:3,icon:Ve[te.ReactNative]},{title:Ke[te.HTML],description:"Monolith and microservice apps with REST, GraphQL, and GRPC",level:2,icon:Ve[te.GoLang]},{title:Ke[te.Arch],description:"Docker, docker-compose, private registries, gitlab-ci, and drone-ci",level:4,icon:Ve[te.Docker]},{title:Ke[te.GQL],description:"Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS",level:5,icon:Ve[te.HTML]},{title:Ke[te.Swagger],description:"Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!",level:4,icon:Ve[te.Arch]},{title:Ke[te.Vue],description:"Both server- and client-side. Queries, mutations, cache manipulation",level:4,icon:Ve[te.GQL]},{title:Ke[te.Postgres],description:"With Axios, fetch, express, gorilla-mux, and gin-gonic",level:4,icon:Ve[te.Swagger]},{title:Ke[te.Docker],description:"Base queries, JOIN-s, indexes and simpl query optimizations",level:2,icon:Ve[te.Postgres]}],Zg="_list_89lzg_1",Dy={list:Zg},em="_button_aq4bi_1",tm="_prefixed_aq4bi_41",nm="_suffixed_aq4bi_41",rm="_title_aq4bi_48",om="_prefix_aq4bi_41",sm="_suffix_aq4bi_41",Iy={button:em,"variant-primary":"_variant-primary_aq4bi_9","variant-outline":"_variant-outline_aq4bi_12","size-md":"_size-md_aq4bi_37",prefixed:tm,suffixed:nm,title:rm,prefix:om,suffix:sm},im="_card_1wy9v_1",lm="_thumbnail_1wy9v_7",am="_image_1wy9v_14",um="_content_1wy9v_20",cm="_head_1wy9v_27",fm="_title_1wy9v_31",dm="_url_1wy9v_35",pm="_description_1wy9v_39",hm="_buttons_1wy9v_46",$y={card:im,thumbnail:lm,image:am,content:um,head:cm,title:fm,url:dm,description:pm,buttons:hm},gm=""+new URL("vault48.40538b94.png",import.meta.url).href,mm=""+new URL("orchid-map.2f398715.png",import.meta.url).href,ym=""+new URL("obsidian-garden.39e6dff3.png",import.meta.url).href,By=[{name:"Vault48",description:`Community blog with a long 13-year history, features photo, video and audio embedding.
 
 Beeing initially written with Drupal 5, went through refactoring to Laravel + Vue and then, nowadays works on React and Golang stack.`,pageUrl:"https://vault48.org",codeUrl:"https://github.com/muerwre/vault-frontend",image:gm,technologies:[te.React,te.ReactSSR,te.GoLang,te.Postgres]},{name:"Orchid Map",description:`Local cycling community Web Maps made with React, Leaflet, and Golang.
 
 Implements automatic route building with OSRM and map rasterization with canvas. Used by users in local cycling communities for ride sharing.`,pageUrl:"https://map.vault48.org",codeUrl:"https://github.com/muerwre/orchidmap-front",image:mm,technologies:[te.React,te.ReactSSR,te.GoLang,te.Postgres]},{name:"Obsidian Garden",description:`Frontend for personal knowledge database managed by Obsidian.md software.
 
-Made with nuxt3, nuxt-content plugin and some customizations. Deployed with drone-ci directly to github-pages.`,pageUrl:"https://muerwre.github.io",codeUrl:"https://github.com/muerwre/muerwre.github.io",image:ym,technologies:[te.React,te.ReactSSR,te.GoLang,te.Postgres]}],_m="_grid_1ng9c_1",Ny={grid:_m},Ft={layout:"content"},vm="_grid_1i19d_1",bm="_image_1i19d_16",wm="_desk_1i19d_25",Em="_title_1i19d_30",Cm="_subtitle_1i19d_42",xm="_text_1i19d_52",Rm="_buttons_1i19d_71",Hy={grid:vm,image:bm,desk:wm,title:Em,subtitle:Cm,text:xm,buttons:Rm},Sm=Me({mounted(){const e=document.querySelector(`.${this.$style.link}.${this.$style.active}`);!e||e==null||e.scrollIntoView({block:"center"})}}),km=Me({...Sm,__name:"LayoutMainMenuRow",props:{title:null,url:null,children:null,secondary:{type:Boolean}},setup(e){return(t,n)=>{var s;const r=eu,o=da;return((s=e.children)==null?void 0:s.length)||!e.url?(Le(),At("div",{key:0,class:gt([t.$style.container,{[t.$style.secondary]:e.secondary}])},[wr("div",{class:gt(t.$style.heading)},uo(e.title),3),wr("div",{class:gt(t.$style.children)},[(Le(!0),At(Pe,null,_o(e.children,i=>(Le(),Yt(r,{key:"item._path",title:i.title,url:i._path,children:i.children,secondary:""},null,8,["title","url","children"]))),128))],2)],2)):(Le(),At("div",{key:1,class:gt(t.$style.row)},[me(o,{to:e.url,class:gt(t.$style.link),exactActiveClass:t.$style.active},{default:Mr(()=>[Br(uo(e.title),1)]),_:1},8,["to","class","exactActiveClass"])],2))}}}),Pm="_container_192pu_1",Am="_secondary_192pu_4",Tm="_row_192pu_24",Om="_heading_192pu_48",Lm="_link_192pu_66",Mm="_active_192pu_81",Dm="_children_192pu_86",Im={container:Pm,secondary:Am,row:Tm,heading:Om,link:Lm,active:Mm,children:Dm},$m={$style:Im},eu=Ja(km,[["__cssModules",$m]]),jy=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),Bm="_row_1ufrv_1",Uy={row:Bm},Nm=Me({setup(e,{slots:t}){return()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),jo=(e,t,n)=>({default:()=>t?_e(e,t===!0?{}:t,n):_e(Nm,{},n)}),tu={content:()=>J(()=>import("./content.741e4176.js"),["content.741e4176.js","content.2c0ca7e0.css","LayoutThemeToggle.dfe6c45f.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutFooter.01993b55.js"],import.meta.url).then(e=>e.default||e),default:()=>J(()=>import("./default.2294e3b6.js"),["default.2294e3b6.js","default.98ce27f1.css","LayoutMainMenuToggle.46044f42.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","LayoutMainMenu.73696950.js","navigation.b4be76a2.js"],import.meta.url).then(e=>e.default||e)},Hm=Me({props:{name:String},async setup(e,t){const n=await tu[e.name]().then(r=>r.default||r);return()=>_e(n,{},t.slots)}}),nu=Me({props:{name:{type:[String,Boolean,Object],default:null}},setup(e,t){const n=nt("_route"),r=n===kn()?Fh():n,o=Re(()=>{var s,i;return(i=(s=we(e.name))!=null?s:r.meta.layout)!=null?i:"default"});return()=>{var l;const s=o.value&&o.value in tu,i=(l=r.meta.layoutTransition)!=null?l:Dp;return jo(Nr,s&&i,{default:()=>jo(Hm,s&&{key:o.value,name:o.value,hasTransition:!!i},t.slots).default()}).default()}}}),Fy=Object.freeze(Object.defineProperty({__proto__:null,default:nu},Symbol.toStringTag,{value:"Module"})),jm="_main_32es8_1",Um="_reference_32es8_10",Fm="_grid_32es8_14",qy={main:jm,reference:Um,grid:Fm},qt={layout:!1},Hi=[{name:"slug",path:"/:slug(.*)*",file:"/drone/src/pages/[...slug].vue",children:[],meta:Ut,alias:(Ut==null?void 0:Ut.alias)||[],redirect:(Ut==null?void 0:Ut.redirect)||void 0,component:()=>J(()=>import("./_...slug_.f8f430c2.js"),["_...slug_.f8f430c2.js","HomeReference.e315914b.js","navigation.b4be76a2.js"],import.meta.url).then(e=>e.default||e)},{name:"bio",path:"/bio",file:"/drone/src/pages/bio.vue",children:[],meta:Ft,alias:(Ft==null?void 0:Ft.alias)||[],redirect:(Ft==null?void 0:Ft.redirect)||void 0,component:()=>J(()=>import("./bio.e2cfb6e3.js"),["bio.e2cfb6e3.js","bio.917a4706.css","BioHeading.fc552931.js","BioSkills.1cbb9b74.js","BioSkillsCard.dcf6f14b.js","UiStars.0b5a97ee.js","IconStar.c0f2126f.js","UiCard.fe784af1.js","BioProjects.9611713f.js","BioProjectCard.4bb88134.js","IconsCode.51acf16d.js","UiActionButton.8de8506c.js","ArrowRight.4c99b7f0.js","BioCareer.96a55a4c.js"],import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",file:"/drone/src/pages/index.vue",children:[],meta:qt,alias:(qt==null?void 0:qt.alias)||[],redirect:(qt==null?void 0:qt.redirect)||void 0,component:()=>J(()=>import("./index.bfc362d6.js"),["index.bfc362d6.js","HomeHeader.5039a526.js","ArrowRight.4c99b7f0.js","UiActionButton.8de8506c.js","HomeContentList.3f25a970.js","navigation.b4be76a2.js"],import.meta.url).then(e=>e.default||e)}],qm={},dt={...qm},Vm=Ud(async e=>{var o;let t,n;if(!((o=e.meta)!=null&&o.validate))return;const r=([t,n]=ra(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t);return typeof r=="boolean"?r:sa(r)}),Km=[Vm],ao={};function zm(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){const l=o.includes(e.slice(s))?e.slice(s).length:1;let a=o.slice(l);return a[0]!=="/"&&(a="/"+a),ni(a,"")}return ni(n,e)+r+o}const Wm=It(async e=>{var _,C,R,y;let t,n,r=Sn().app.baseURL;dt.hashMode&&!r.includes("#")&&(r+="#");const o=(C=(_=dt.history)==null?void 0:_.call(dt,r))!=null?C:dt.hashMode?rh(r):_a(r),s=(y=(R=dt.routes)==null?void 0:R.call(dt,Hi))!=null?y:Hi,i=zm(r,window.location),l=jh({...dt,history:o,routes:s});e.vueApp.use(l);const a=go(l.currentRoute.value);l.afterEach((h,v)=>{a.value=v}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>a.value});const u=go(l.resolve(i)),c=()=>{u.value=l.currentRoute.value};e.hook("page:finish",c),l.afterEach((h,v)=>{var w,T,O,I;((T=(w=h.matched[0])==null?void 0:w.components)==null?void 0:T.default)===((I=(O=v.matched[0])==null?void 0:O.components)==null?void 0:I.default)&&c()});const f={};for(const h in u.value)f[h]=Re(()=>u.value[h]);e._route=rt(f),e._middleware=e._middleware||{global:[],named:{}};const p=Ur();try{[t,n]=ra(()=>l.isReady()),await t,n()}catch(h){kt(e,Dn,[h])}const g=ia("_layout");return l.beforeEach(async(h,v)=>{var T,O;h.meta=rt(h.meta),e.isHydrating&&(h.meta.layout=(T=g.value)!=null?T:h.meta.layout),e._processingMiddleware=!0;const w=new Set([...Km,...e._middleware.global]);for(const I of h.matched){const k=I.meta.middleware;if(!!k)if(Array.isArray(k))for(const F of k)w.add(F);else w.add(k)}for(const I of w){const k=typeof I=="string"?e._middleware.named[I]||await((O=ao[I])==null?void 0:O.call(ao).then(U=>U.default||U)):I;if(!k)throw new Error(`Unknown route middleware: '${I}'.`);const F=await kt(e,k,[h,v]);if(!e.payload.serverRendered&&e.isHydrating&&(F===!1||F instanceof Error)){const U=F||Oo({statusCode:404,statusMessage:`Page Not Found: ${i}`});return kt(e,Dn,[U])}if(F||F===!1)return F}}),l.afterEach(async h=>{delete e._processingMiddleware,!e.isHydrating&&p.value&&await kt(e,Hd),h.matched.length===0&&kt(e,Dn,[Oo({statusCode:404,fatal:!1,statusMessage:`Page not found: ${h.fullPath}`})])}),e.hooks.hookOnce("app:created",async()=>{try{await l.replace({...l.resolve(i),name:void 0,force:!0})}catch(h){kt(e,Dn,[h])}}),{provide:{router:l}}}),Qm="__NUXT_COLOR_MODE__",Vy="ColorScheme",Ym="nuxt-color-mode",pt=window[Qm],Jm=It(e=>{const t=ia("color-mode",()=>rt({preference:pt.preference,value:pt.value,unknown:!1,forced:!1})).value;Jt().afterEach(o=>{const s=o.meta.colorMode;s&&s!=="system"?(t.value=s,t.forced=!0):(s==="system"&&console.warn("You cannot force the colorMode to system at the page level."),t.forced=!1,t.value=t.preference==="system"?pt.getColorScheme():t.preference)});let n;function r(){n||!window.matchMedia||(n=window.matchMedia("(prefers-color-scheme: dark)"),n.addEventListener("change",()=>{!t.forced&&t.preference==="system"&&(t.value=pt.getColorScheme())}))}Ue(()=>t.preference,o=>{var s;t.forced||(o==="system"?(t.value=pt.getColorScheme(),r()):t.value=o,(s=window.localStorage)==null||s.setItem(Ym,o))},{immediate:!0}),Ue(()=>t.value,(o,s)=>{pt.removeColorScheme(s),pt.addColorScheme(o)}),t.preference==="system"&&r(),e.hook("app:mounted",()=>{t.unknown&&(t.preference=pt.preference,t.value=pt.value,t.unknown=!1)}),e.provide("colorMode",t)}),Gm=It(()=>{Sn().public.content.wsUrl&&J(()=>import("./web-socket.da2a25c3.js"),[],import.meta.url).then(({useContentWebSocket:t})=>t())}),Xm=It(e=>{!cp()||(e.hooks.hook("link:prefetch",t=>ci(t)),Jt().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await ci(t.path);!r||Object.assign(e.payload.data,r.data)}))}),Zm=["data-index"],ey=Me({__name:"masonry-wall",props:{columnWidth:{default:400},items:null,gap:{default:0},rtl:{type:Boolean,default:!1},ssrColumns:{default:0},scrollContainer:{default:null}},emits:["redraw","redrawSkip"],setup(e,{emit:t}){const n=e,{columnWidth:r,items:o,gap:s,rtl:i,ssrColumns:l,scrollContainer:a}=cl(n),u=Qe([]),c=Qe();function f(){const R=Math.floor((c.value.getBoundingClientRect().width+s.value)/(r.value+s.value));return R>0?R:1}function p(R){return[...new Array(R)].map(()=>[])}if(l.value>0){const R=p(l.value);o.value.forEach((y,h)=>R[h%l.value].push(h)),u.value=R}async function g(R){if(R>=o.value.length)return;await xn();const y=[...c.value.children];i.value&&y.reverse();const h=y.reduce((v,w)=>w.getBoundingClientRect().height<v.getBoundingClientRect().height?w:v);u.value[+h.dataset.index].push(R),await g(R+1)}async function _(R=!1){if(u.value.length===f()&&!R){t("redrawSkip");return}u.value=p(f());const y=a==null?void 0:a.value,h=y?y.scrollTop:window.scrollY;await g(0),y?y.scrollBy({top:h-y.scrollTop}):window.scrollTo({top:h}),t("redraw")}const C=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>_());return Gn(()=>{_(),C==null||C.observe(c.value)}),Rn(()=>C==null?void 0:C.unobserve(c.value)),Ue([o,i],()=>_(!0)),Ue([r,s],()=>_()),(R,y)=>(Le(),At("div",{ref_key:"wall",ref:c,class:"masonry-wall",style:dn({display:"flex",gap:`${we(s)}px`})},[(Le(!0),At(Pe,null,_o(u.value,(h,v)=>(Le(),At("div",{key:v,class:"masonry-column","data-index":v,style:dn({display:"flex","flex-basis":"0px","flex-direction":"column","flex-grow":1,height:["-webkit-max-content","-moz-max-content","max-content"],gap:`${we(s)}px`})},[(Le(!0),At(Pe,null,_o(h,w=>(Le(),At("div",{key:w,class:"masonry-item"},[xc(R.$slots,"default",{item:we(o)[w],index:w},()=>[Br(uo(we(o)[w]),1)])]))),128))],12,Zm))),128))],4))}}),ty=(()=>{const e=ey;return e.install=t=>{t.component("MasonryWall",e)},e})(),ny=It(e=>{e.vueApp.use(ty)}),ry=[bp,Bp,Hp,Wm,Jm,Gm,Xm,ny],ji={__name:"nuxt-root",setup(e){const t=re(()=>J(()=>import("./error-component.42d91046.js"),[],import.meta.url).then(s=>s.default||s)),n=xe(),r=n.deferHydration();cn("_route",kn()),n.hooks.callHookWith(s=>s.map(i=>i()),"vue:setup");const o=Ur();return kl((s,i,l)=>{n.hooks.callHook("vue:error",s,i,l).catch(a=>console.error("[nuxt] Error in `vue:error` hook",a)),jd(s)&&(s.fatal||s.unhandled)&&kt(n,Dn,[s])}),(s,i)=>{const l=Ir("App");return Le(),Yt(_l,{onResolve:we(r)},{default:Mr(()=>[we(o)?(Le(),Yt(we(t),{key:0,error:we(o)},null,8,["error"])):(Le(),Yt(l,{key:1}))]),_:1},8,["onResolve"])}}},oy=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),sy=(e,t)=>{var o;const n=t.route.matched.find(s=>{var i;return((i=s.components)==null?void 0:i.default)===t.Component.type}),r=(o=e!=null?e:n==null?void 0:n.meta.key)!=null?o:n&&oy(t.route,n);return typeof r=="function"?r(t.route):r},iy=(e,t)=>({default:()=>e?_e(hc,e===!0?{}:e,t):t}),ru=Me({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t}){const n=xe();return()=>_e(ka,{name:e.name,route:e.route,...t},{default:r=>{var l,a,u,c;if(!r.Component)return;const o=sy(e.pageKey,r),s=(a=(l=e.transition)!=null?l:r.route.meta.pageTransition)!=null?a:Ip,i=n.deferHydration();return jo(Nr,s,iy((c=(u=e.keepalive)!=null?u:r.route.meta.keepalive)!=null?c:$p,_e(_l,{onPending:()=>n.callHook("page:start",r.Component),onResolve:()=>n.callHook("page:finish",r.Component).finally(i)},{default:()=>_e(ly,{key:o,routeProps:r,pageKey:o,hasTransition:!!s})}))).default()}})}}),ly=Me({props:["routeProps","pageKey","hasTransition"],setup(e){const t=e.pageKey,n=e.routeProps.route,r={};for(const o in e.routeProps.route)r[o]=Re(()=>t===e.pageKey?e.routeProps.route[o]:n[o]);return cn("_route",rt(r)),()=>_e(e.routeProps.Component)}}),Ky=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"})),ay={};function uy(e,t){const n=ru,r=nu;return Le(),Yt(r,null,{default:Mr(()=>[me(n)]),_:1})}const cy=Ja(ay,[["render",uy]]);globalThis.$fetch||(globalThis.$fetch=dd.create({baseURL:hd()}));let Ui;const fy=Ad(ry);Ui=async function(){var o;const n=Boolean((o=window.__NUXT__)==null?void 0:o.serverRendered)?kf(ji):Sf(ji);n.component("App",cy);const r=Sd({vueApp:n});try{await Pd(r,fy)}catch(s){await r.callHook("app:error",s),r.payload.error=r.payload.error||s}try{await r.hooks.callHook("app:created",n),await r.hooks.callHook("app:beforeMount",n),n.mount("#__nuxt"),await r.hooks.callHook("app:mounted",n),await xn()}catch(s){await r.callHook("app:error",s),r.payload.error=r.payload.error||s}},Ui().catch(e=>{console.error("Error while mounting app:",e)});export{Ny as $,cl as A,ia as B,Ey as C,Od as D,aa as E,Cg as F,xg as G,bg as H,ua as I,Gn as J,wy as K,bt as L,Sn as M,_y as N,Pg as O,za as P,yy as Q,Pe as R,_o as S,Br as T,Cy as U,Ay as V,gy as W,My as X,Dy as Y,By as Z,J as _,Me as a,Ly as a0,$y as a1,Ty as a2,Oy as a3,Iy as a4,qy as a5,nu as a6,Hy as a7,Ir as a8,Uy as a9,eu as aa,yr as ab,xn as ac,fs as ad,Ii as ae,Py as af,tn as ag,ky as ah,xy as ai,Ry as aj,Sy as ak,by as al,Qh as am,$i as an,Xl as ao,py as ap,hy as aq,Vy as ar,vy as as,_g as at,vg as au,kg as av,Ag as aw,jy as ax,Fy as ay,Ky as az,da as b,Yt as c,re as d,At as e,wr as f,Vc as g,gt as h,me as i,my as j,Ja as k,cs as l,_e as m,dy as n,Le as o,Za as p,Qe as q,xc as r,xe as s,uo as t,we as u,kl as v,Mr as w,Rn as x,Re as y,pa as z};
+Made with nuxt3, nuxt-content plugin and some customizations. Deployed with drone-ci directly to github-pages.`,pageUrl:"https://muerwre.github.io",codeUrl:"https://github.com/muerwre/muerwre.github.io",image:ym,technologies:[te.React,te.ReactSSR,te.GoLang,te.Postgres]}],_m="_grid_1ng9c_1",Ny={grid:_m},Ft={layout:"content"},vm="_grid_1i19d_1",bm="_image_1i19d_16",wm="_desk_1i19d_25",Em="_title_1i19d_30",Cm="_subtitle_1i19d_42",xm="_text_1i19d_52",Rm="_buttons_1i19d_71",Hy={grid:vm,image:bm,desk:wm,title:Em,subtitle:Cm,text:xm,buttons:Rm},Sm=Me({mounted(){const e=document.querySelector(`.${this.$style.link}.${this.$style.active}`);!e||e==null||e.scrollIntoView({block:"center"})}}),km=Me({...Sm,__name:"LayoutMainMenuRow",props:{title:null,url:null,children:null,secondary:{type:Boolean}},setup(e){return(t,n)=>{var s;const r=eu,o=da;return((s=e.children)==null?void 0:s.length)||!e.url?(Le(),At("div",{key:0,class:gt([t.$style.container,{[t.$style.secondary]:e.secondary}])},[wr("div",{class:gt(t.$style.heading)},uo(e.title),3),wr("div",{class:gt(t.$style.children)},[(Le(!0),At(Pe,null,_o(e.children,i=>(Le(),Yt(r,{key:"item._path",title:i.title,url:i._path,children:i.children,secondary:""},null,8,["title","url","children"]))),128))],2)],2)):(Le(),At("div",{key:1,class:gt(t.$style.row)},[me(o,{to:e.url,class:gt(t.$style.link),exactActiveClass:t.$style.active},{default:Mr(()=>[Br(uo(e.title),1)]),_:1},8,["to","class","exactActiveClass"])],2))}}}),Pm="_container_192pu_1",Am="_secondary_192pu_4",Tm="_row_192pu_24",Om="_heading_192pu_48",Lm="_link_192pu_66",Mm="_active_192pu_81",Dm="_children_192pu_86",Im={container:Pm,secondary:Am,row:Tm,heading:Om,link:Lm,active:Mm,children:Dm},$m={$style:Im},eu=Ja(km,[["__cssModules",$m]]),jy=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),Bm="_row_1ufrv_1",Uy={row:Bm},Nm=Me({setup(e,{slots:t}){return()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),jo=(e,t,n)=>({default:()=>t?_e(e,t===!0?{}:t,n):_e(Nm,{},n)}),tu={content:()=>J(()=>import("./content.35f5cbec.js"),["content.35f5cbec.js","content.2c0ca7e0.css","LayoutThemeToggle.51894848.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutFooter.e4ddbcf6.js"],import.meta.url).then(e=>e.default||e),default:()=>J(()=>import("./default.677dc96c.js"),["default.677dc96c.js","default.98ce27f1.css","LayoutMainMenuToggle.a62ad69a.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","LayoutMainMenu.ced8ac76.js","navigation.e6541d9a.js"],import.meta.url).then(e=>e.default||e)},Hm=Me({props:{name:String},async setup(e,t){const n=await tu[e.name]().then(r=>r.default||r);return()=>_e(n,{},t.slots)}}),nu=Me({props:{name:{type:[String,Boolean,Object],default:null}},setup(e,t){const n=nt("_route"),r=n===kn()?Fh():n,o=Re(()=>{var s,i;return(i=(s=we(e.name))!=null?s:r.meta.layout)!=null?i:"default"});return()=>{var l;const s=o.value&&o.value in tu,i=(l=r.meta.layoutTransition)!=null?l:Dp;return jo(Nr,s&&i,{default:()=>jo(Hm,s&&{key:o.value,name:o.value,hasTransition:!!i},t.slots).default()}).default()}}}),Fy=Object.freeze(Object.defineProperty({__proto__:null,default:nu},Symbol.toStringTag,{value:"Module"})),jm="_main_32es8_1",Um="_reference_32es8_10",Fm="_grid_32es8_14",qy={main:jm,reference:Um,grid:Fm},qt={layout:!1},Hi=[{name:"slug",path:"/:slug(.*)*",file:"/drone/src/pages/[...slug].vue",children:[],meta:Ut,alias:(Ut==null?void 0:Ut.alias)||[],redirect:(Ut==null?void 0:Ut.redirect)||void 0,component:()=>J(()=>import("./_...slug_.59847726.js"),["_...slug_.59847726.js","HomeReference.dcdfc2c4.js","navigation.e6541d9a.js"],import.meta.url).then(e=>e.default||e)},{name:"bio",path:"/bio",file:"/drone/src/pages/bio.vue",children:[],meta:Ft,alias:(Ft==null?void 0:Ft.alias)||[],redirect:(Ft==null?void 0:Ft.redirect)||void 0,component:()=>J(()=>import("./bio.3c0a5659.js"),["bio.3c0a5659.js","bio.917a4706.css","BioHeading.40d2dead.js","BioSkills.7301a037.js","BioSkillsCard.24be210d.js","UiStars.ad96952a.js","IconStar.67abd07c.js","UiCard.c1974320.js","BioProjects.7d47d393.js","BioProjectCard.168802cd.js","IconsCode.118b44a8.js","UiActionButton.d5ab622f.js","ArrowRight.5a505e4f.js","BioCareer.79116453.js"],import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",file:"/drone/src/pages/index.vue",children:[],meta:qt,alias:(qt==null?void 0:qt.alias)||[],redirect:(qt==null?void 0:qt.redirect)||void 0,component:()=>J(()=>import("./index.3173d051.js"),["index.3173d051.js","HomeHeader.0c1c0a2b.js","ArrowRight.5a505e4f.js","UiActionButton.d5ab622f.js","HomeContentList.914b1d24.js","navigation.e6541d9a.js"],import.meta.url).then(e=>e.default||e)}],qm={},dt={...qm},Vm=Ud(async e=>{var o;let t,n;if(!((o=e.meta)!=null&&o.validate))return;const r=([t,n]=ra(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t);return typeof r=="boolean"?r:sa(r)}),Km=[Vm],ao={};function zm(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){const l=o.includes(e.slice(s))?e.slice(s).length:1;let a=o.slice(l);return a[0]!=="/"&&(a="/"+a),ni(a,"")}return ni(n,e)+r+o}const Wm=It(async e=>{var _,C,R,y;let t,n,r=Sn().app.baseURL;dt.hashMode&&!r.includes("#")&&(r+="#");const o=(C=(_=dt.history)==null?void 0:_.call(dt,r))!=null?C:dt.hashMode?rh(r):_a(r),s=(y=(R=dt.routes)==null?void 0:R.call(dt,Hi))!=null?y:Hi,i=zm(r,window.location),l=jh({...dt,history:o,routes:s});e.vueApp.use(l);const a=go(l.currentRoute.value);l.afterEach((h,v)=>{a.value=v}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>a.value});const u=go(l.resolve(i)),c=()=>{u.value=l.currentRoute.value};e.hook("page:finish",c),l.afterEach((h,v)=>{var w,T,O,I;((T=(w=h.matched[0])==null?void 0:w.components)==null?void 0:T.default)===((I=(O=v.matched[0])==null?void 0:O.components)==null?void 0:I.default)&&c()});const f={};for(const h in u.value)f[h]=Re(()=>u.value[h]);e._route=rt(f),e._middleware=e._middleware||{global:[],named:{}};const p=Ur();try{[t,n]=ra(()=>l.isReady()),await t,n()}catch(h){kt(e,Dn,[h])}const g=ia("_layout");return l.beforeEach(async(h,v)=>{var T,O;h.meta=rt(h.meta),e.isHydrating&&(h.meta.layout=(T=g.value)!=null?T:h.meta.layout),e._processingMiddleware=!0;const w=new Set([...Km,...e._middleware.global]);for(const I of h.matched){const k=I.meta.middleware;if(!!k)if(Array.isArray(k))for(const F of k)w.add(F);else w.add(k)}for(const I of w){const k=typeof I=="string"?e._middleware.named[I]||await((O=ao[I])==null?void 0:O.call(ao).then(U=>U.default||U)):I;if(!k)throw new Error(`Unknown route middleware: '${I}'.`);const F=await kt(e,k,[h,v]);if(!e.payload.serverRendered&&e.isHydrating&&(F===!1||F instanceof Error)){const U=F||Oo({statusCode:404,statusMessage:`Page Not Found: ${i}`});return kt(e,Dn,[U])}if(F||F===!1)return F}}),l.afterEach(async h=>{delete e._processingMiddleware,!e.isHydrating&&p.value&&await kt(e,Hd),h.matched.length===0&&kt(e,Dn,[Oo({statusCode:404,fatal:!1,statusMessage:`Page not found: ${h.fullPath}`})])}),e.hooks.hookOnce("app:created",async()=>{try{await l.replace({...l.resolve(i),name:void 0,force:!0})}catch(h){kt(e,Dn,[h])}}),{provide:{router:l}}}),Qm="__NUXT_COLOR_MODE__",Vy="ColorScheme",Ym="nuxt-color-mode",pt=window[Qm],Jm=It(e=>{const t=ia("color-mode",()=>rt({preference:pt.preference,value:pt.value,unknown:!1,forced:!1})).value;Jt().afterEach(o=>{const s=o.meta.colorMode;s&&s!=="system"?(t.value=s,t.forced=!0):(s==="system"&&console.warn("You cannot force the colorMode to system at the page level."),t.forced=!1,t.value=t.preference==="system"?pt.getColorScheme():t.preference)});let n;function r(){n||!window.matchMedia||(n=window.matchMedia("(prefers-color-scheme: dark)"),n.addEventListener("change",()=>{!t.forced&&t.preference==="system"&&(t.value=pt.getColorScheme())}))}Ue(()=>t.preference,o=>{var s;t.forced||(o==="system"?(t.value=pt.getColorScheme(),r()):t.value=o,(s=window.localStorage)==null||s.setItem(Ym,o))},{immediate:!0}),Ue(()=>t.value,(o,s)=>{pt.removeColorScheme(s),pt.addColorScheme(o)}),t.preference==="system"&&r(),e.hook("app:mounted",()=>{t.unknown&&(t.preference=pt.preference,t.value=pt.value,t.unknown=!1)}),e.provide("colorMode",t)}),Gm=It(()=>{Sn().public.content.wsUrl&&J(()=>import("./web-socket.26355217.js"),[],import.meta.url).then(({useContentWebSocket:t})=>t())}),Xm=It(e=>{!cp()||(e.hooks.hook("link:prefetch",t=>ci(t)),Jt().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await ci(t.path);!r||Object.assign(e.payload.data,r.data)}))}),Zm=["data-index"],ey=Me({__name:"masonry-wall",props:{columnWidth:{default:400},items:null,gap:{default:0},rtl:{type:Boolean,default:!1},ssrColumns:{default:0},scrollContainer:{default:null}},emits:["redraw","redrawSkip"],setup(e,{emit:t}){const n=e,{columnWidth:r,items:o,gap:s,rtl:i,ssrColumns:l,scrollContainer:a}=cl(n),u=Qe([]),c=Qe();function f(){const R=Math.floor((c.value.getBoundingClientRect().width+s.value)/(r.value+s.value));return R>0?R:1}function p(R){return[...new Array(R)].map(()=>[])}if(l.value>0){const R=p(l.value);o.value.forEach((y,h)=>R[h%l.value].push(h)),u.value=R}async function g(R){if(R>=o.value.length)return;await xn();const y=[...c.value.children];i.value&&y.reverse();const h=y.reduce((v,w)=>w.getBoundingClientRect().height<v.getBoundingClientRect().height?w:v);u.value[+h.dataset.index].push(R),await g(R+1)}async function _(R=!1){if(u.value.length===f()&&!R){t("redrawSkip");return}u.value=p(f());const y=a==null?void 0:a.value,h=y?y.scrollTop:window.scrollY;await g(0),y?y.scrollBy({top:h-y.scrollTop}):window.scrollTo({top:h}),t("redraw")}const C=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>_());return Gn(()=>{_(),C==null||C.observe(c.value)}),Rn(()=>C==null?void 0:C.unobserve(c.value)),Ue([o,i],()=>_(!0)),Ue([r,s],()=>_()),(R,y)=>(Le(),At("div",{ref_key:"wall",ref:c,class:"masonry-wall",style:dn({display:"flex",gap:`${we(s)}px`})},[(Le(!0),At(Pe,null,_o(u.value,(h,v)=>(Le(),At("div",{key:v,class:"masonry-column","data-index":v,style:dn({display:"flex","flex-basis":"0px","flex-direction":"column","flex-grow":1,height:["-webkit-max-content","-moz-max-content","max-content"],gap:`${we(s)}px`})},[(Le(!0),At(Pe,null,_o(h,w=>(Le(),At("div",{key:w,class:"masonry-item"},[xc(R.$slots,"default",{item:we(o)[w],index:w},()=>[Br(uo(we(o)[w]),1)])]))),128))],12,Zm))),128))],4))}}),ty=(()=>{const e=ey;return e.install=t=>{t.component("MasonryWall",e)},e})(),ny=It(e=>{e.vueApp.use(ty)}),ry=[bp,Bp,Hp,Wm,Jm,Gm,Xm,ny],ji={__name:"nuxt-root",setup(e){const t=re(()=>J(()=>import("./error-component.e7f78446.js"),[],import.meta.url).then(s=>s.default||s)),n=xe(),r=n.deferHydration();cn("_route",kn()),n.hooks.callHookWith(s=>s.map(i=>i()),"vue:setup");const o=Ur();return kl((s,i,l)=>{n.hooks.callHook("vue:error",s,i,l).catch(a=>console.error("[nuxt] Error in `vue:error` hook",a)),jd(s)&&(s.fatal||s.unhandled)&&kt(n,Dn,[s])}),(s,i)=>{const l=Ir("App");return Le(),Yt(_l,{onResolve:we(r)},{default:Mr(()=>[we(o)?(Le(),Yt(we(t),{key:0,error:we(o)},null,8,["error"])):(Le(),Yt(l,{key:1}))]),_:1},8,["onResolve"])}}},oy=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),sy=(e,t)=>{var o;const n=t.route.matched.find(s=>{var i;return((i=s.components)==null?void 0:i.default)===t.Component.type}),r=(o=e!=null?e:n==null?void 0:n.meta.key)!=null?o:n&&oy(t.route,n);return typeof r=="function"?r(t.route):r},iy=(e,t)=>({default:()=>e?_e(hc,e===!0?{}:e,t):t}),ru=Me({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t}){const n=xe();return()=>_e(ka,{name:e.name,route:e.route,...t},{default:r=>{var l,a,u,c;if(!r.Component)return;const o=sy(e.pageKey,r),s=(a=(l=e.transition)!=null?l:r.route.meta.pageTransition)!=null?a:Ip,i=n.deferHydration();return jo(Nr,s,iy((c=(u=e.keepalive)!=null?u:r.route.meta.keepalive)!=null?c:$p,_e(_l,{onPending:()=>n.callHook("page:start",r.Component),onResolve:()=>n.callHook("page:finish",r.Component).finally(i)},{default:()=>_e(ly,{key:o,routeProps:r,pageKey:o,hasTransition:!!s})}))).default()}})}}),ly=Me({props:["routeProps","pageKey","hasTransition"],setup(e){const t=e.pageKey,n=e.routeProps.route,r={};for(const o in e.routeProps.route)r[o]=Re(()=>t===e.pageKey?e.routeProps.route[o]:n[o]);return cn("_route",rt(r)),()=>_e(e.routeProps.Component)}}),Ky=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"})),ay={};function uy(e,t){const n=ru,r=nu;return Le(),Yt(r,null,{default:Mr(()=>[me(n)]),_:1})}const cy=Ja(ay,[["render",uy]]);globalThis.$fetch||(globalThis.$fetch=dd.create({baseURL:hd()}));let Ui;const fy=Ad(ry);Ui=async function(){var o;const n=Boolean((o=window.__NUXT__)==null?void 0:o.serverRendered)?kf(ji):Sf(ji);n.component("App",cy);const r=Sd({vueApp:n});try{await Pd(r,fy)}catch(s){await r.callHook("app:error",s),r.payload.error=r.payload.error||s}try{await r.hooks.callHook("app:created",n),await r.hooks.callHook("app:beforeMount",n),n.mount("#__nuxt"),await r.hooks.callHook("app:mounted",n),await xn()}catch(s){await r.callHook("app:error",s),r.payload.error=r.payload.error||s}},Ui().catch(e=>{console.error("Error while mounting app:",e)});export{Ny as $,cl as A,ia as B,Ey as C,Od as D,aa as E,Cg as F,xg as G,bg as H,ua as I,Gn as J,wy as K,bt as L,Sn as M,_y as N,Pg as O,za as P,yy as Q,Pe as R,_o as S,Br as T,Cy as U,Ay as V,gy as W,My as X,Dy as Y,By as Z,J as _,Me as a,Ly as a0,$y as a1,Ty as a2,Oy as a3,Iy as a4,qy as a5,nu as a6,Hy as a7,Ir as a8,Uy as a9,eu as aa,yr as ab,xn as ac,fs as ad,Ii as ae,Py as af,tn as ag,ky as ah,xy as ai,Ry as aj,Sy as ak,by as al,Qh as am,$i as an,Xl as ao,py as ap,hy as aq,Vy as ar,vy as as,_g as at,vg as au,kg as av,Ag as aw,jy as ax,Fy as ay,Ky as az,da as b,Yt as c,re as d,At as e,wr as f,Vc as g,gt as h,me as i,my as j,Ja as k,cs as l,_e as m,dy as n,Le as o,Za as p,Qe as q,xc as r,xe as s,uo as t,we as u,kl as v,Mr as w,Rn as x,Re as y,pa as z};
diff --git a/nuxt/error-404.501876c3.js b/nuxt/error-404.ea72cef8.js
similarity index 97%
rename from nuxt/error-404.501876c3.js
rename to nuxt/error-404.ea72cef8.js
index 86b5bde..5e12500 100644
--- a/nuxt/error-404.501876c3.js
+++ b/nuxt/error-404.ea72cef8.js
@@ -1 +1 @@
-import{k as a,z as n,o as r,e as l,f as e,t as s,i as d,w as c,T as p,b as f,ap as x,aq as h}from"./entry.f8ff8132.js";const m=t=>(x("data-v-07b7f6e4"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[d(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-07b7f6e4"]]);export{z as default};
+import{k as a,z as n,o as r,e as l,f as e,t as s,i as d,w as c,T as p,b as f,ap as x,aq as h}from"./entry.67e3e390.js";const m=t=>(x("data-v-07b7f6e4"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[d(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-07b7f6e4"]]);export{z as default};
diff --git a/nuxt/error-500.20fe697a.js b/nuxt/error-500.ee200fa4.js
similarity index 96%
rename from nuxt/error-500.20fe697a.js
rename to nuxt/error-500.ee200fa4.js
index 7cabb85..9e28fe1 100644
--- a/nuxt/error-500.20fe697a.js
+++ b/nuxt/error-500.ee200fa4.js
@@ -1 +1 @@
-import{k as i,z as a,o as r,e as n,f as e,t as s,ap as l,aq as d}from"./entry.f8ff8132.js";const c=t=>(l("data-v-73785db7"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(b,[["__scopeId","data-v-73785db7"]]);export{w as default};
+import{k as i,z as a,o as r,e as n,f as e,t as s,ap as l,aq as d}from"./entry.67e3e390.js";const c=t=>(l("data-v-73785db7"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(b,[["__scopeId","data-v-73785db7"]]);export{w as default};
diff --git a/nuxt/error-component.42d91046.js b/nuxt/error-component.e7f78446.js
similarity index 65%
rename from nuxt/error-component.42d91046.js
rename to nuxt/error-component.e7f78446.js
index e41f48a..ce7979f 100644
--- a/nuxt/error-component.42d91046.js
+++ b/nuxt/error-component.e7f78446.js
@@ -1,3 +1,3 @@
-import{d as o,_ as c,o as g,c as E,n as k,g as P,u as s}from"./entry.f8ff8132.js";const v={__name:"nuxt-error-page",props:{error:Object},setup(u){var n;const{error:t}=u;(t.stack||"").split(`
+import{d as o,_ as c,o as g,c as E,n as k,g as P,u as s}from"./entry.67e3e390.js";const v={__name:"nuxt-error-page",props:{error:Object},setup(u){var n;const{error:t}=u;(t.stack||"").split(`
 `).splice(1).map(e=>({text:e.replace("webpack:/","").replace(".vue",".js").trim(),internal:e.includes("node_modules")&&!e.includes(".cache")||e.includes("internal")||e.includes("new Promise")})).map(e=>`<span class="stack${e.internal?" internal":""}">${e.text}</span>`).join(`
-`);const r=Number(t.statusCode||500),a=r===404,i=(n=t.statusMessage)!=null?n:a?"Page Not Found":"Internal Server Error",p=t.message||t.toString(),_=void 0,d=o(()=>c(()=>import("./error-404.501876c3.js"),["error-404.501876c3.js","error-404.18ced855.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(e=>e.default||e)),l=o(()=>c(()=>import("./error-500.20fe697a.js"),["error-500.20fe697a.js","error-500.e60962de.css","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(e=>e.default||e)),m=a?d:l;return(e,f)=>(g(),E(s(m),k(P({statusCode:s(r),statusMessage:s(i),description:s(p),stack:s(_)})),null,16))}},h=v;export{h as default};
+`);const r=Number(t.statusCode||500),a=r===404,i=(n=t.statusMessage)!=null?n:a?"Page Not Found":"Internal Server Error",p=t.message||t.toString(),_=void 0,d=o(()=>c(()=>import("./error-404.ea72cef8.js"),["error-404.ea72cef8.js","error-404.18ced855.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(e=>e.default||e)),l=o(()=>c(()=>import("./error-500.ee200fa4.js"),["error-500.ee200fa4.js","error-500.e60962de.css","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(e=>e.default||e)),m=a?d:l;return(e,f)=>(g(),E(s(m),k(P({statusCode:s(r),statusMessage:s(i),description:s(p),stack:s(_)})),null,16))}},h=v;export{h as default};
diff --git a/nuxt/howdy.824e8e62.svg b/nuxt/howdy.386ec27b.svg
similarity index 99%
rename from nuxt/howdy.824e8e62.svg
rename to nuxt/howdy.386ec27b.svg
index 591c3d6..7e045ac 100644
--- a/nuxt/howdy.824e8e62.svg
+++ b/nuxt/howdy.386ec27b.svg
@@ -25,15 +25,15 @@
      inkscape:deskcolor="#505050"
      inkscape:document-units="px"
      showgrid="false"
-     inkscape:zoom="1.3975124"
-     inkscape:cx="385.68531"
-     inkscape:cy="174.23817"
+     inkscape:zoom="1.6099906"
+     inkscape:cx="131.67779"
+     inkscape:cy="87.267591"
      inkscape:window-width="1440"
      inkscape:window-height="847"
      inkscape:window-x="0"
      inkscape:window-y="25"
      inkscape:window-maximized="1"
-     inkscape:current-layer="layer1" /><defs
+     inkscape:current-layer="g409" /><defs
      id="defs520" /><g
      inkscape:label="Слой 1"
      inkscape:groupmode="layer"
@@ -213,7 +213,7 @@
            id="path17981"
            sodipodi:nodetypes="ccccccccc" /><path
            id="path24683"
-           style="fill:#e9c6af;fill-opacity:1;stroke:none;stroke-width:0.290724;stroke-linecap:round;stroke-dasharray:none"
+           style="fill:#cfab93;fill-opacity:1;stroke:none;stroke-width:0.290724;stroke-linecap:round;stroke-dasharray:none"
            d="m 84.235436,17.045652 1.160238,2.448221 -0.106183,0.310884 0.02947,2.55e-4 -0.0414,0.03595 -0.01777,0.05147 -0.03868,-0.0027 -0.198337,0.170816 -0.695423,-0.0066 -0.330095,0.06109 -0.310354,-0.165644 0.377309,-0.277305 0.399206,0.132803 0.396209,2.54e-4 0.177438,-0.260699 -0.906095,-2.262792 z" /><use
            x="0"
            y="0"
diff --git a/nuxt/index.bfc362d6.js b/nuxt/index.3173d051.js
similarity index 53%
rename from nuxt/index.bfc362d6.js
rename to nuxt/index.3173d051.js
index 9407743..86e6d5e 100644
--- a/nuxt/index.bfc362d6.js
+++ b/nuxt/index.3173d051.js
@@ -1 +1 @@
-import r from"./HomeHeader.5039a526.js";import _ from"./HomeContentList.3f25a970.js";import{k as i,o as m,c as l,w as p,a5 as d,a6 as u,f as e,i as s,h as o}from"./entry.f8ff8132.js";import"./ArrowRight.4c99b7f0.js";import"./UiActionButton.8de8506c.js";import"./navigation.b4be76a2.js";const f={scrollToTop:!0,head(){return{title:"Obsidian Garden"}}},h=e("h1",null,"Cheatsheet",-1);function $(t,y,C,k,B,H){const n=r,a=_,c=u;return m(),l(c,{name:"content"},{default:p(()=>[e("main",{class:o(t.$style.main)},[s(n),e("div",{class:o(t.$style.reference)},[h,e("div",{class:o(t.$style.grid)},[s(a)],2)],2)],2)]),_:1})}const x={$style:d},V=i(f,[["render",$],["__cssModules",x]]);export{V as default};
+import r from"./HomeHeader.0c1c0a2b.js";import _ from"./HomeContentList.914b1d24.js";import{k as i,o as m,c as l,w as p,a5 as d,a6 as u,f as e,i as s,h as o}from"./entry.67e3e390.js";import"./ArrowRight.5a505e4f.js";import"./UiActionButton.d5ab622f.js";import"./navigation.e6541d9a.js";const f={scrollToTop:!0,head(){return{title:"Obsidian Garden"}}},h=e("h1",null,"Cheatsheet",-1);function $(t,y,C,k,B,H){const n=r,a=_,c=u;return m(),l(c,{name:"content"},{default:p(()=>[e("main",{class:o(t.$style.main)},[s(n),e("div",{class:o(t.$style.reference)},[h,e("div",{class:o(t.$style.grid)},[s(a)],2)],2)],2)]),_:1})}const x={$style:d},V=i(f,[["render",$],["__cssModules",x]]);export{V as default};
diff --git a/nuxt/navigation.b4be76a2.js b/nuxt/navigation.e6541d9a.js
similarity index 69%
rename from nuxt/navigation.b4be76a2.js
rename to nuxt/navigation.e6541d9a.js
index a12ad58..33047bd 100644
--- a/nuxt/navigation.b4be76a2.js
+++ b/nuxt/navigation.e6541d9a.js
@@ -1 +1 @@
-import{F as i,E as r,G as s,_ as p,H as f,I as h}from"./entry.f8ff8132.js";const m=async e=>{let t=e;typeof(t==null?void 0:t.params)=="function"&&(t=t.params());const n=i(t?`/navigation/${r(t)}.json`:"/navigation");if(s())return(await p(()=>import("./client-db.4629eda6.js"),["client-db.4629eda6.js","entry.f8ff8132.js","entry.97aae52d.css"],import.meta.url).then(o=>o.generateNavigation))(t||{});const a=await $fetch(n,{method:"GET",responseType:"json",params:{_params:f(t||{}),previewToken:h("previewToken").value}});if(typeof a=="string"&&a.startsWith("<!DOCTYPE html>"))throw new Error("Not found");return a};export{m as f};
+import{F as i,E as r,G as s,_ as p,H as f,I as h}from"./entry.67e3e390.js";const m=async e=>{let t=e;typeof(t==null?void 0:t.params)=="function"&&(t=t.params());const n=i(t?`/navigation/${r(t)}.json`:"/navigation");if(s())return(await p(()=>import("./client-db.438de858.js"),["client-db.438de858.js","entry.67e3e390.js","entry.97aae52d.css"],import.meta.url).then(o=>o.generateNavigation))(t||{});const a=await $fetch(n,{method:"GET",responseType:"json",params:{_params:f(t||{}),previewToken:h("previewToken").value}});if(typeof a=="string"&&a.startsWith("<!DOCTYPE html>"))throw new Error("Not found");return a};export{m as f};
diff --git a/nuxt/web-socket.da2a25c3.js b/nuxt/web-socket.26355217.js
similarity index 92%
rename from nuxt/web-socket.da2a25c3.js
rename to nuxt/web-socket.26355217.js
index 1ab6c19..e6c56ce 100644
--- a/nuxt/web-socket.da2a25c3.js
+++ b/nuxt/web-socket.26355217.js
@@ -1 +1 @@
-import{M as u,N as i}from"./entry.f8ff8132.js";const n={log:(...t)=>console.log("[Content]",...t),warn:(...t)=>console.warn("[Content]",...t)};let e;function g(){if(!window.WebSocket){n.warn("Could not enable hot reload, your browser does not support WebSocket.");return}const t=o=>{try{if(!JSON.parse(o.data))return;i()}catch{}},s=()=>n.log("WS connected!"),a=o=>{switch(o.code){case"ECONNREFUSED":r(!0);break;default:n.warn("WS Error:",o);break}},l=o=>{o.code===1e3||o.code===1005?n.log("WS closed!"):r(!0)},r=(o=!1)=>{if(o){n.log("WS reconnecting.."),setTimeout(r,1e3);return}if(e){try{e.close()}catch{}e=void 0}const c=`${u().public.content.wsUrl}ws`;n.log(`WS connect to ${c}`),e=new WebSocket(c),e.onopen=s,e.onmessage=t,e.onerror=a,e.onclose=l};return r(),{connect:r}}export{g as useContentWebSocket};
+import{M as u,N as i}from"./entry.67e3e390.js";const n={log:(...t)=>console.log("[Content]",...t),warn:(...t)=>console.warn("[Content]",...t)};let e;function g(){if(!window.WebSocket){n.warn("Could not enable hot reload, your browser does not support WebSocket.");return}const t=o=>{try{if(!JSON.parse(o.data))return;i()}catch{}},s=()=>n.log("WS connected!"),a=o=>{switch(o.code){case"ECONNREFUSED":r(!0);break;default:n.warn("WS Error:",o);break}},l=o=>{o.code===1e3||o.code===1005?n.log("WS closed!"):r(!0)},r=(o=!1)=>{if(o){n.log("WS reconnecting.."),setTimeout(r,1e3);return}if(e){try{e.close()}catch{}e=void 0}const c=`${u().public.content.wsUrl}ws`;n.log(`WS connect to ${c}`),e=new WebSocket(c),e.onopen=s,e.onmessage=t,e.onerror=a,e.onclose=l};return r(),{connect:r}}export{g as useContentWebSocket};
diff --git a/nuxt/welcome.a5e8ab71.js b/nuxt/welcome.2130072a.js
similarity index 95%
rename from nuxt/welcome.a5e8ab71.js
rename to nuxt/welcome.2130072a.js
index e5ce5ec..6238369 100644
--- a/nuxt/welcome.a5e8ab71.js
+++ b/nuxt/welcome.2130072a.js
@@ -1 +1 @@
-import{k as i,z as s,o as l,e as n,f as t,t as a,W as r,ap as d,aq as c}from"./entry.f8ff8132.js";import"./ContentNavigation.0dd1020e.js";import"./navigation.b4be76a2.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.4822352c.js";import"./ContentSlot.1089f928.js";import"./DocumentDrivenEmpty.5bf46e6a.js";import"./DocumentDrivenNotFound.ef779f55.js";import"./Markdown.b05e9d28.js";const o=e=>(d("data-v-25102a06"),e=e(),c(),e),h={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white min-h-screen place-content-center flex flex-col items-center justify-center p-8 text-sm sm:text-base"},p={class:"grid grid-cols-3 gap-4 md:gap-8 max-w-5xl w-full z-20"},C={class:"flex justify-between items-end col-span-3"},f=r('<a href="https://v3.nuxtjs.org" target="_blank" rel="noopener" class="nuxt-logo" data-v-25102a06><svg viewBox="0 0 221 65" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-40 text-black dark:text-white" data-v-25102a06><g clip-path="url(#a)" data-v-25102a06><path fill="currentColor" d="M82.5623 18.5705h7.3017l15.474 24.7415V18.5705h6.741v35.0576h-7.252L89.3025 28.938v24.6901h-6.7402V18.5705ZM142.207 53.628h-6.282v-3.916c-1.429 2.7559-4.339 4.3076-8.015 4.3076-5.822 0-9.603-4.1069-9.603-10.0175V28.3847h6.282v14.3251c0 3.4558 2.146 5.8592 5.362 5.8592 3.524 0 5.974-2.7044 5.974-6.4099V28.3847h6.282V53.628ZM164.064 53.2289l-6.026-8.4144-6.027 8.4144h-6.69l9.296-13.1723-8.58-12.0709h6.843l5.158 7.2641 5.106-7.2641h6.895l-8.632 12.0709 9.295 13.1723h-6.638ZM183.469 20.7726v7.6116h7.149v5.1593h-7.149v12.5311c0 .4208.17.8245.473 1.1223.303.2978.715.4654 1.144.4661h5.532v5.9547h-4.137c-5.617 0-9.293-3.2062-9.293-8.8109V33.5484h-5.056v-5.1642h3.172c1.479 0 2.34-.8639 2.34-2.2932v-5.3184h5.825Z" data-v-25102a06></path><path fill-rule="evenodd" clip-rule="evenodd" d="M30.1185 11.5456c-1.8853-3.24168-6.5987-3.24169-8.484 0L1.08737 46.8747c-1.885324 3.2417.47133 7.2938 4.24199 7.2938H21.3695c-1.6112-1.4081-2.2079-3.8441-.9886-5.9341l15.5615-26.675-5.8239-10.0138Z" fill="#80EEC0" data-v-25102a06></path><path d="M43.1374 19.2952c1.5603-2.6523 5.461-2.6523 7.0212 0l17.0045 28.9057c1.5603 2.6522-.39 5.9676-3.5106 5.9676h-34.009c-3.1206 0-5.0709-3.3154-3.5106-5.9676l17.0045-28.9057ZM209.174 53.8005H198.483c0-1.8514.067-3.4526 0-6.0213h10.641c1.868 0 3.353.1001 4.354-.934 1-1.0341 1.501-2.3351 1.501-3.9029 0-1.8347-.667-3.2191-2.002-4.1532-1.301-.9674-2.985-1.4511-5.054-1.4511h-2.601v-5.2539h2.652c1.701 0 3.119-.4003 4.253-1.2009 1.134-.8006 1.701-1.9849 1.701-3.5527 0-1.301-.434-2.3351-1.301-3.1023-.834-.8007-2.001-1.201-3.503-1.201-1.634 0-2.918.4837-3.853 1.4511-.9.9674-1.401 2.1517-1.501 3.5527h-6.254c.133-3.2358 1.251-5.7877 3.352-7.6558 2.135-1.868 4.887-2.8021 8.256-2.8021 2.402 0 4.42.4337 6.055 1.301 1.668.834 2.919 1.9515 3.753 3.3525.867 1.4011 1.301 2.9523 1.301 4.6536 0 1.9681-.551 3.636-1.651 5.0037-1.068 1.3344-2.402 2.235-4.004 2.7021 1.969.4003 3.57 1.3677 4.804 2.9022 1.234 1.5011 1.852 3.4025 1.852 5.7043 0 1.9347-.468 3.7028-1.402 5.304-.934 1.6012-2.301 2.8855-4.103 3.8529-1.768.9674-3.953 1.4511-6.555 1.4511Z" fill="#00DC82" data-v-25102a06></path></g><defs data-v-25102a06><clipPath id="a" data-v-25102a06><path fill="#fff" d="M0 0h221v65H0z" data-v-25102a06></path></clipPath></defs></svg></a>',1),g=["href","textContent"],u=o(()=>t("div",{class:"spotlight-wrapper"},[t("div",{class:"fixed z-10 left-0 right-0 spotlight"})],-1)),v=r('<div class="col-span-3 rounded p-4 flex flex-col gradient-border" data-v-25102a06><div class="flex justify-between items-center mb-4" data-v-25102a06><h1 class="font-medium text-2xl" data-v-25102a06>Get Started</h1><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-25102a06><path d="M29.4284 31.095C26.9278 33.5955 23.5364 35.0003 20.0001 35.0003C16.4637 35.0003 13.0723 33.5955 10.5717 31.095C8.07118 28.5944 6.66638 25.203 6.66638 21.6667C6.66638 18.1304 8.07118 14.7389 10.5717 12.2383C10.5717 12.2383 11.6667 15 15.0001 16.6667C15.0001 13.3333 15.8334 8.33333 19.9767 5C23.3334 8.33333 26.8167 9.62833 29.4267 12.2383C30.667 13.475 31.6506 14.9446 32.321 16.5626C32.9915 18.1806 33.3355 19.9152 33.3334 21.6667C33.3357 23.418 32.9919 25.1525 32.3218 26.7705C31.6516 28.3886 30.6683 29.8582 29.4284 31.095V31.095Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-25102a06></path><path d="M16.465 26.8683C17.0456 27.4491 17.7604 27.878 18.5462 28.1169C19.3319 28.3559 20.1644 28.3976 20.9701 28.2385C21.7758 28.0793 22.5299 27.7241 23.1657 27.2043C23.8015 26.6845 24.2995 26.016 24.6157 25.2581C24.9318 24.5001 25.0564 23.6759 24.9784 22.8584C24.9004 22.0408 24.6222 21.2551 24.1684 20.5705C23.7146 19.886 23.0992 19.3238 22.3766 18.9336C21.6539 18.5434 20.8463 18.3373 20.025 18.3333L18.3333 23.3333H15C15 24.6133 15.4883 25.8933 16.465 26.8683Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-25102a06></path></svg></div><p class="mb-2" data-v-25102a06>Remove this welcome page by replacing <a class="bg-gray-100 dark:bg-white/10 rounded font-mono p-1 font-bold" data-v-25102a06>&lt;NuxtWelcome /&gt;</a> in <a href="https://v3.nuxtjs.org/docs/directory-structure/app" target="_blank" rel="noopener" class="bg-gray-100 dark:bg-white/10 rounded font-mono p-1 font-bold" data-v-25102a06>app.vue</a> with your own code.</p></div>',1),w={href:"https://v3.nuxtjs.org",target:"_blank",rel:"noopener",class:"gradient-border cursor-pointer col-span-3 sm:col-span-1 p-4 flex flex-col"},x=r('<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-25102a06><path d="M20 10.4217C21.9467 9.12833 24.59 8.33333 27.5 8.33333C30.4117 8.33333 33.0533 9.12833 35 10.4217V32.0883C33.0533 30.795 30.4117 30 27.5 30C24.59 30 21.9467 30.795 20 32.0883M20 10.4217V32.0883V10.4217ZM20 10.4217C18.0533 9.12833 15.41 8.33333 12.5 8.33333C9.59 8.33333 6.94667 9.12833 5 10.4217V32.0883C6.94667 30.795 9.59 30 12.5 30C15.41 30 18.0533 30.795 20 32.0883V10.4217Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-25102a06></path><rect x="23.3334" y="13.3333" width="8.33334" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="8.33337" y="13.3333" width="8.33333" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="8.33337" y="18.3333" width="8.33333" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="8.33337" y="23.3333" width="8.33333" height="1.66667" rx="0.833334" fill="currentColor" data-v-25102a06></rect><rect x="23.3334" y="18.3333" width="8.33334" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="23.3334" y="23.3333" width="8.33334" height="1.66667" rx="0.833334" fill="currentColor" data-v-25102a06></rect></svg><h2 class="font-semibold text-xl mt-4" data-v-25102a06>Documentation</h2>',2),m=["textContent"],b={href:"https://github.com/nuxt/framework",target:"_blank",rel:"noopener",class:"cursor-pointer gradient-border col-span-3 sm:col-span-1 p-4 flex flex-col"},_=o(()=>t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 3.33333C10.795 3.33333 3.33337 10.8067 3.33337 20.0283C3.33337 27.4033 8.10837 33.6617 14.7317 35.8683C15.565 36.0217 15.8684 35.5067 15.8684 35.0633C15.8684 34.6683 15.855 33.6167 15.8467 32.225C11.21 33.2333 10.2317 29.9867 10.2317 29.9867C9.47504 28.0567 8.38171 27.5433 8.38171 27.5433C6.86837 26.51 8.49671 26.53 8.49671 26.53C10.1684 26.6467 11.0484 28.25 11.0484 28.25C12.535 30.8 14.95 30.0633 15.8984 29.6367C16.0517 28.5583 16.4817 27.8233 16.9584 27.4067C13.2584 26.985 9.36671 25.5517 9.36671 19.155C9.36671 17.3333 10.0167 15.8417 11.0817 14.675C10.91 14.2533 10.3384 12.555 11.245 10.2583C11.245 10.2583 12.645 9.80833 15.8284 11.9683C17.188 11.5975 18.5908 11.4087 20 11.4067C21.4167 11.4133 22.8417 11.5983 24.1734 11.9683C27.355 9.80833 28.7517 10.2567 28.7517 10.2567C29.6617 12.555 29.0884 14.2533 28.9184 14.675C29.985 15.8417 30.6317 17.3333 30.6317 19.155C30.6317 25.5683 26.7334 26.98 23.0217 27.3933C23.62 27.9083 24.1517 28.9267 24.1517 30.485C24.1517 32.715 24.1317 34.5167 24.1317 35.0633C24.1317 35.51 24.4317 36.03 25.2784 35.8667C28.5972 34.7535 31.4823 32.6255 33.5258 29.7834C35.5694 26.9413 36.6681 23.5289 36.6667 20.0283C36.6667 10.8067 29.2034 3.33333 20 3.33333Z",fill:"currentColor"})],-1)),k=o(()=>t("h2",{class:"font-semibold text-xl mt-4"},"GitHub",-1)),y=["textContent"],S={href:"https://twitter.com/nuxt_js",target:"_blank",rel:"noopener",class:"cursor-pointer gradient-border col-span-3 sm:col-span-1 p-4 flex flex-col"},M=o(()=>t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M13.8167 33.7557C26.395 33.7557 33.275 23.334 33.275 14.2973C33.275 14.0007 33.275 13.7057 33.255 13.414C34.5937 12.4449 35.7489 11.245 36.6667 9.87066C35.4185 10.424 34.0943 10.7869 32.7384 10.9473C34.1661 10.0924 35.2346 8.74791 35.745 7.164C34.4029 7.96048 32.9345 8.52188 31.4034 8.824C30.3724 7.72694 29.0084 7.00039 27.5228 6.75684C26.0371 6.51329 24.5126 6.76633 23.1852 7.47678C21.8579 8.18723 20.8018 9.31545 20.1805 10.6868C19.5592 12.0581 19.4073 13.596 19.7484 15.0623C17.0294 14.9261 14.3694 14.2195 11.9411 12.9886C9.51285 11.7577 7.37059 10.0299 5.65337 7.91733C4.7789 9.42267 4.51102 11.2047 4.90427 12.9006C5.29751 14.5965 6.32232 16.0788 7.77004 17.0457C6.68214 17.0142 5.61776 16.7215 4.66671 16.1923V16.279C4.66736 17.8578 5.21403 19.3878 6.21404 20.6096C7.21404 21.8313 8.60582 22.6696 10.1534 22.9823C9.14639 23.2569 8.08986 23.2968 7.06504 23.099C7.50198 24.4581 8.35284 25.6467 9.49859 26.4984C10.6443 27.35 12.0277 27.8223 13.455 27.849C12.0369 28.9633 10.413 29.7871 8.67625 30.2732C6.93948 30.7594 5.12391 30.8984 3.33337 30.6823C6.46105 32.6896 10.1004 33.7542 13.8167 33.749",fill:"currentColor"})],-1)),j=o(()=>t("h2",{class:"font-semibold text-xl mt-4"},"Twitter",-1)),V=["textContent"],z={__name:"welcome",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},title:{type:String,default:"Welcome to Nuxt 3!"},readDocs:{type:String,default:"We highly recommend you take a look at the Nuxt documentation, whether you are new or have previous experience with the framework."},followTwitter:{type:String,default:"Follow the Nuxt Twitter account to get latest news about releases, new modules, tutorials and tips."},starGitHub:{type:String,default:"Nuxt is open source and the code is available on GitHub, feel free to star it, participate in discussions or dive into the source."}},setup(e){return s({title:`${e.title}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p,h2{margin:0}h1,h2{font-size:inherit;font-weight:inherit}svg{display:block;vertical-align:middle}'}]}),(Z,H)=>(l(),n("div",h,[t("div",p,[t("div",C,[f,t("a",{href:`https://github.com/nuxt/framework/releases/tag/${e.version}`,target:"_blank",rel:"noopener",class:"flex justify-end pb-1 sm:pb-2",textContent:a(e.version)},null,8,g),u]),v,t("a",w,[x,t("p",{class:"mt-2",textContent:a(e.readDocs)},null,8,m)]),t("a",b,[_,k,t("p",{class:"mt-2",textContent:a(e.starGitHub)},null,8,y)]),t("a",S,[M,j,t("p",{class:"mt-2",textContent:a(e.followTwitter)},null,8,V)])])]))}},P=i(z,[["__scopeId","data-v-25102a06"]]);export{P as default};
+import{k as i,z as s,o as l,e as n,f as t,t as a,W as r,ap as d,aq as c}from"./entry.67e3e390.js";import"./ContentNavigation.34b892d1.js";import"./navigation.e6541d9a.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.9cb0e4d7.js";import"./ContentSlot.7d84bf08.js";import"./DocumentDrivenEmpty.a80465d8.js";import"./DocumentDrivenNotFound.0314c024.js";import"./Markdown.e057438e.js";const o=e=>(d("data-v-25102a06"),e=e(),c(),e),h={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white min-h-screen place-content-center flex flex-col items-center justify-center p-8 text-sm sm:text-base"},p={class:"grid grid-cols-3 gap-4 md:gap-8 max-w-5xl w-full z-20"},C={class:"flex justify-between items-end col-span-3"},f=r('<a href="https://v3.nuxtjs.org" target="_blank" rel="noopener" class="nuxt-logo" data-v-25102a06><svg viewBox="0 0 221 65" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-40 text-black dark:text-white" data-v-25102a06><g clip-path="url(#a)" data-v-25102a06><path fill="currentColor" d="M82.5623 18.5705h7.3017l15.474 24.7415V18.5705h6.741v35.0576h-7.252L89.3025 28.938v24.6901h-6.7402V18.5705ZM142.207 53.628h-6.282v-3.916c-1.429 2.7559-4.339 4.3076-8.015 4.3076-5.822 0-9.603-4.1069-9.603-10.0175V28.3847h6.282v14.3251c0 3.4558 2.146 5.8592 5.362 5.8592 3.524 0 5.974-2.7044 5.974-6.4099V28.3847h6.282V53.628ZM164.064 53.2289l-6.026-8.4144-6.027 8.4144h-6.69l9.296-13.1723-8.58-12.0709h6.843l5.158 7.2641 5.106-7.2641h6.895l-8.632 12.0709 9.295 13.1723h-6.638ZM183.469 20.7726v7.6116h7.149v5.1593h-7.149v12.5311c0 .4208.17.8245.473 1.1223.303.2978.715.4654 1.144.4661h5.532v5.9547h-4.137c-5.617 0-9.293-3.2062-9.293-8.8109V33.5484h-5.056v-5.1642h3.172c1.479 0 2.34-.8639 2.34-2.2932v-5.3184h5.825Z" data-v-25102a06></path><path fill-rule="evenodd" clip-rule="evenodd" d="M30.1185 11.5456c-1.8853-3.24168-6.5987-3.24169-8.484 0L1.08737 46.8747c-1.885324 3.2417.47133 7.2938 4.24199 7.2938H21.3695c-1.6112-1.4081-2.2079-3.8441-.9886-5.9341l15.5615-26.675-5.8239-10.0138Z" fill="#80EEC0" data-v-25102a06></path><path d="M43.1374 19.2952c1.5603-2.6523 5.461-2.6523 7.0212 0l17.0045 28.9057c1.5603 2.6522-.39 5.9676-3.5106 5.9676h-34.009c-3.1206 0-5.0709-3.3154-3.5106-5.9676l17.0045-28.9057ZM209.174 53.8005H198.483c0-1.8514.067-3.4526 0-6.0213h10.641c1.868 0 3.353.1001 4.354-.934 1-1.0341 1.501-2.3351 1.501-3.9029 0-1.8347-.667-3.2191-2.002-4.1532-1.301-.9674-2.985-1.4511-5.054-1.4511h-2.601v-5.2539h2.652c1.701 0 3.119-.4003 4.253-1.2009 1.134-.8006 1.701-1.9849 1.701-3.5527 0-1.301-.434-2.3351-1.301-3.1023-.834-.8007-2.001-1.201-3.503-1.201-1.634 0-2.918.4837-3.853 1.4511-.9.9674-1.401 2.1517-1.501 3.5527h-6.254c.133-3.2358 1.251-5.7877 3.352-7.6558 2.135-1.868 4.887-2.8021 8.256-2.8021 2.402 0 4.42.4337 6.055 1.301 1.668.834 2.919 1.9515 3.753 3.3525.867 1.4011 1.301 2.9523 1.301 4.6536 0 1.9681-.551 3.636-1.651 5.0037-1.068 1.3344-2.402 2.235-4.004 2.7021 1.969.4003 3.57 1.3677 4.804 2.9022 1.234 1.5011 1.852 3.4025 1.852 5.7043 0 1.9347-.468 3.7028-1.402 5.304-.934 1.6012-2.301 2.8855-4.103 3.8529-1.768.9674-3.953 1.4511-6.555 1.4511Z" fill="#00DC82" data-v-25102a06></path></g><defs data-v-25102a06><clipPath id="a" data-v-25102a06><path fill="#fff" d="M0 0h221v65H0z" data-v-25102a06></path></clipPath></defs></svg></a>',1),g=["href","textContent"],u=o(()=>t("div",{class:"spotlight-wrapper"},[t("div",{class:"fixed z-10 left-0 right-0 spotlight"})],-1)),v=r('<div class="col-span-3 rounded p-4 flex flex-col gradient-border" data-v-25102a06><div class="flex justify-between items-center mb-4" data-v-25102a06><h1 class="font-medium text-2xl" data-v-25102a06>Get Started</h1><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-25102a06><path d="M29.4284 31.095C26.9278 33.5955 23.5364 35.0003 20.0001 35.0003C16.4637 35.0003 13.0723 33.5955 10.5717 31.095C8.07118 28.5944 6.66638 25.203 6.66638 21.6667C6.66638 18.1304 8.07118 14.7389 10.5717 12.2383C10.5717 12.2383 11.6667 15 15.0001 16.6667C15.0001 13.3333 15.8334 8.33333 19.9767 5C23.3334 8.33333 26.8167 9.62833 29.4267 12.2383C30.667 13.475 31.6506 14.9446 32.321 16.5626C32.9915 18.1806 33.3355 19.9152 33.3334 21.6667C33.3357 23.418 32.9919 25.1525 32.3218 26.7705C31.6516 28.3886 30.6683 29.8582 29.4284 31.095V31.095Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-25102a06></path><path d="M16.465 26.8683C17.0456 27.4491 17.7604 27.878 18.5462 28.1169C19.3319 28.3559 20.1644 28.3976 20.9701 28.2385C21.7758 28.0793 22.5299 27.7241 23.1657 27.2043C23.8015 26.6845 24.2995 26.016 24.6157 25.2581C24.9318 24.5001 25.0564 23.6759 24.9784 22.8584C24.9004 22.0408 24.6222 21.2551 24.1684 20.5705C23.7146 19.886 23.0992 19.3238 22.3766 18.9336C21.6539 18.5434 20.8463 18.3373 20.025 18.3333L18.3333 23.3333H15C15 24.6133 15.4883 25.8933 16.465 26.8683Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-25102a06></path></svg></div><p class="mb-2" data-v-25102a06>Remove this welcome page by replacing <a class="bg-gray-100 dark:bg-white/10 rounded font-mono p-1 font-bold" data-v-25102a06>&lt;NuxtWelcome /&gt;</a> in <a href="https://v3.nuxtjs.org/docs/directory-structure/app" target="_blank" rel="noopener" class="bg-gray-100 dark:bg-white/10 rounded font-mono p-1 font-bold" data-v-25102a06>app.vue</a> with your own code.</p></div>',1),w={href:"https://v3.nuxtjs.org",target:"_blank",rel:"noopener",class:"gradient-border cursor-pointer col-span-3 sm:col-span-1 p-4 flex flex-col"},x=r('<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-25102a06><path d="M20 10.4217C21.9467 9.12833 24.59 8.33333 27.5 8.33333C30.4117 8.33333 33.0533 9.12833 35 10.4217V32.0883C33.0533 30.795 30.4117 30 27.5 30C24.59 30 21.9467 30.795 20 32.0883M20 10.4217V32.0883V10.4217ZM20 10.4217C18.0533 9.12833 15.41 8.33333 12.5 8.33333C9.59 8.33333 6.94667 9.12833 5 10.4217V32.0883C6.94667 30.795 9.59 30 12.5 30C15.41 30 18.0533 30.795 20 32.0883V10.4217Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-25102a06></path><rect x="23.3334" y="13.3333" width="8.33334" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="8.33337" y="13.3333" width="8.33333" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="8.33337" y="18.3333" width="8.33333" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="8.33337" y="23.3333" width="8.33333" height="1.66667" rx="0.833334" fill="currentColor" data-v-25102a06></rect><rect x="23.3334" y="18.3333" width="8.33334" height="1.66667" rx="0.833333" fill="currentColor" data-v-25102a06></rect><rect x="23.3334" y="23.3333" width="8.33334" height="1.66667" rx="0.833334" fill="currentColor" data-v-25102a06></rect></svg><h2 class="font-semibold text-xl mt-4" data-v-25102a06>Documentation</h2>',2),m=["textContent"],b={href:"https://github.com/nuxt/framework",target:"_blank",rel:"noopener",class:"cursor-pointer gradient-border col-span-3 sm:col-span-1 p-4 flex flex-col"},_=o(()=>t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 3.33333C10.795 3.33333 3.33337 10.8067 3.33337 20.0283C3.33337 27.4033 8.10837 33.6617 14.7317 35.8683C15.565 36.0217 15.8684 35.5067 15.8684 35.0633C15.8684 34.6683 15.855 33.6167 15.8467 32.225C11.21 33.2333 10.2317 29.9867 10.2317 29.9867C9.47504 28.0567 8.38171 27.5433 8.38171 27.5433C6.86837 26.51 8.49671 26.53 8.49671 26.53C10.1684 26.6467 11.0484 28.25 11.0484 28.25C12.535 30.8 14.95 30.0633 15.8984 29.6367C16.0517 28.5583 16.4817 27.8233 16.9584 27.4067C13.2584 26.985 9.36671 25.5517 9.36671 19.155C9.36671 17.3333 10.0167 15.8417 11.0817 14.675C10.91 14.2533 10.3384 12.555 11.245 10.2583C11.245 10.2583 12.645 9.80833 15.8284 11.9683C17.188 11.5975 18.5908 11.4087 20 11.4067C21.4167 11.4133 22.8417 11.5983 24.1734 11.9683C27.355 9.80833 28.7517 10.2567 28.7517 10.2567C29.6617 12.555 29.0884 14.2533 28.9184 14.675C29.985 15.8417 30.6317 17.3333 30.6317 19.155C30.6317 25.5683 26.7334 26.98 23.0217 27.3933C23.62 27.9083 24.1517 28.9267 24.1517 30.485C24.1517 32.715 24.1317 34.5167 24.1317 35.0633C24.1317 35.51 24.4317 36.03 25.2784 35.8667C28.5972 34.7535 31.4823 32.6255 33.5258 29.7834C35.5694 26.9413 36.6681 23.5289 36.6667 20.0283C36.6667 10.8067 29.2034 3.33333 20 3.33333Z",fill:"currentColor"})],-1)),k=o(()=>t("h2",{class:"font-semibold text-xl mt-4"},"GitHub",-1)),y=["textContent"],S={href:"https://twitter.com/nuxt_js",target:"_blank",rel:"noopener",class:"cursor-pointer gradient-border col-span-3 sm:col-span-1 p-4 flex flex-col"},M=o(()=>t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M13.8167 33.7557C26.395 33.7557 33.275 23.334 33.275 14.2973C33.275 14.0007 33.275 13.7057 33.255 13.414C34.5937 12.4449 35.7489 11.245 36.6667 9.87066C35.4185 10.424 34.0943 10.7869 32.7384 10.9473C34.1661 10.0924 35.2346 8.74791 35.745 7.164C34.4029 7.96048 32.9345 8.52188 31.4034 8.824C30.3724 7.72694 29.0084 7.00039 27.5228 6.75684C26.0371 6.51329 24.5126 6.76633 23.1852 7.47678C21.8579 8.18723 20.8018 9.31545 20.1805 10.6868C19.5592 12.0581 19.4073 13.596 19.7484 15.0623C17.0294 14.9261 14.3694 14.2195 11.9411 12.9886C9.51285 11.7577 7.37059 10.0299 5.65337 7.91733C4.7789 9.42267 4.51102 11.2047 4.90427 12.9006C5.29751 14.5965 6.32232 16.0788 7.77004 17.0457C6.68214 17.0142 5.61776 16.7215 4.66671 16.1923V16.279C4.66736 17.8578 5.21403 19.3878 6.21404 20.6096C7.21404 21.8313 8.60582 22.6696 10.1534 22.9823C9.14639 23.2569 8.08986 23.2968 7.06504 23.099C7.50198 24.4581 8.35284 25.6467 9.49859 26.4984C10.6443 27.35 12.0277 27.8223 13.455 27.849C12.0369 28.9633 10.413 29.7871 8.67625 30.2732C6.93948 30.7594 5.12391 30.8984 3.33337 30.6823C6.46105 32.6896 10.1004 33.7542 13.8167 33.749",fill:"currentColor"})],-1)),j=o(()=>t("h2",{class:"font-semibold text-xl mt-4"},"Twitter",-1)),V=["textContent"],z={__name:"welcome",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},title:{type:String,default:"Welcome to Nuxt 3!"},readDocs:{type:String,default:"We highly recommend you take a look at the Nuxt documentation, whether you are new or have previous experience with the framework."},followTwitter:{type:String,default:"Follow the Nuxt Twitter account to get latest news about releases, new modules, tutorials and tips."},starGitHub:{type:String,default:"Nuxt is open source and the code is available on GitHub, feel free to star it, participate in discussions or dive into the source."}},setup(e){return s({title:`${e.title}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p,h2{margin:0}h1,h2{font-size:inherit;font-weight:inherit}svg{display:block;vertical-align:middle}'}]}),(Z,H)=>(l(),n("div",h,[t("div",p,[t("div",C,[f,t("a",{href:`https://github.com/nuxt/framework/releases/tag/${e.version}`,target:"_blank",rel:"noopener",class:"flex justify-end pb-1 sm:pb-2",textContent:a(e.version)},null,8,g),u]),v,t("a",w,[x,t("p",{class:"mt-2",textContent:a(e.readDocs)},null,8,m)]),t("a",b,[_,k,t("p",{class:"mt-2",textContent:a(e.starGitHub)},null,8,y)]),t("a",S,[M,j,t("p",{class:"mt-2",textContent:a(e.followTwitter)},null,8,V)])])]))}},P=i(z,[["__scopeId","data-v-25102a06"]]);export{P as default};
diff --git a/sql/mysql-and-mariadb-setup/_payload.js b/sql/mysql-and-mariadb-setup/_payload.js
index b3e1fdf..7057ada 100644
--- a/sql/mysql-and-mariadb-setup/_payload.js
+++ b/sql/mysql-and-mariadb-setup/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:A,_path:B},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-H09FJYhNy5":{_path:B,_dir:"sql",_draft:o,_partial:o,_locale:"en",_empty:o,title:A,description:e,excerpt:{type:C,children:[{type:a,tag:k,props:{id:p},children:[{type:b,value:q}]},{type:a,tag:c,props:{code:r,language:D},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:r}]}]}]},{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:E,props:{},children:[{type:b,value:F},{type:a,tag:g,props:{},children:[{type:b,value:G}]},{type:b,value:H},{type:a,tag:g,props:{},children:[{type:b,value:I}]},{type:b,value:J}]},{type:a,tag:c,props:{code:u,language:K},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:u}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{},children:[{type:b,value:L},{type:a,tag:g,props:{},children:[{type:b,value:M}]},{type:b,value:N},{type:a,tag:g,props:{},children:[{type:b,value:O}]},{type:b,value:P},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:b,value:R}]}]},{type:a,tag:c,props:{code:x,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:x}]}]}]},{type:a,tag:l,props:{start:i},children:[{type:a,tag:m,props:{},children:[{type:b,value:S}]}]},{type:a,tag:c,props:{code:y,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:y}]}]}]},{type:a,tag:l,props:{start:T},children:[{type:a,tag:m,props:{},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{code:z,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:z}]}]}]}]},body:{type:C,children:[{type:a,tag:k,props:{id:p},children:[{type:b,value:q}]},{type:a,tag:c,props:{code:r,language:D},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo apt update"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo apt install mariadb-server"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo mysql_secure_installation"}]}]}]}]}]},{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:E,props:{},children:[{type:b,value:F},{type:a,tag:g,props:{},children:[{type:b,value:G}]},{type:b,value:H},{type:a,tag:g,props:{},children:[{type:b,value:I}]},{type:b,value:J}]},{type:a,tag:c,props:{code:u,language:K},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:V}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"bind-"}]},{type:a,tag:d,props:{class:"ct-96f3dd"},children:[{type:b,value:"address"}]},{type:a,tag:d,props:{class:j},children:[{type:b,value:" = 0.0.0.0"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:V}]}]}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{},children:[{type:b,value:L},{type:a,tag:g,props:{},children:[{type:b,value:M}]},{type:b,value:N},{type:a,tag:g,props:{},children:[{type:b,value:O}]},{type:b,value:P},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:b,value:R}]}]},{type:a,tag:c,props:{code:x,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{type:a,tag:l,props:{start:i},children:[{type:a,tag:m,props:{},children:[{type:b,value:S}]}]},{type:a,tag:c,props:{code:y,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{type:a,tag:l,props:{start:T},children:[{type:a,tag:m,props:{},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{code:z,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"FLUSH PRIVILEGES;"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-96f3dd{color:#FF7B72}.ct-4fe866{color:#C9D1D9}.light .ct-4fe866{color:#657B83}.light .ct-96f3dd{color:#859900}"}]}],toc:{title:e,searchDepth:i,depth:i,links:[{id:p,depth:i,text:q},{id:s,depth:i,text:t},{id:v,depth:i,text:w}]}},_type:"markdown",_id:"content:SQL:MySQL and MariaDB setup.md",_source:"content",_file:"SQL\u002FMySQL and MariaDB setup.md",_extension:"md"}},prerenderedAt:1667812498782}}("element","text","code","span","","pre","code-inline","line",2,"ct-4fe866","h2","ol","li","mysql",false,"install-mariadb-on-ubuntu-2004-lts","Install MariaDB on Ubuntu 20.04 LTS","sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","access-database-from-outside","Access Database from outside","...\nbind-address = 0.0.0.0\n...\n","create-administrative-user","Create Administrative User","CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","FLUSH PRIVILEGES;\n","MySQL And MariaDB Setup","\u002Fsql\u002Fmysql-and-mariadb-setup","root","bash","p","Open ","\u002Fetc\u002Fmysql\u002Fmariadb.conf.d\u002F50-server.cnf"," and change the ","bind-address"," to:","nginx","Create a new user ","newuser"," for the host ","localhost"," with a new ","password",":","Grant all permissions to the new user",3,"Update permissions","..."))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:A,_path:B},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-H09FJYhNy5":{_path:B,_dir:"sql",_draft:o,_partial:o,_locale:"en",_empty:o,title:A,description:e,excerpt:{type:C,children:[{type:a,tag:k,props:{id:p},children:[{type:b,value:q}]},{type:a,tag:c,props:{code:r,language:D},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:r}]}]}]},{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:E,props:{},children:[{type:b,value:F},{type:a,tag:g,props:{},children:[{type:b,value:G}]},{type:b,value:H},{type:a,tag:g,props:{},children:[{type:b,value:I}]},{type:b,value:J}]},{type:a,tag:c,props:{code:u,language:K},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:u}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{},children:[{type:b,value:L},{type:a,tag:g,props:{},children:[{type:b,value:M}]},{type:b,value:N},{type:a,tag:g,props:{},children:[{type:b,value:O}]},{type:b,value:P},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:b,value:R}]}]},{type:a,tag:c,props:{code:x,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:x}]}]}]},{type:a,tag:l,props:{start:i},children:[{type:a,tag:m,props:{},children:[{type:b,value:S}]}]},{type:a,tag:c,props:{code:y,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:y}]}]}]},{type:a,tag:l,props:{start:T},children:[{type:a,tag:m,props:{},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{code:z,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:z}]}]}]}]},body:{type:C,children:[{type:a,tag:k,props:{id:p},children:[{type:b,value:q}]},{type:a,tag:c,props:{code:r,language:D},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo apt update"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo apt install mariadb-server"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo mysql_secure_installation"}]}]}]}]}]},{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:E,props:{},children:[{type:b,value:F},{type:a,tag:g,props:{},children:[{type:b,value:G}]},{type:b,value:H},{type:a,tag:g,props:{},children:[{type:b,value:I}]},{type:b,value:J}]},{type:a,tag:c,props:{code:u,language:K},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:V}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"bind-"}]},{type:a,tag:d,props:{class:"ct-9b603b"},children:[{type:b,value:"address"}]},{type:a,tag:d,props:{class:j},children:[{type:b,value:" = 0.0.0.0"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:V}]}]}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{},children:[{type:b,value:L},{type:a,tag:g,props:{},children:[{type:b,value:M}]},{type:b,value:N},{type:a,tag:g,props:{},children:[{type:b,value:O}]},{type:b,value:P},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:b,value:R}]}]},{type:a,tag:c,props:{code:x,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{type:a,tag:l,props:{start:i},children:[{type:a,tag:m,props:{},children:[{type:b,value:S}]}]},{type:a,tag:c,props:{code:y,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{type:a,tag:l,props:{start:T},children:[{type:a,tag:m,props:{},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{code:z,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"FLUSH PRIVILEGES;"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-9b603b{color:#FF7B72}.ct-b86932{color:#C9D1D9}.light .ct-b86932{color:#657B83}.light .ct-9b603b{color:#859900}"}]}],toc:{title:e,searchDepth:i,depth:i,links:[{id:p,depth:i,text:q},{id:s,depth:i,text:t},{id:v,depth:i,text:w}]}},_type:"markdown",_id:"content:SQL:MySQL and MariaDB setup.md",_source:"content",_file:"SQL\u002FMySQL and MariaDB setup.md",_extension:"md"}},prerenderedAt:1667813360880}}("element","text","code","span","","pre","code-inline","line",2,"ct-b86932","h2","ol","li","mysql",false,"install-mariadb-on-ubuntu-2004-lts","Install MariaDB on Ubuntu 20.04 LTS","sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","access-database-from-outside","Access Database from outside","...\nbind-address = 0.0.0.0\n...\n","create-administrative-user","Create Administrative User","CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","FLUSH PRIVILEGES;\n","MySQL And MariaDB Setup","\u002Fsql\u002Fmysql-and-mariadb-setup","root","bash","p","Open ","\u002Fetc\u002Fmysql\u002Fmariadb.conf.d\u002F50-server.cnf"," and change the ","bind-address"," to:","nginx","Create a new user ","newuser"," for the host ","localhost"," with a new ","password",":","Grant all permissions to the new user",3,"Update permissions","..."))
\ No newline at end of file
diff --git a/sql/mysql-and-mariadb-setup/index.html b/sql/mysql-and-mariadb-setup/index.html
index 136f02d..6d8488b 100644
--- a/sql/mysql-and-mariadb-setup/index.html
+++ b/sql/mysql-and-mariadb-setup/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>MySQL And MariaDB Setup • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/sql/mysql-and-mariadb-setup/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseOl.8ecd42ef.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.f5f48b70.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>MySQL And MariaDB Setup • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/sql/mysql-and-mariadb-setup/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseOl.79cf88eb.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseLi.94808e98.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/sql/mysql-and-mariadb-setup" class="router-link-active _active_192pu_81 _link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>MySQL And MariaDB Setup</h1><article><div><h2 id="install-mariadb-on-ubuntu-2004-lts"><a href="#install-mariadb-on-ubuntu-2004-lts"><!--[-->Install MariaDB on Ubuntu 20.04 LTS<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-4fe866">sudo apt update</span></span><span class="line"><span class="ct-4fe866">sudo apt install mariadb-server</span></span><span class="line"><span class="ct-4fe866">sudo mysql_secure_installation</span></span></code></pre><!--]--></div><h2 id="access-database-from-outside"><a href="#access-database-from-outside"><!--[-->Access Database from outside<!--]--></a></h2><p><!--[-->Open <code><!--[-->/etc/mysql/mariadb.conf.d/50-server.cnf<!--]--></code> and change the <code><!--[-->bind-address<!--]--></code> to:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-4fe866">...</span></span><span class="line"><span class="ct-4fe866">bind-</span><span class="ct-96f3dd">address</span><span class="ct-4fe866"> = 0.0.0.0</span></span><span class="line"><span class="ct-4fe866">...</span></span></code></pre><!--]--></div><h2 id="create-administrative-user"><a href="#create-administrative-user"><!--[-->Create Administrative User<!--]--></a></h2><ol><!--[--><li><!--[-->Create a new user <code><!--[-->newuser<!--]--></code> for the host <code><!--[-->localhost<!--]--></code> with a new <code><!--[-->password<!--]--></code>:<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>mysql</span></button><!--[--><pre><code><span class="line"><span>CREATE USER &#39;newuser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;password&#39;;</span></span></code></pre><!--]--></div><ol start="2"><!--[--><li><!--[-->Grant all permissions to the new user<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>mysql</span></button><!--[--><pre><code><span class="line"><span>GRANT ALL PRIVILEGES ON * . * TO &#39;newuser&#39;@&#39;localhost&#39;;</span></span></code></pre><!--]--></div><ol start="3"><!--[--><li><!--[-->Update permissions<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>mysql</span></button><!--[--><pre><code><span class="line"><span>FLUSH PRIVILEGES;</span></span></code></pre><!--]--></div><style>.ct-96f3dd{color:#FF7B72}.ct-4fe866{color:#C9D1D9}.light .ct-4fe866{color:#657B83}.light .ct-96f3dd{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/sql/mysql-and-mariadb-setup/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498782}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseOl.8ecd42ef.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.f5f48b70.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/sql/mysql-and-mariadb-setup" class="router-link-active _active_192pu_81 _link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>MySQL And MariaDB Setup</h1><article><div><h2 id="install-mariadb-on-ubuntu-2004-lts"><a href="#install-mariadb-on-ubuntu-2004-lts"><!--[-->Install MariaDB on Ubuntu 20.04 LTS<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-b86932">sudo apt update</span></span><span class="line"><span class="ct-b86932">sudo apt install mariadb-server</span></span><span class="line"><span class="ct-b86932">sudo mysql_secure_installation</span></span></code></pre><!--]--></div><h2 id="access-database-from-outside"><a href="#access-database-from-outside"><!--[-->Access Database from outside<!--]--></a></h2><p><!--[-->Open <code><!--[-->/etc/mysql/mariadb.conf.d/50-server.cnf<!--]--></code> and change the <code><!--[-->bind-address<!--]--></code> to:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>nginx</span></button><!--[--><pre><code><span class="line"><span class="ct-b86932">...</span></span><span class="line"><span class="ct-b86932">bind-</span><span class="ct-9b603b">address</span><span class="ct-b86932"> = 0.0.0.0</span></span><span class="line"><span class="ct-b86932">...</span></span></code></pre><!--]--></div><h2 id="create-administrative-user"><a href="#create-administrative-user"><!--[-->Create Administrative User<!--]--></a></h2><ol><!--[--><li><!--[-->Create a new user <code><!--[-->newuser<!--]--></code> for the host <code><!--[-->localhost<!--]--></code> with a new <code><!--[-->password<!--]--></code>:<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>mysql</span></button><!--[--><pre><code><span class="line"><span>CREATE USER &#39;newuser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;password&#39;;</span></span></code></pre><!--]--></div><ol start="2"><!--[--><li><!--[-->Grant all permissions to the new user<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>mysql</span></button><!--[--><pre><code><span class="line"><span>GRANT ALL PRIVILEGES ON * . * TO &#39;newuser&#39;@&#39;localhost&#39;;</span></span></code></pre><!--]--></div><ol start="3"><!--[--><li><!--[-->Update permissions<!--]--></li><!--]--></ol><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>mysql</span></button><!--[--><pre><code><span class="line"><span>FLUSH PRIVILEGES;</span></span></code></pre><!--]--></div><style>.ct-9b603b{color:#FF7B72}.ct-b86932{color:#C9D1D9}.light .ct-b86932{color:#657B83}.light .ct-9b603b{color:#859900}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/sql/mysql-and-mariadb-setup/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360880}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseOl.79cf88eb.js" crossorigin></script><script type="module" src="/nuxt/ProseLi.94808e98.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/sql/postgress-setup/_payload.js b/sql/postgress-setup/_payload.js
index 96da953..0a522c9 100644
--- a/sql/postgress-setup/_payload.js
+++ b/sql/postgress-setup/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:N,_path:O}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-OeCNLqMRmJ":{_path:O,_dir:m,_draft:r,_partial:r,_locale:"en",_empty:r,title:N,description:f,excerpt:{type:P,children:[{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:d,props:{code:u,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:u}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:a,tag:d,props:{code:x,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:x}]}]}]},{type:a,tag:k,props:{id:y},children:[{type:b,value:z}]},{type:a,tag:g,props:{},children:[{type:b,value:R},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:S},{type:a,tag:e,props:{},children:[{type:b,value:T}]},{type:b,value:U},{type:a,tag:e,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:X},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:p}]},{type:a,tag:Y,props:{id:A},children:[{type:b,value:B}]},{type:a,tag:g,props:{},children:[{type:b,value:Z},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:_},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:$},{type:a,tag:e,props:{},children:[{type:b,value:aa}]},{type:b,value:p}]},{type:a,tag:d,props:{code:C,language:ab},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:C}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ac},{type:a,tag:e,props:{},children:[{type:b,value:ad}]},{type:b,value:p}]},{type:a,tag:d,props:{code:D},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:D}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ae}]},{type:a,tag:d,props:{code:E,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:E}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:af}]},{type:a,tag:d,props:{code:F,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:F}]}]}]},{type:a,tag:k,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:g,props:{},children:[{type:b,value:ag}]},{type:a,tag:d,props:{code:I,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:I}]}]}]},{type:a,tag:k,props:{id:J},children:[{type:b,value:K}]},{type:a,tag:g,props:{},children:[{type:b,value:ah},{type:a,tag:e,props:{},children:[{type:b,value:ai}]},{type:b,value:aj}]},{type:a,tag:d,props:{code:L,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:L}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ak},{type:a,tag:e,props:{},children:[{type:b,value:al}]},{type:b,value:am}]},{type:a,tag:g,props:{},children:[{type:b,value:an}]},{type:a,tag:d,props:{code:M,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:M}]}]}]}]},body:{type:P,children:[{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:d,props:{code:u,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo apt update"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo systemctl status postgresql.service"}]}]}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:a,tag:d,props:{code:x,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo -u postgres psql"}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"Type "}]},{type:a,tag:c,props:{class:"ct-ac5306"},children:[{type:b,value:"\"help\""}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:"ct-b2131c"},children:[{type:b,value:"for"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" help."}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"postgres="}]},{type:a,tag:c,props:{class:"ct-762d70"},children:[{type:b,value:"#"}]}]}]}]}]},{type:a,tag:k,props:{id:y},children:[{type:b,value:z}]},{type:a,tag:g,props:{},children:[{type:b,value:R},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:S},{type:a,tag:e,props:{},children:[{type:b,value:T}]},{type:b,value:U},{type:a,tag:e,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:X},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:p}]},{type:a,tag:Y,props:{id:A},children:[{type:b,value:B}]},{type:a,tag:g,props:{},children:[{type:b,value:Z},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:_},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:$},{type:a,tag:e,props:{},children:[{type:b,value:aa}]},{type:b,value:p}]},{type:a,tag:d,props:{code:C,language:ab},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo vi \u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf"}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:ao}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:"ct-d5c976"},children:[{type:b,value:"local"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"   all             postgres                                peer"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:ao}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ac},{type:a,tag:e,props:{},children:[{type:b,value:ad}]},{type:b,value:p}]},{type:a,tag:d,props:{code:D},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"local   all             postgres                                md5"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ae}]},{type:a,tag:d,props:{code:E,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo systemctl restart postgresql"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:af}]},{type:a,tag:d,props:{code:F,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{type:a,tag:k,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:g,props:{},children:[{type:b,value:ag}]},{type:a,tag:d,props:{code:I,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{type:a,tag:k,props:{id:J},children:[{type:b,value:K}]},{type:a,tag:g,props:{},children:[{type:b,value:ah},{type:a,tag:e,props:{},children:[{type:b,value:ai}]},{type:b,value:aj}]},{type:a,tag:d,props:{code:L,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ak},{type:a,tag:e,props:{},children:[{type:b,value:al}]},{type:b,value:am}]},{type:a,tag:g,props:{},children:[{type:b,value:an}]},{type:a,tag:d,props:{code:M,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-d5c976{color:#FF7B72}.ct-762d70{color:#8B949E}.ct-b2131c{color:#FF7B72}.ct-ac5306{color:#A5D6FF}.ct-75e384{color:#C9D1D9}.light .ct-75e384{color:#657B83}.light .ct-ac5306{color:#2AA198}.light .ct-b2131c{color:#859900}.light .ct-762d70{color:#93A1A1}.light .ct-d5c976{color:#073642}"}]}],toc:{title:f,searchDepth:n,depth:n,links:[{id:s,depth:n,text:t},{id:v,depth:n,text:w},{id:y,depth:n,text:z,children:[{id:A,depth:3,text:B}]},{id:G,depth:n,text:H},{id:J,depth:n,text:K}]}},_type:"markdown",_id:"content:SQL:Postgress setup.md",_source:"content",_file:"SQL\u002FPostgress setup.md",_extension:"md"}},prerenderedAt:1667812498817}}("element","text","span","code","code-inline","","p","line","pre","ct-75e384","h2","bash","sql",2,"postgres",".","pg_hba.conf",false,"install-postgresql-12-on-ubuntu-2004-lts","Install PostgreSQL 12 on Ubuntu 20.04 LTS","sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","initial-database-connection","Initial database connection","sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","set-password-for-postgres-database-user","Set password for postgres database user","update-pg_hbaconf-to-allow-postgres-user-connections-with-password","Update pg_hba.conf to allow postgres user connections with password","sudo vi \u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","local   all             postgres                                md5\n","sudo systemctl restart postgresql\n","psql -U postgres -d postgres -h databasehostname\n","creation-of-additional-database-users","Creation of additional database users","create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","creation-of-additional-databases","Creation of additional databases","CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres\n","postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","Postgress Setup","\u002Fsql\u002Fpostgress-setup","root","A local connection (from the database server) can be done by the following command:","The password for the "," database user can be set the the quick command ","\\password","\nor by ","alter user postgres password 'Supersecret'",". A connection using the "," user\nis still not possible from the \"outside\" hence to the default settings in the ","h3","In order to allow connections of the "," database user not using OS user\nauthentication, you have to update the "," which can be found under\n","\u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf","shell","Change the last section of the above line to ","md5","A restart is required in order to apply the new configuration:","Now a connection from outside the database host is possible e.g.","A database user can be created by the following command:","One can create new Postgres databases within an instance. Therefore you can use the ","psql","\ncommand to login (see above).","You can leave the ","OWNER"," section of the command, when doing so, the current user will become\nowner of the newly created database.","To change the owner of an existing database later, you can use the following command:","..."))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:N,_path:O}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-OeCNLqMRmJ":{_path:O,_dir:m,_draft:r,_partial:r,_locale:"en",_empty:r,title:N,description:f,excerpt:{type:P,children:[{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:d,props:{code:u,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:u}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:a,tag:d,props:{code:x,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:x}]}]}]},{type:a,tag:k,props:{id:y},children:[{type:b,value:z}]},{type:a,tag:g,props:{},children:[{type:b,value:R},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:S},{type:a,tag:e,props:{},children:[{type:b,value:T}]},{type:b,value:U},{type:a,tag:e,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:X},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:p}]},{type:a,tag:Y,props:{id:A},children:[{type:b,value:B}]},{type:a,tag:g,props:{},children:[{type:b,value:Z},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:_},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:$},{type:a,tag:e,props:{},children:[{type:b,value:aa}]},{type:b,value:p}]},{type:a,tag:d,props:{code:C,language:ab},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:C}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ac},{type:a,tag:e,props:{},children:[{type:b,value:ad}]},{type:b,value:p}]},{type:a,tag:d,props:{code:D},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:D}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ae}]},{type:a,tag:d,props:{code:E,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:E}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:af}]},{type:a,tag:d,props:{code:F,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:F}]}]}]},{type:a,tag:k,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:g,props:{},children:[{type:b,value:ag}]},{type:a,tag:d,props:{code:I,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:I}]}]}]},{type:a,tag:k,props:{id:J},children:[{type:b,value:K}]},{type:a,tag:g,props:{},children:[{type:b,value:ah},{type:a,tag:e,props:{},children:[{type:b,value:ai}]},{type:b,value:aj}]},{type:a,tag:d,props:{code:L,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:L}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ak},{type:a,tag:e,props:{},children:[{type:b,value:al}]},{type:b,value:am}]},{type:a,tag:g,props:{},children:[{type:b,value:an}]},{type:a,tag:d,props:{code:M,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:M}]}]}]}]},body:{type:P,children:[{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:d,props:{code:u,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo apt update"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo systemctl status postgresql.service"}]}]}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:a,tag:d,props:{code:x,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo -u postgres psql"}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"Type "}]},{type:a,tag:c,props:{class:"ct-ba5945"},children:[{type:b,value:"\"help\""}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:"ct-d29114"},children:[{type:b,value:"for"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" help."}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"postgres="}]},{type:a,tag:c,props:{class:"ct-fd9161"},children:[{type:b,value:"#"}]}]}]}]}]},{type:a,tag:k,props:{id:y},children:[{type:b,value:z}]},{type:a,tag:g,props:{},children:[{type:b,value:R},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:S},{type:a,tag:e,props:{},children:[{type:b,value:T}]},{type:b,value:U},{type:a,tag:e,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:X},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:p}]},{type:a,tag:Y,props:{id:A},children:[{type:b,value:B}]},{type:a,tag:g,props:{},children:[{type:b,value:Z},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:_},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:$},{type:a,tag:e,props:{},children:[{type:b,value:aa}]},{type:b,value:p}]},{type:a,tag:d,props:{code:C,language:ab},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo vi \u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf"}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:ao}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:"ct-635706"},children:[{type:b,value:"local"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"   all             postgres                                peer"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:ao}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ac},{type:a,tag:e,props:{},children:[{type:b,value:ad}]},{type:b,value:p}]},{type:a,tag:d,props:{code:D},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"local   all             postgres                                md5"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ae}]},{type:a,tag:d,props:{code:E,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo systemctl restart postgresql"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:af}]},{type:a,tag:d,props:{code:F,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{type:a,tag:k,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:g,props:{},children:[{type:b,value:ag}]},{type:a,tag:d,props:{code:I,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{type:a,tag:k,props:{id:J},children:[{type:b,value:K}]},{type:a,tag:g,props:{},children:[{type:b,value:ah},{type:a,tag:e,props:{},children:[{type:b,value:ai}]},{type:b,value:aj}]},{type:a,tag:d,props:{code:L,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ak},{type:a,tag:e,props:{},children:[{type:b,value:al}]},{type:b,value:am}]},{type:a,tag:g,props:{},children:[{type:b,value:an}]},{type:a,tag:d,props:{code:M,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-635706{color:#FF7B72}.ct-fd9161{color:#8B949E}.ct-d29114{color:#FF7B72}.ct-ba5945{color:#A5D6FF}.ct-5ed0d1{color:#C9D1D9}.light .ct-5ed0d1{color:#657B83}.light .ct-ba5945{color:#2AA198}.light .ct-d29114{color:#859900}.light .ct-fd9161{color:#93A1A1}.light .ct-635706{color:#073642}"}]}],toc:{title:f,searchDepth:n,depth:n,links:[{id:s,depth:n,text:t},{id:v,depth:n,text:w},{id:y,depth:n,text:z,children:[{id:A,depth:3,text:B}]},{id:G,depth:n,text:H},{id:J,depth:n,text:K}]}},_type:"markdown",_id:"content:SQL:Postgress setup.md",_source:"content",_file:"SQL\u002FPostgress setup.md",_extension:"md"}},prerenderedAt:1667813360950}}("element","text","span","code","code-inline","","p","line","pre","ct-5ed0d1","h2","bash","sql",2,"postgres",".","pg_hba.conf",false,"install-postgresql-12-on-ubuntu-2004-lts","Install PostgreSQL 12 on Ubuntu 20.04 LTS","sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","initial-database-connection","Initial database connection","sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","set-password-for-postgres-database-user","Set password for postgres database user","update-pg_hbaconf-to-allow-postgres-user-connections-with-password","Update pg_hba.conf to allow postgres user connections with password","sudo vi \u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf\n\n...\nlocal   all             postgres                                peer\n...\n","local   all             postgres                                md5\n","sudo systemctl restart postgresql\n","psql -U postgres -d postgres -h databasehostname\n","creation-of-additional-database-users","Creation of additional database users","create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n                                   List of roles\n Role name |                         Attributes                         | Member of\n-----------+------------------------------------------------------------+-----------\n myuser    |                                                            | {}\n postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","creation-of-additional-databases","Creation of additional databases","CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres          +\n           |          |          |             |             | postgres=CTc\u002Fpostgres\n","postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","Postgress Setup","\u002Fsql\u002Fpostgress-setup","root","A local connection (from the database server) can be done by the following command:","The password for the "," database user can be set the the quick command ","\\password","\nor by ","alter user postgres password 'Supersecret'",". A connection using the "," user\nis still not possible from the \"outside\" hence to the default settings in the ","h3","In order to allow connections of the "," database user not using OS user\nauthentication, you have to update the "," which can be found under\n","\u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf","shell","Change the last section of the above line to ","md5","A restart is required in order to apply the new configuration:","Now a connection from outside the database host is possible e.g.","A database user can be created by the following command:","One can create new Postgres databases within an instance. Therefore you can use the ","psql","\ncommand to login (see above).","You can leave the ","OWNER"," section of the command, when doing so, the current user will become\nowner of the newly created database.","To change the owner of an existing database later, you can use the following command:","..."))
\ No newline at end of file
diff --git a/sql/postgress-setup/index.html b/sql/postgress-setup/index.html
index a2a3dbd..72661a4 100644
--- a/sql/postgress-setup/index.html
+++ b/sql/postgress-setup/index.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Postgress Setup • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/sql/postgress-setup/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.ed0e0070.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Postgress Setup • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/sql/postgress-setup/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH3.af0f4af9.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a aria-current="page" href="/sql/postgress-setup" class="router-link-active _active_192pu_81 _link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Postgress Setup</h1><article><div><h2 id="install-postgresql-12-on-ubuntu-2004-lts"><a href="#install-postgresql-12-on-ubuntu-2004-lts"><!--[-->Install PostgreSQL 12 on Ubuntu 20.04 LTS<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-75e384">sudo apt update</span></span><span class="line"><span class="ct-75e384">sudo apt install -y postgresql postgresql-contrib postgresql-client</span></span><span class="line"><span class="ct-75e384">sudo systemctl status postgresql.service</span></span></code></pre><!--]--></div><h2 id="initial-database-connection"><a href="#initial-database-connection"><!--[-->Initial database connection<!--]--></a></h2><p><!--[-->A local connection (from the database server) can be done by the following command:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-75e384">sudo -u postgres psql</span></span><span class="line"></span><span class="line"><span class="ct-75e384">psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))</span></span><span class="line"><span class="ct-75e384">Type </span><span class="ct-ac5306">&quot;help&quot;</span><span class="ct-75e384"> </span><span class="ct-b2131c">for</span><span class="ct-75e384"> help.</span></span><span class="line"></span><span class="line"><span class="ct-75e384">postgres=</span><span class="ct-762d70">#</span></span></code></pre><!--]--></div><h2 id="set-password-for-postgres-database-user"><a href="#set-password-for-postgres-database-user"><!--[-->Set password for postgres database user<!--]--></a></h2><p><!--[-->The password for the <code><!--[-->postgres<!--]--></code> database user can be set the the quick command <code><!--[-->\password<!--]--></code>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a aria-current="page" href="/sql/postgress-setup" class="router-link-active _active_192pu_81 _link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Postgress Setup</h1><article><div><h2 id="install-postgresql-12-on-ubuntu-2004-lts"><a href="#install-postgresql-12-on-ubuntu-2004-lts"><!--[-->Install PostgreSQL 12 on Ubuntu 20.04 LTS<!--]--></a></h2><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-5ed0d1">sudo apt update</span></span><span class="line"><span class="ct-5ed0d1">sudo apt install -y postgresql postgresql-contrib postgresql-client</span></span><span class="line"><span class="ct-5ed0d1">sudo systemctl status postgresql.service</span></span></code></pre><!--]--></div><h2 id="initial-database-connection"><a href="#initial-database-connection"><!--[-->Initial database connection<!--]--></a></h2><p><!--[-->A local connection (from the database server) can be done by the following command:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-5ed0d1">sudo -u postgres psql</span></span><span class="line"></span><span class="line"><span class="ct-5ed0d1">psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))</span></span><span class="line"><span class="ct-5ed0d1">Type </span><span class="ct-ba5945">&quot;help&quot;</span><span class="ct-5ed0d1"> </span><span class="ct-d29114">for</span><span class="ct-5ed0d1"> help.</span></span><span class="line"></span><span class="line"><span class="ct-5ed0d1">postgres=</span><span class="ct-fd9161">#</span></span></code></pre><!--]--></div><h2 id="set-password-for-postgres-database-user"><a href="#set-password-for-postgres-database-user"><!--[-->Set password for postgres database user<!--]--></a></h2><p><!--[-->The password for the <code><!--[-->postgres<!--]--></code> database user can be set the the quick command <code><!--[-->\password<!--]--></code>
 or by <code><!--[-->alter user postgres password &#39;Supersecret&#39;<!--]--></code>. A connection using the <code><!--[-->postgres<!--]--></code> user
 is still not possible from the &quot;outside&quot; hence to the default settings in the <code><!--[-->pg_hba.conf<!--]--></code>.<!--]--></p><h3 id="update-pg_hbaconf-to-allow-postgres-user-connections-with-password"><a href="#update-pg_hbaconf-to-allow-postgres-user-connections-with-password"><!--[-->Update pg_hba.conf to allow postgres user connections with password<!--]--></a></h3><p><!--[-->In order to allow connections of the <code><!--[-->postgres<!--]--></code> database user not using OS user
 authentication, you have to update the <code><!--[-->pg_hba.conf<!--]--></code> which can be found under
-<code><!--[-->/etc/postgresql/12/main/pg_hba.conf<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-75e384">sudo vi /etc/postgresql/12/main/pg_hba.conf</span></span><span class="line"></span><span class="line"><span class="ct-75e384">...</span></span><span class="line"><span class="ct-d5c976">local</span><span class="ct-75e384">   all             postgres                                peer</span></span><span class="line"><span class="ct-75e384">...</span></span></code></pre><!--]--></div><p><!--[-->Change the last section of the above line to <code><!--[-->md5<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><!----></button><!--[--><pre><code><span class="line"><span>local   all             postgres                                md5</span></span></code></pre><!--]--></div><p><!--[-->A restart is required in order to apply the new configuration:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-75e384">sudo systemctl restart postgresql</span></span></code></pre><!--]--></div><p><!--[-->Now a connection from outside the database host is possible e.g.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-75e384">psql -U postgres -d postgres -h databasehostname</span></span></code></pre><!--]--></div><h2 id="creation-of-additional-database-users"><a href="#creation-of-additional-database-users"><!--[-->Creation of additional database users<!--]--></a></h2><p><!--[-->A database user can be created by the following command:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>sql</span></button><!--[--><pre><code><span class="line"><span>create user myuser with encrypted password &#39;Supersecret&#39;;
+<code><!--[-->/etc/postgresql/12/main/pg_hba.conf<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>shell</span></button><!--[--><pre><code><span class="line"><span class="ct-5ed0d1">sudo vi /etc/postgresql/12/main/pg_hba.conf</span></span><span class="line"></span><span class="line"><span class="ct-5ed0d1">...</span></span><span class="line"><span class="ct-635706">local</span><span class="ct-5ed0d1">   all             postgres                                peer</span></span><span class="line"><span class="ct-5ed0d1">...</span></span></code></pre><!--]--></div><p><!--[-->Change the last section of the above line to <code><!--[-->md5<!--]--></code>.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><!----></button><!--[--><pre><code><span class="line"><span>local   all             postgres                                md5</span></span></code></pre><!--]--></div><p><!--[-->A restart is required in order to apply the new configuration:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-5ed0d1">sudo systemctl restart postgresql</span></span></code></pre><!--]--></div><p><!--[-->Now a connection from outside the database host is possible e.g.<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>bash</span></button><!--[--><pre><code><span class="line"><span class="ct-5ed0d1">psql -U postgres -d postgres -h databasehostname</span></span></code></pre><!--]--></div><h2 id="creation-of-additional-database-users"><a href="#creation-of-additional-database-users"><!--[-->Creation of additional database users<!--]--></a></h2><p><!--[-->A database user can be created by the following command:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>sql</span></button><!--[--><pre><code><span class="line"><span>create user myuser with encrypted password &#39;Supersecret&#39;;
 CREATE ROLE
 
 postgres=# \du
@@ -29,5 +29,5 @@ postgres=# \l
  template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
            |          |          |             |             | postgres=CTc/postgres</span></span></code></pre><!--]--></div><p><!--[-->You can leave the <code><!--[-->OWNER<!--]--></code> section of the command, when doing so, the current user will become
 owner of the newly created database.<!--]--></p><p><!--[-->To change the owner of an existing database later, you can use the following command:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>sql</span></button><!--[--><pre><code><span class="line"><span>postgres=# alter database dbname owner to myuser;
-ALTER DATABASE</span></span></code></pre><!--]--></div><style>.ct-d5c976{color:#FF7B72}.ct-762d70{color:#8B949E}.ct-b2131c{color:#FF7B72}.ct-ac5306{color:#A5D6FF}.ct-75e384{color:#C9D1D9}.light .ct-75e384{color:#657B83}.light .ct-ac5306{color:#2AA198}.light .ct-b2131c{color:#859900}.light .ct-762d70{color:#93A1A1}.light .ct-d5c976{color:#073642}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/sql/postgress-setup/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498817}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.ed0e0070.js" crossorigin></script></body>
+ALTER DATABASE</span></span></code></pre><!--]--></div><style>.ct-635706{color:#FF7B72}.ct-fd9161{color:#8B949E}.ct-d29114{color:#FF7B72}.ct-ba5945{color:#A5D6FF}.ct-5ed0d1{color:#C9D1D9}.light .ct-5ed0d1{color:#657B83}.light .ct-ba5945{color:#2AA198}.light .ct-d29114{color:#859900}.light .ct-fd9161{color:#93A1A1}.light .ct-635706{color:#073642}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/sql/postgress-setup/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813360950}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseH3.af0f4af9.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/typescript/add-global-variable-to-window/_payload.js b/typescript/add-global-variable-to-window/_payload.js
index 389ac84..49519b4 100644
--- a/typescript/add-global-variable-to-window/_payload.js
+++ b/typescript/add-global-variable-to-window/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:N,_path:O},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Of3zHqmk1n":{_path:O,_dir:k,_draft:z,_partial:z,_locale:"en",_empty:z,title:N,description:"Sometimes you want to add global variable to your window. That thing's called global module augmentation.",excerpt:{type:P,children:[{type:a,tag:i,props:{},children:[{type:b,value:Q},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:R},{type:a,tag:n,props:{href:S,rel:[t]},children:[{type:b,value:T}]},{type:b,value:A}]},{type:a,tag:i,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:X},{type:a,tag:f,props:{},children:[{type:b,value:Y}]},{type:b,value:Z}]},{type:a,tag:g,props:{code:B,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:B}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:ab}]},{type:b,value:ac},{type:a,tag:n,props:{href:ad},children:[{type:b,value:ae}]},{type:b,value:af}]},{type:a,tag:ag,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:i,props:{},children:[{type:b,value:ah},{type:a,tag:f,props:{},children:[{type:b,value:p}]},{type:b,value:ai}]},{type:a,tag:g,props:{code:E,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:E}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:aj},{type:a,tag:f,props:{},children:[{type:b,value:ak}]},{type:b,value:al},{type:a,tag:n,props:{href:am,rel:[t]},children:[{type:b,value:an}]},{type:b,value:u}]},{type:a,tag:g,props:{code:F,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:F}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:aq},{type:a,tag:f,props:{},children:[{type:b,value:ar}]},{type:b,value:as}]},{type:a,tag:g,props:{code:G,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:G}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:at},{type:a,tag:n,props:{href:au},children:[{type:b,value:av}]},{type:b,value:aw}]}]},body:{type:P,children:[{type:a,tag:i,props:{},children:[{type:b,value:Q},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:R},{type:a,tag:n,props:{href:S,rel:[t]},children:[{type:b,value:T}]},{type:b,value:A}]},{type:a,tag:i,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:X},{type:a,tag:f,props:{},children:[{type:b,value:Y}]},{type:b,value:Z}]},{type:a,tag:g,props:{code:B,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"global"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"Window"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aA}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:aB}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:aC},children:[{type:b,value:aD}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aE}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:ab}]},{type:b,value:ac},{type:a,tag:n,props:{href:ad},children:[{type:b,value:ae}]},{type:b,value:af}]},{type:a,tag:ag,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:i,props:{},children:[{type:b,value:ah},{type:a,tag:f,props:{},children:[{type:b,value:p}]},{type:b,value:ai}]},{type:a,tag:g,props:{code:E,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F Sample.ts"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"export"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:"class"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F nothing :-)"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:aj},{type:a,tag:f,props:{},children:[{type:b,value:ak}]},{type:b,value:al},{type:a,tag:n,props:{href:am,rel:[t]},children:[{type:b,value:an}]},{type:b,value:u}]},{type:a,tag:g,props:{code:F,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F fancyThings.ts"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aF}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:"module"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aA}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:aB}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:aC},children:[{type:b,value:aD}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aE}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:aq},{type:a,tag:f,props:{},children:[{type:b,value:ar}]},{type:b,value:as}]},{type:a,tag:g,props:{code:G,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aF}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:"\".\u002Fsample\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:"\".\u002FfancyThings\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:"const"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:"ct-a422a6"},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"new"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"();"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:v},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:A}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"(); "}]},{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F ok"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:at},{type:a,tag:n,props:{href:au},children:[{type:b,value:av}]},{type:b,value:aw}]},{type:a,tag:"style",children:[{type:b,value:".ct-a422a6{color:#79C0FF}.ct-42f354{color:#A5D6FF}.ct-d2a63c{color:#8B949E}.ct-b93f44{color:#79C0FF}.ct-681d7e{color:#FF7B72}.ct-c998a9{color:#D2A8FF}.ct-93f845{color:#FFA657}.ct-aa5074{color:#C9D1D9}.ct-a49f6e{color:#C9D1D9}.ct-1ecf29{color:#FF7B72}.light .ct-1ecf29{color:#073642}.light .ct-a49f6e{color:#657B83}.light .ct-aa5074{color:#268BD2}.light .ct-93f845{color:#268BD2}.light .ct-c998a9{color:#268BD2}.light .ct-681d7e{color:#859900}.light .ct-b93f44{color:#859900}.light .ct-d2a63c{color:#93A1A1}.light .ct-42f354{color:#2AA198}.light .ct-a422a6{color:#268BD2}"}]}],toc:{title:l,searchDepth:M,depth:M,links:[{id:C,depth:M,text:D}]}},_type:"markdown",_id:"content:Typescript:Add global variable to window.md",_source:"content",_file:"Typescript\u002FAdd global variable to window.md",_extension:"md"}},prerenderedAt:1667812498868}}("element","text","span","ct-a49f6e","line","code-inline","code"," ","p","ct-681d7e","typescript","","ct-1ecf29","a","pre","Sample"," {",";","window","nofollow",":","ct-aa5074","ct-c998a9","ct-d2a63c","ct-42f354",false,".","declare global {\n  interface Window {\n    doFancyThings: () =\u003E void;\n  }\n}\n","augmenting-existing-interface","Augmenting existing interface","\u002F\u002F Sample.ts\n\nexport class Sample {\n  \u002F\u002F nothing :-)\n}\n","\u002F\u002F fancyThings.ts\nimport { Sample } from \".\u002FSample\";\n\ndeclare module \".\u002FSample\" {\n  interface Sample {\n    doFancyThings: () =\u003E void;\n  }\n}\n","import { Sample } from \".\u002Fsample\";\nimport \".\u002FfancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); \u002F\u002F ok\n","  ","ct-93f845","doFancyThings","}","import",2,"Add Global Variable To Window","\u002Ftypescript\u002Fadd-global-variable-to-window","root","Sometimes you want to add global variable to your ",". That thing's called ","https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-merging.html#global-augmentation","global module augmentation","Say you need to call ","window.doFancyThings()",". For that you should augment global "," interface in ","*.d.ts"," file:","This is useful for declaring global ","window.ethereum"," (or ","window.web3",") in ","\u002Fblockchain\u002FCommon%20typescript%20examples","blockchain"," projects with typescript, which use wallet browser extensions.","h2","For example, you have class "," without any functionality:","Then you want extend it with ","doFancyThings()"," method. That can be achieved with said ","https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-merging.html#module-augmentation","module augmentation","Now you can call ","sample.doFancyThings()"," by importing both ",".ts"," files:","This example is useful for ",".\u002FFrontend\u002FVue\u002FAdding%20global%20properties%20to%20component","adding global properties to component"," in vue.js.","declare","interface","    "," () ","=\u003E","ct-b93f44","void","  }"," { "," } ","from","\".\u002FSample\"","sample"))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:N,_path:O},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Of3zHqmk1n":{_path:O,_dir:k,_draft:z,_partial:z,_locale:"en",_empty:z,title:N,description:"Sometimes you want to add global variable to your window. That thing's called global module augmentation.",excerpt:{type:P,children:[{type:a,tag:i,props:{},children:[{type:b,value:Q},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:R},{type:a,tag:n,props:{href:S,rel:[t]},children:[{type:b,value:T}]},{type:b,value:A}]},{type:a,tag:i,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:X},{type:a,tag:f,props:{},children:[{type:b,value:Y}]},{type:b,value:Z}]},{type:a,tag:g,props:{code:B,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:B}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:ab}]},{type:b,value:ac},{type:a,tag:n,props:{href:ad},children:[{type:b,value:ae}]},{type:b,value:af}]},{type:a,tag:ag,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:i,props:{},children:[{type:b,value:ah},{type:a,tag:f,props:{},children:[{type:b,value:p}]},{type:b,value:ai}]},{type:a,tag:g,props:{code:E,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:E}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:aj},{type:a,tag:f,props:{},children:[{type:b,value:ak}]},{type:b,value:al},{type:a,tag:n,props:{href:am,rel:[t]},children:[{type:b,value:an}]},{type:b,value:u}]},{type:a,tag:g,props:{code:F,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:F}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:aq},{type:a,tag:f,props:{},children:[{type:b,value:ar}]},{type:b,value:as}]},{type:a,tag:g,props:{code:G,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:G}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:at},{type:a,tag:n,props:{href:au},children:[{type:b,value:av}]},{type:b,value:aw}]}]},body:{type:P,children:[{type:a,tag:i,props:{},children:[{type:b,value:Q},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:R},{type:a,tag:n,props:{href:S,rel:[t]},children:[{type:b,value:T}]},{type:b,value:A}]},{type:a,tag:i,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:X},{type:a,tag:f,props:{},children:[{type:b,value:Y}]},{type:b,value:Z}]},{type:a,tag:g,props:{code:B,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"global"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"Window"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aA}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:aB}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:aC},children:[{type:b,value:aD}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aE}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:ab}]},{type:b,value:ac},{type:a,tag:n,props:{href:ad},children:[{type:b,value:ae}]},{type:b,value:af}]},{type:a,tag:ag,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:i,props:{},children:[{type:b,value:ah},{type:a,tag:f,props:{},children:[{type:b,value:p}]},{type:b,value:ai}]},{type:a,tag:g,props:{code:E,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F Sample.ts"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"export"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:"class"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F nothing :-)"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:aj},{type:a,tag:f,props:{},children:[{type:b,value:ak}]},{type:b,value:al},{type:a,tag:n,props:{href:am,rel:[t]},children:[{type:b,value:an}]},{type:b,value:u}]},{type:a,tag:g,props:{code:F,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F fancyThings.ts"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aF}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:"module"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aA}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:aB}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:aC},children:[{type:b,value:aD}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aE}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:aq},{type:a,tag:f,props:{},children:[{type:b,value:ar}]},{type:b,value:as}]},{type:a,tag:g,props:{code:G,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aF}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:"\".\u002Fsample\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:"\".\u002FfancyThings\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:"const"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:"ct-99c33c"},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"new"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"();"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:v},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:A}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"(); "}]},{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F ok"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:at},{type:a,tag:n,props:{href:au},children:[{type:b,value:av}]},{type:b,value:aw}]},{type:a,tag:"style",children:[{type:b,value:".ct-99c33c{color:#79C0FF}.ct-f268fe{color:#A5D6FF}.ct-4c7812{color:#8B949E}.ct-bc8811{color:#79C0FF}.ct-cac0bc{color:#FF7B72}.ct-b81177{color:#D2A8FF}.ct-1756ee{color:#FFA657}.ct-27e067{color:#C9D1D9}.ct-022adf{color:#C9D1D9}.ct-ea175a{color:#FF7B72}.light .ct-ea175a{color:#073642}.light .ct-022adf{color:#657B83}.light .ct-27e067{color:#268BD2}.light .ct-1756ee{color:#268BD2}.light .ct-b81177{color:#268BD2}.light .ct-cac0bc{color:#859900}.light .ct-bc8811{color:#859900}.light .ct-4c7812{color:#93A1A1}.light .ct-f268fe{color:#2AA198}.light .ct-99c33c{color:#268BD2}"}]}],toc:{title:l,searchDepth:M,depth:M,links:[{id:C,depth:M,text:D}]}},_type:"markdown",_id:"content:Typescript:Add global variable to window.md",_source:"content",_file:"Typescript\u002FAdd global variable to window.md",_extension:"md"}},prerenderedAt:1667813361029}}("element","text","span","ct-022adf","line","code-inline","code"," ","p","ct-cac0bc","typescript","","ct-ea175a","a","pre","Sample"," {",";","window","nofollow",":","ct-27e067","ct-b81177","ct-4c7812","ct-f268fe",false,".","declare global {\n  interface Window {\n    doFancyThings: () =\u003E void;\n  }\n}\n","augmenting-existing-interface","Augmenting existing interface","\u002F\u002F Sample.ts\n\nexport class Sample {\n  \u002F\u002F nothing :-)\n}\n","\u002F\u002F fancyThings.ts\nimport { Sample } from \".\u002FSample\";\n\ndeclare module \".\u002FSample\" {\n  interface Sample {\n    doFancyThings: () =\u003E void;\n  }\n}\n","import { Sample } from \".\u002Fsample\";\nimport \".\u002FfancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); \u002F\u002F ok\n","  ","ct-1756ee","doFancyThings","}","import",2,"Add Global Variable To Window","\u002Ftypescript\u002Fadd-global-variable-to-window","root","Sometimes you want to add global variable to your ",". That thing's called ","https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-merging.html#global-augmentation","global module augmentation","Say you need to call ","window.doFancyThings()",". For that you should augment global "," interface in ","*.d.ts"," file:","This is useful for declaring global ","window.ethereum"," (or ","window.web3",") in ","\u002Fblockchain\u002FCommon%20typescript%20examples","blockchain"," projects with typescript, which use wallet browser extensions.","h2","For example, you have class "," without any functionality:","Then you want extend it with ","doFancyThings()"," method. That can be achieved with said ","https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-merging.html#module-augmentation","module augmentation","Now you can call ","sample.doFancyThings()"," by importing both ",".ts"," files:","This example is useful for ",".\u002FFrontend\u002FVue\u002FAdding%20global%20properties%20to%20component","adding global properties to component"," in vue.js.","declare","interface","    "," () ","=\u003E","ct-bc8811","void","  }"," { "," } ","from","\".\u002FSample\"","sample"))
\ No newline at end of file
diff --git a/typescript/add-global-variable-to-window/index.html b/typescript/add-global-variable-to-window/index.html
index 7d72d37..719a90e 100644
--- a/typescript/add-global-variable-to-window/index.html
+++ b/typescript/add-global-variable-to-window/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Add Global Variable To Window • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Sometimes you want to add global variable to your window. That thing's called global module augmentation."><meta name="head:count" content="3"><link rel="modulepreload" href="/typescript/add-global-variable-to-window/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.e5674627.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.25efea15.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Add Global Variable To Window • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Sometimes you want to add global variable to your window. That thing's called global module augmentation."><meta name="head:count" content="3"><link rel="modulepreload" href="/typescript/add-global-variable-to-window/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseH2.83df4280.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCodeInline.747a7c37.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/typescript/add-global-variable-to-window" class="router-link-active _active_192pu_81 _link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Add Global Variable To Window</h1><article><div><p><!--[-->Sometimes you want to add global variable to your <code><!--[-->window<!--]--></code>. That thing&#39;s called <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation" rel="nofollow" target="_blank"><!--[-->global module augmentation<!--]--></a>.<!--]--></p><p><!--[-->Say you need to call <code><!--[-->window.doFancyThings()<!--]--></code>. For that you should augment global <code><!--[-->window<!--]--></code> interface in <code><!--[-->*.d.ts<!--]--></code> file:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-1ecf29">declare</span><span class="ct-a49f6e"> </span><span class="ct-aa5074">global</span><span class="ct-a49f6e"> {</span></span><span class="line"><span class="ct-a49f6e">  </span><span class="ct-1ecf29">interface</span><span class="ct-a49f6e"> </span><span class="ct-93f845">Window</span><span class="ct-a49f6e"> {</span></span><span class="line"><span class="ct-a49f6e">    </span><span class="ct-c998a9">doFancyThings</span><span class="ct-681d7e">:</span><span class="ct-a49f6e"> () </span><span class="ct-1ecf29">=&gt;</span><span class="ct-a49f6e"> </span><span class="ct-b93f44">void</span><span class="ct-a49f6e">;</span></span><span class="line"><span class="ct-a49f6e">  }</span></span><span class="line"><span class="ct-a49f6e">}</span></span></code></pre><!--]--></div><p><!--[-->This is useful for declaring global <code><!--[-->window.ethereum<!--]--></code> (or <code><!--[-->window.web3<!--]--></code>) in <a href="/blockchain/common-typescript-examples" class=""><!--[-->blockchain<!--]--></a> projects with typescript, which use wallet browser extensions.<!--]--></p><h2 id="augmenting-existing-interface"><a href="#augmenting-existing-interface"><!--[-->Augmenting existing interface<!--]--></a></h2><p><!--[-->For example, you have class <code><!--[-->Sample<!--]--></code> without any functionality:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-d2a63c">// Sample.ts</span></span><span class="line"></span><span class="line"><span class="ct-681d7e">export</span><span class="ct-a49f6e"> </span><span class="ct-1ecf29">class</span><span class="ct-a49f6e"> </span><span class="ct-93f845">Sample</span><span class="ct-a49f6e"> {</span></span><span class="line"><span class="ct-a49f6e">  </span><span class="ct-d2a63c">// nothing :-)</span></span><span class="line"><span class="ct-a49f6e">}</span></span></code></pre><!--]--></div><p><!--[-->Then you want extend it with <code><!--[-->doFancyThings()<!--]--></code> method. That can be achieved with said <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation" rel="nofollow" target="_blank"><!--[-->module augmentation<!--]--></a>:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-d2a63c">// fancyThings.ts</span></span><span class="line"><span class="ct-681d7e">import</span><span class="ct-a49f6e"> { </span><span class="ct-aa5074">Sample</span><span class="ct-a49f6e"> } </span><span class="ct-681d7e">from</span><span class="ct-a49f6e"> </span><span class="ct-42f354">&quot;./Sample&quot;</span><span class="ct-a49f6e">;</span></span><span class="line"></span><span class="line"><span class="ct-1ecf29">declare</span><span class="ct-a49f6e"> </span><span class="ct-1ecf29">module</span><span class="ct-a49f6e"> </span><span class="ct-42f354">&quot;./Sample&quot;</span><span class="ct-a49f6e"> {</span></span><span class="line"><span class="ct-a49f6e">  </span><span class="ct-1ecf29">interface</span><span class="ct-a49f6e"> </span><span class="ct-93f845">Sample</span><span class="ct-a49f6e"> {</span></span><span class="line"><span class="ct-a49f6e">    </span><span class="ct-c998a9">doFancyThings</span><span class="ct-681d7e">:</span><span class="ct-a49f6e"> () </span><span class="ct-1ecf29">=&gt;</span><span class="ct-a49f6e"> </span><span class="ct-b93f44">void</span><span class="ct-a49f6e">;</span></span><span class="line"><span class="ct-a49f6e">  }</span></span><span class="line"><span class="ct-a49f6e">}</span></span></code></pre><!--]--></div><p><!--[-->Now you can call <code><!--[-->sample.doFancyThings()<!--]--></code> by importing both <code><!--[-->.ts<!--]--></code> files:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-681d7e">import</span><span class="ct-a49f6e"> { </span><span class="ct-aa5074">Sample</span><span class="ct-a49f6e"> } </span><span class="ct-681d7e">from</span><span class="ct-a49f6e"> </span><span class="ct-42f354">&quot;./sample&quot;</span><span class="ct-a49f6e">;</span></span><span class="line"><span class="ct-681d7e">import</span><span class="ct-a49f6e"> </span><span class="ct-42f354">&quot;./fancyThings&quot;</span><span class="ct-a49f6e">;</span></span><span class="line"></span><span class="line"><span class="ct-1ecf29">const</span><span class="ct-a49f6e"> </span><span class="ct-a422a6">sample</span><span class="ct-a49f6e"> </span><span class="ct-681d7e">=</span><span class="ct-a49f6e"> </span><span class="ct-681d7e">new</span><span class="ct-a49f6e"> </span><span class="ct-c998a9">Sample</span><span class="ct-a49f6e">();</span></span><span class="line"><span class="ct-aa5074">sample</span><span class="ct-a49f6e">.</span><span class="ct-c998a9">doFancyThings</span><span class="ct-a49f6e">(); </span><span class="ct-d2a63c">// ok</span></span></code></pre><!--]--></div><p><!--[-->This example is useful for <a href="/typescript/frontend/vue/adding-global-properties-to-component" class=""><!--[-->adding global properties to component<!--]--></a> in vue.js.<!--]--></p><style>.ct-a422a6{color:#79C0FF}.ct-42f354{color:#A5D6FF}.ct-d2a63c{color:#8B949E}.ct-b93f44{color:#79C0FF}.ct-681d7e{color:#FF7B72}.ct-c998a9{color:#D2A8FF}.ct-93f845{color:#FFA657}.ct-aa5074{color:#C9D1D9}.ct-a49f6e{color:#C9D1D9}.ct-1ecf29{color:#FF7B72}.light .ct-1ecf29{color:#073642}.light .ct-a49f6e{color:#657B83}.light .ct-aa5074{color:#268BD2}.light .ct-93f845{color:#268BD2}.light .ct-c998a9{color:#268BD2}.light .ct-681d7e{color:#859900}.light .ct-b93f44{color:#859900}.light .ct-d2a63c{color:#93A1A1}.light .ct-42f354{color:#2AA198}.light .ct-a422a6{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/add-global-variable-to-window/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498868}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.e5674627.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.25efea15.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a aria-current="page" href="/typescript/add-global-variable-to-window" class="router-link-active _active_192pu_81 _link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Add Global Variable To Window</h1><article><div><p><!--[-->Sometimes you want to add global variable to your <code><!--[-->window<!--]--></code>. That thing&#39;s called <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation" rel="nofollow" target="_blank"><!--[-->global module augmentation<!--]--></a>.<!--]--></p><p><!--[-->Say you need to call <code><!--[-->window.doFancyThings()<!--]--></code>. For that you should augment global <code><!--[-->window<!--]--></code> interface in <code><!--[-->*.d.ts<!--]--></code> file:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-ea175a">declare</span><span class="ct-022adf"> </span><span class="ct-27e067">global</span><span class="ct-022adf"> {</span></span><span class="line"><span class="ct-022adf">  </span><span class="ct-ea175a">interface</span><span class="ct-022adf"> </span><span class="ct-1756ee">Window</span><span class="ct-022adf"> {</span></span><span class="line"><span class="ct-022adf">    </span><span class="ct-b81177">doFancyThings</span><span class="ct-cac0bc">:</span><span class="ct-022adf"> () </span><span class="ct-ea175a">=&gt;</span><span class="ct-022adf"> </span><span class="ct-bc8811">void</span><span class="ct-022adf">;</span></span><span class="line"><span class="ct-022adf">  }</span></span><span class="line"><span class="ct-022adf">}</span></span></code></pre><!--]--></div><p><!--[-->This is useful for declaring global <code><!--[-->window.ethereum<!--]--></code> (or <code><!--[-->window.web3<!--]--></code>) in <a href="/blockchain/common-typescript-examples" class=""><!--[-->blockchain<!--]--></a> projects with typescript, which use wallet browser extensions.<!--]--></p><h2 id="augmenting-existing-interface"><a href="#augmenting-existing-interface"><!--[-->Augmenting existing interface<!--]--></a></h2><p><!--[-->For example, you have class <code><!--[-->Sample<!--]--></code> without any functionality:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4c7812">// Sample.ts</span></span><span class="line"></span><span class="line"><span class="ct-cac0bc">export</span><span class="ct-022adf"> </span><span class="ct-ea175a">class</span><span class="ct-022adf"> </span><span class="ct-1756ee">Sample</span><span class="ct-022adf"> {</span></span><span class="line"><span class="ct-022adf">  </span><span class="ct-4c7812">// nothing :-)</span></span><span class="line"><span class="ct-022adf">}</span></span></code></pre><!--]--></div><p><!--[-->Then you want extend it with <code><!--[-->doFancyThings()<!--]--></code> method. That can be achieved with said <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation" rel="nofollow" target="_blank"><!--[-->module augmentation<!--]--></a>:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4c7812">// fancyThings.ts</span></span><span class="line"><span class="ct-cac0bc">import</span><span class="ct-022adf"> { </span><span class="ct-27e067">Sample</span><span class="ct-022adf"> } </span><span class="ct-cac0bc">from</span><span class="ct-022adf"> </span><span class="ct-f268fe">&quot;./Sample&quot;</span><span class="ct-022adf">;</span></span><span class="line"></span><span class="line"><span class="ct-ea175a">declare</span><span class="ct-022adf"> </span><span class="ct-ea175a">module</span><span class="ct-022adf"> </span><span class="ct-f268fe">&quot;./Sample&quot;</span><span class="ct-022adf"> {</span></span><span class="line"><span class="ct-022adf">  </span><span class="ct-ea175a">interface</span><span class="ct-022adf"> </span><span class="ct-1756ee">Sample</span><span class="ct-022adf"> {</span></span><span class="line"><span class="ct-022adf">    </span><span class="ct-b81177">doFancyThings</span><span class="ct-cac0bc">:</span><span class="ct-022adf"> () </span><span class="ct-ea175a">=&gt;</span><span class="ct-022adf"> </span><span class="ct-bc8811">void</span><span class="ct-022adf">;</span></span><span class="line"><span class="ct-022adf">  }</span></span><span class="line"><span class="ct-022adf">}</span></span></code></pre><!--]--></div><p><!--[-->Now you can call <code><!--[-->sample.doFancyThings()<!--]--></code> by importing both <code><!--[-->.ts<!--]--></code> files:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-cac0bc">import</span><span class="ct-022adf"> { </span><span class="ct-27e067">Sample</span><span class="ct-022adf"> } </span><span class="ct-cac0bc">from</span><span class="ct-022adf"> </span><span class="ct-f268fe">&quot;./sample&quot;</span><span class="ct-022adf">;</span></span><span class="line"><span class="ct-cac0bc">import</span><span class="ct-022adf"> </span><span class="ct-f268fe">&quot;./fancyThings&quot;</span><span class="ct-022adf">;</span></span><span class="line"></span><span class="line"><span class="ct-ea175a">const</span><span class="ct-022adf"> </span><span class="ct-99c33c">sample</span><span class="ct-022adf"> </span><span class="ct-cac0bc">=</span><span class="ct-022adf"> </span><span class="ct-cac0bc">new</span><span class="ct-022adf"> </span><span class="ct-b81177">Sample</span><span class="ct-022adf">();</span></span><span class="line"><span class="ct-27e067">sample</span><span class="ct-022adf">.</span><span class="ct-b81177">doFancyThings</span><span class="ct-022adf">(); </span><span class="ct-4c7812">// ok</span></span></code></pre><!--]--></div><p><!--[-->This example is useful for <a href="/typescript/frontend/vue/adding-global-properties-to-component" class=""><!--[-->adding global properties to component<!--]--></a> in vue.js.<!--]--></p><style>.ct-99c33c{color:#79C0FF}.ct-f268fe{color:#A5D6FF}.ct-4c7812{color:#8B949E}.ct-bc8811{color:#79C0FF}.ct-cac0bc{color:#FF7B72}.ct-b81177{color:#D2A8FF}.ct-1756ee{color:#FFA657}.ct-27e067{color:#C9D1D9}.ct-022adf{color:#C9D1D9}.ct-ea175a{color:#FF7B72}.light .ct-ea175a{color:#073642}.light .ct-022adf{color:#657B83}.light .ct-27e067{color:#268BD2}.light .ct-1756ee{color:#268BD2}.light .ct-b81177{color:#268BD2}.light .ct-cac0bc{color:#859900}.light .ct-bc8811{color:#859900}.light .ct-4c7812{color:#93A1A1}.light .ct-f268fe{color:#2AA198}.light .ct-99c33c{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/add-global-variable-to-window/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813361029}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseH2.83df4280.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCodeInline.747a7c37.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/typescript/flatten-object-with-periods/_payload.js b/typescript/flatten-object-with-periods/_payload.js
index 76e96da..b101e47 100644
--- a/typescript/flatten-object-with-periods/_payload.js
+++ b/typescript/flatten-object-with-periods/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:X,_path:Y},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3yyO3sZiNO":{_path:Y,_dir:z,_draft:I,_partial:I,_locale:J,_empty:I,title:X,description:K,excerpt:{type:Z,children:[{type:a,tag:u,props:{},children:[{type:c,value:K}]},{type:a,tag:u,props:{},children:[{type:c,value:_},{type:a,tag:$,props:{href:aa,rel:[ab]},children:[{type:c,value:ac}]},{type:c,value:ad}]},{type:a,tag:m,props:{code:L,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:c,value:L}]}]}]},{type:a,tag:u,props:{},children:[{type:c,value:ae}]},{type:a,tag:m,props:{code:M,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:c,value:M}]}]}]}]},body:{type:Z,children:[{type:a,tag:u,props:{},children:[{type:c,value:K}]},{type:a,tag:u,props:{},children:[{type:c,value:_},{type:a,tag:$,props:{href:aa,rel:[ab]},children:[{type:c,value:ac}]},{type:c,value:ad}]},{type:a,tag:m,props:{code:L,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"import"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'.\u002Fen.json'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"typeof"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:ah},children:[{type:c,value:"const"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-ae19b1"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:" ("}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:al},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:al},children:[{type:c,value:"TranslateOptions"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:") "}]},{type:a,tag:b,props:{class:ah},children:[{type:c,value:"=\u003E"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"I18nLib"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"."}]},{type:a,tag:b,props:{class:"ct-c2ecc5"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"("}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:");"}]}]}]}]}]},{type:a,tag:u,props:{},children:[{type:c,value:ae}]},{type:a,tag:m,props:{code:M,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F This one based on answer from StackOverflow:"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58434389\u002Ftypescript-deep-keyof-of-a-nested-object"}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F plural object"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"object"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"in"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"-?:"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]\u003E\u003E }["}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F Fix it for you plural form"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"Record"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'one'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'few'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'many'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"`${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}${''"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'.'}${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}`"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"1"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"3"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"4"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"..."}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"Array"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E];"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-3d66f1{color:#A5D6FF}.ct-62e845{color:#79C0FF}.ct-d16a4a{color:#79C0FF}.ct-5413fc{color:#8B949E}.ct-c2ecc5{color:#D2A8FF}.ct-894712{color:#FFA657}.ct-f0e7aa{color:#FFA657}.ct-35880f{color:#FF7B72}.ct-ae19b1{color:#D2A8FF}.ct-204eca{color:#C9D1D9}.ct-3c112b{color:#FF7B72}.ct-30ff73{color:#FFA657}.ct-86b04a{color:#FF7B72}.ct-222f42{color:#A5D6FF}.ct-c00405{color:#C9D1D9}.ct-ff8763{color:#C9D1D9}.ct-8087a0{color:#FF7B72}.light .ct-8087a0{color:#859900}.light .ct-ff8763{color:#657B83}.light .ct-c00405{color:#268BD2}.light .ct-222f42{color:#2AA198}.light .ct-86b04a{color:#073642}.light .ct-30ff73{color:#268BD2}.light .ct-3c112b{color:#073642}.light .ct-204eca{color:#657B83}.light .ct-ae19b1{color:#268BD2}.light .ct-35880f{color:#859900}.light .ct-f0e7aa{color:#657B83}.light .ct-894712{color:#268BD2}.light .ct-c2ecc5{color:#268BD2}.light .ct-5413fc{color:#93A1A1}.light .ct-d16a4a{color:#859900}.light .ct-62e845{color:#D33682}.light .ct-3d66f1{color:#657B83}"}]}],toc:{title:A,searchDepth:av,depth:av,links:[]}},_type:"markdown",_id:"content:Typescript:Flatten object with periods.md",_source:"content",_file:"Typescript\u002FFlatten object with periods.md",_extension:"md"}},prerenderedAt:1667812498912}}("element","span","text","ct-ff8763"," ","ct-8087a0","ct-30ff73","line",", ","ct-86b04a","ct-d16a4a","ct-222f42","code","ct-62e845","  ","=","\u003C","ct-204eca",":","extends","p","T","?","K","ct-3d66f1","typescript","","ct-c00405","type","never","pre","ct-5413fc","|","P",false,"en","This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","import en from '.\u002Fen.json';\ntype TranslationPath = Flatten\u003Ctypeof en\u003E;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =\u003E\n    I18nLib.t(key, options);\n","\u002F\u002F This one based on answer from StackOverflow:\n\u002F\u002F https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58434389\u002Ftypescript-deep-keyof-of-a-nested-object\n\nexport type Flatten\u003CT, D extends number = 5\u003E = [D] extends [never]\n  ? never\n  : T extends PluralForm \u002F\u002F plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join\u003CK, Flatten\u003CT[K], Prev[D]\u003E\u003E }[keyof T]\n  : '';\n\n\u002F\u002F Fix it for you plural form\ntype PluralForm = Record\u003C'one' | 'few' | 'many', string\u003E;\n\ntype Join\u003CK, P\u003E = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array\u003C0\u003E];\n",";","Flatten","ct-35880f","    ","D","number"," [","]","''","string","Flatten Object With Periods","\u002Ftypescript\u002Fflatten-object-with-periods","root","Used for typing ","a","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fi18n-js","nofollow","i18n.js"," dictionaries;","Flatten type defined here:","TranslationPath","\u003E;","ct-3c112b","t","ct-f0e7aa","key","ct-894712","options","5","\u003E ","PluralForm","keyof","Join","[","Prev","0",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:X,_path:Y},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3yyO3sZiNO":{_path:Y,_dir:z,_draft:I,_partial:I,_locale:J,_empty:I,title:X,description:K,excerpt:{type:Z,children:[{type:a,tag:u,props:{},children:[{type:c,value:K}]},{type:a,tag:u,props:{},children:[{type:c,value:_},{type:a,tag:$,props:{href:aa,rel:[ab]},children:[{type:c,value:ac}]},{type:c,value:ad}]},{type:a,tag:m,props:{code:L,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:c,value:L}]}]}]},{type:a,tag:u,props:{},children:[{type:c,value:ae}]},{type:a,tag:m,props:{code:M,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:c,value:M}]}]}]}]},body:{type:Z,children:[{type:a,tag:u,props:{},children:[{type:c,value:K}]},{type:a,tag:u,props:{},children:[{type:c,value:_},{type:a,tag:$,props:{href:aa,rel:[ab]},children:[{type:c,value:ac}]},{type:c,value:ad}]},{type:a,tag:m,props:{code:L,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"import"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'.\u002Fen.json'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"typeof"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:ah},children:[{type:c,value:"const"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-d9c4ba"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:" ("}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:al},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:al},children:[{type:c,value:"TranslateOptions"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:") "}]},{type:a,tag:b,props:{class:ah},children:[{type:c,value:"=\u003E"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"I18nLib"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"."}]},{type:a,tag:b,props:{class:"ct-c84cf5"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"("}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:");"}]}]}]}]}]},{type:a,tag:u,props:{},children:[{type:c,value:ae}]},{type:a,tag:m,props:{code:M,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F This one based on answer from StackOverflow:"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58434389\u002Ftypescript-deep-keyof-of-a-nested-object"}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F plural object"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"object"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"in"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"-?:"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]\u003E\u003E }["}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F Fix it for you plural form"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"Record"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'one'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'few'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'many'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"`${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}${''"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'.'}${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}`"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"1"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"3"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"4"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"..."}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"Array"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E];"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-a4e364{color:#A5D6FF}.ct-45e961{color:#79C0FF}.ct-caf09a{color:#79C0FF}.ct-4a1326{color:#8B949E}.ct-c84cf5{color:#D2A8FF}.ct-ab0f84{color:#FFA657}.ct-b48404{color:#FFA657}.ct-3b8dd8{color:#FF7B72}.ct-d9c4ba{color:#D2A8FF}.ct-d973b6{color:#C9D1D9}.ct-21324f{color:#FF7B72}.ct-9afba2{color:#FFA657}.ct-01c2c6{color:#FF7B72}.ct-dc52a6{color:#A5D6FF}.ct-f5c6d3{color:#C9D1D9}.ct-7ec1ee{color:#C9D1D9}.ct-7c02fe{color:#FF7B72}.light .ct-7c02fe{color:#859900}.light .ct-7ec1ee{color:#657B83}.light .ct-f5c6d3{color:#268BD2}.light .ct-dc52a6{color:#2AA198}.light .ct-01c2c6{color:#073642}.light .ct-9afba2{color:#268BD2}.light .ct-21324f{color:#073642}.light .ct-d973b6{color:#657B83}.light .ct-d9c4ba{color:#268BD2}.light .ct-3b8dd8{color:#859900}.light .ct-b48404{color:#657B83}.light .ct-ab0f84{color:#268BD2}.light .ct-c84cf5{color:#268BD2}.light .ct-4a1326{color:#93A1A1}.light .ct-caf09a{color:#859900}.light .ct-45e961{color:#D33682}.light .ct-a4e364{color:#657B83}"}]}],toc:{title:A,searchDepth:av,depth:av,links:[]}},_type:"markdown",_id:"content:Typescript:Flatten object with periods.md",_source:"content",_file:"Typescript\u002FFlatten object with periods.md",_extension:"md"}},prerenderedAt:1667813361075}}("element","span","text","ct-7ec1ee"," ","ct-7c02fe","ct-9afba2","line",", ","ct-01c2c6","ct-caf09a","ct-dc52a6","code","ct-45e961","  ","=","\u003C","ct-d973b6",":","extends","p","T","?","K","ct-a4e364","typescript","","ct-f5c6d3","type","never","pre","ct-4a1326","|","P",false,"en","This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","import en from '.\u002Fen.json';\ntype TranslationPath = Flatten\u003Ctypeof en\u003E;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =\u003E\n    I18nLib.t(key, options);\n","\u002F\u002F This one based on answer from StackOverflow:\n\u002F\u002F https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58434389\u002Ftypescript-deep-keyof-of-a-nested-object\n\nexport type Flatten\u003CT, D extends number = 5\u003E = [D] extends [never]\n  ? never\n  : T extends PluralForm \u002F\u002F plural object\n  ? ''\n  : T extends object\n  ? { [K in keyof T]-?: Join\u003CK, Flatten\u003CT[K], Prev[D]\u003E\u003E }[keyof T]\n  : '';\n\n\u002F\u002F Fix it for you plural form\ntype PluralForm = Record\u003C'one' | 'few' | 'many', string\u003E;\n\ntype Join\u003CK, P\u003E = K extends string | number\n  ? P extends string | number\n    ? `${K}${'' extends P ? '' : '.'}${P}`\n    : never\n  : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array\u003C0\u003E];\n",";","Flatten","ct-3b8dd8","    ","D","number"," [","]","''","string","Flatten Object With Periods","\u002Ftypescript\u002Fflatten-object-with-periods","root","Used for typing ","a","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fi18n-js","nofollow","i18n.js"," dictionaries;","Flatten type defined here:","TranslationPath","\u003E;","ct-21324f","t","ct-b48404","key","ct-ab0f84","options","5","\u003E ","PluralForm","keyof","Join","[","Prev","0",2))
\ No newline at end of file
diff --git a/typescript/flatten-object-with-periods/index.html b/typescript/flatten-object-with-periods/index.html
index fcd209d..f4a57c1 100644
--- a/typescript/flatten-object-with-periods/index.html
+++ b/typescript/flatten-object-with-periods/index.html
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
 <head><title>Flatten Object With Periods • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="This helper generates Typescript types for i18n dictionary json
-files by flattening it with period delimiter. Supports plural forms."><meta name="head:count" content="3"><link rel="modulepreload" href="/typescript/flatten-object-with-periods/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.989de2dc.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+files by flattening it with period delimiter. Supports plural forms."><meta name="head:count" content="3"><link rel="modulepreload" href="/typescript/flatten-object-with-periods/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseA.435cdbf8.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
 <body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a aria-current="page" href="/typescript/flatten-object-with-periods" class="router-link-active _active_192pu_81 _link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Flatten Object With Periods</h1><article><div><p><!--[-->This helper generates Typescript types for i18n dictionary json
-files by flattening it with period delimiter. Supports plural forms.<!--]--></p><p><!--[-->Used for typing <a href="https://www.npmjs.com/package/i18n-js" rel="nofollow" target="_blank"><!--[-->i18n.js<!--]--></a> dictionaries;<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-8087a0">import</span><span class="ct-ff8763"> </span><span class="ct-c00405">en</span><span class="ct-ff8763"> </span><span class="ct-8087a0">from</span><span class="ct-ff8763"> </span><span class="ct-222f42">&#39;./en.json&#39;</span><span class="ct-ff8763">;</span></span><span class="line"><span class="ct-86b04a">type</span><span class="ct-ff8763"> </span><span class="ct-30ff73">TranslationPath</span><span class="ct-ff8763"> </span><span class="ct-8087a0">=</span><span class="ct-ff8763"> </span><span class="ct-30ff73">Flatten</span><span class="ct-ff8763">&lt;</span><span class="ct-8087a0">typeof</span><span class="ct-ff8763"> </span><span class="ct-c00405">en</span><span class="ct-ff8763">&gt;;</span></span><span class="line"></span><span class="line"><span class="ct-3c112b">const</span><span class="ct-204eca"> </span><span class="ct-ae19b1">t</span><span class="ct-204eca"> </span><span class="ct-35880f">=</span><span class="ct-204eca"> (</span><span class="ct-f0e7aa">key</span><span class="ct-35880f">:</span><span class="ct-204eca"> </span><span class="ct-894712">TranslationPath</span><span class="ct-204eca">, </span><span class="ct-f0e7aa">options</span><span class="ct-35880f">?:</span><span class="ct-204eca"> </span><span class="ct-894712">TranslateOptions</span><span class="ct-204eca">) </span><span class="ct-3c112b">=&gt;</span></span><span class="line"><span class="ct-ff8763">    </span><span class="ct-c00405">I18nLib</span><span class="ct-ff8763">.</span><span class="ct-c2ecc5">t</span><span class="ct-ff8763">(</span><span class="ct-c00405">key</span><span class="ct-ff8763">, </span><span class="ct-c00405">options</span><span class="ct-ff8763">);</span></span></code></pre><!--]--></div><p><!--[-->Flatten type defined here:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-5413fc">// This one based on answer from StackOverflow:</span></span><span class="line"><span class="ct-5413fc">// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object</span></span><span class="line"></span><span class="line"><span class="ct-8087a0">export</span><span class="ct-ff8763"> </span><span class="ct-86b04a">type</span><span class="ct-ff8763"> </span><span class="ct-30ff73">Flatten</span><span class="ct-ff8763">&lt;</span><span class="ct-30ff73">T</span><span class="ct-ff8763">, </span><span class="ct-30ff73">D</span><span class="ct-ff8763"> </span><span class="ct-86b04a">extends</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">number</span><span class="ct-ff8763"> </span><span class="ct-8087a0">=</span><span class="ct-ff8763"> </span><span class="ct-62e845">5</span><span class="ct-ff8763">&gt; </span><span class="ct-8087a0">=</span><span class="ct-ff8763"> [</span><span class="ct-30ff73">D</span><span class="ct-ff8763">] </span><span class="ct-86b04a">extends</span><span class="ct-ff8763"> [</span><span class="ct-d16a4a">never</span><span class="ct-ff8763">]</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">?</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">never</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">:</span><span class="ct-ff8763"> </span><span class="ct-30ff73">T</span><span class="ct-ff8763"> </span><span class="ct-86b04a">extends</span><span class="ct-ff8763"> </span><span class="ct-30ff73">PluralForm</span><span class="ct-ff8763"> </span><span class="ct-5413fc">// plural object</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">?</span><span class="ct-ff8763"> </span><span class="ct-222f42">&#39;&#39;</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">:</span><span class="ct-ff8763"> </span><span class="ct-30ff73">T</span><span class="ct-ff8763"> </span><span class="ct-86b04a">extends</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">object</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">?</span><span class="ct-ff8763"> { [</span><span class="ct-30ff73">K</span><span class="ct-ff8763"> </span><span class="ct-8087a0">in</span><span class="ct-ff8763"> </span><span class="ct-8087a0">keyof</span><span class="ct-ff8763"> </span><span class="ct-30ff73">T</span><span class="ct-ff8763">]</span><span class="ct-8087a0">-?:</span><span class="ct-ff8763"> </span><span class="ct-30ff73">Join</span><span class="ct-ff8763">&lt;</span><span class="ct-30ff73">K</span><span class="ct-ff8763">, </span><span class="ct-30ff73">Flatten</span><span class="ct-ff8763">&lt;</span><span class="ct-30ff73">T</span><span class="ct-ff8763">[</span><span class="ct-30ff73">K</span><span class="ct-ff8763">], </span><span class="ct-30ff73">Prev</span><span class="ct-ff8763">[</span><span class="ct-30ff73">D</span><span class="ct-ff8763">]&gt;&gt; }[</span><span class="ct-8087a0">keyof</span><span class="ct-ff8763"> </span><span class="ct-30ff73">T</span><span class="ct-ff8763">]</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">:</span><span class="ct-ff8763"> </span><span class="ct-222f42">&#39;&#39;</span><span class="ct-ff8763">;</span></span><span class="line"></span><span class="line"><span class="ct-5413fc">// Fix it for you plural form</span></span><span class="line"><span class="ct-86b04a">type</span><span class="ct-ff8763"> </span><span class="ct-30ff73">PluralForm</span><span class="ct-ff8763"> </span><span class="ct-8087a0">=</span><span class="ct-ff8763"> </span><span class="ct-30ff73">Record</span><span class="ct-ff8763">&lt;</span><span class="ct-222f42">&#39;one&#39;</span><span class="ct-ff8763"> </span><span class="ct-8087a0">|</span><span class="ct-ff8763"> </span><span class="ct-222f42">&#39;few&#39;</span><span class="ct-ff8763"> </span><span class="ct-8087a0">|</span><span class="ct-ff8763"> </span><span class="ct-222f42">&#39;many&#39;</span><span class="ct-ff8763">, </span><span class="ct-d16a4a">string</span><span class="ct-ff8763">&gt;;</span></span><span class="line"></span><span class="line"><span class="ct-86b04a">type</span><span class="ct-ff8763"> </span><span class="ct-30ff73">Join</span><span class="ct-ff8763">&lt;</span><span class="ct-30ff73">K</span><span class="ct-ff8763">, </span><span class="ct-30ff73">P</span><span class="ct-ff8763">&gt; </span><span class="ct-8087a0">=</span><span class="ct-ff8763"> </span><span class="ct-30ff73">K</span><span class="ct-ff8763"> </span><span class="ct-86b04a">extends</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">string</span><span class="ct-ff8763"> </span><span class="ct-8087a0">|</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">number</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">?</span><span class="ct-ff8763"> </span><span class="ct-30ff73">P</span><span class="ct-ff8763"> </span><span class="ct-86b04a">extends</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">string</span><span class="ct-ff8763"> </span><span class="ct-8087a0">|</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">number</span></span><span class="line"><span class="ct-ff8763">    </span><span class="ct-8087a0">?</span><span class="ct-ff8763"> </span><span class="ct-222f42">`${</span><span class="ct-30ff73">K</span><span class="ct-222f42">}${&#39;&#39;</span><span class="ct-3d66f1"> </span><span class="ct-86b04a">extends</span><span class="ct-3d66f1"> </span><span class="ct-30ff73">P</span><span class="ct-3d66f1"> </span><span class="ct-8087a0">?</span><span class="ct-3d66f1"> </span><span class="ct-222f42">&#39;&#39;</span><span class="ct-3d66f1"> </span><span class="ct-8087a0">:</span><span class="ct-3d66f1"> </span><span class="ct-222f42">&#39;.&#39;}${</span><span class="ct-30ff73">P</span><span class="ct-222f42">}`</span></span><span class="line"><span class="ct-ff8763">    </span><span class="ct-8087a0">:</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">never</span></span><span class="line"><span class="ct-ff8763">  </span><span class="ct-8087a0">:</span><span class="ct-ff8763"> </span><span class="ct-d16a4a">never</span><span class="ct-ff8763">;</span></span><span class="line"></span><span class="line"><span class="ct-86b04a">type</span><span class="ct-ff8763"> </span><span class="ct-30ff73">Prev</span><span class="ct-ff8763"> </span><span class="ct-8087a0">=</span><span class="ct-ff8763"> [</span><span class="ct-d16a4a">never</span><span class="ct-ff8763">, </span><span class="ct-62e845">0</span><span class="ct-ff8763">, </span><span class="ct-62e845">1</span><span class="ct-ff8763">, </span><span class="ct-62e845">2</span><span class="ct-ff8763">, </span><span class="ct-62e845">3</span><span class="ct-ff8763">, </span><span class="ct-62e845">4</span><span class="ct-ff8763">, </span><span class="ct-62e845">5</span><span class="ct-ff8763">, </span><span class="ct-8087a0">...</span><span class="ct-30ff73">Array</span><span class="ct-ff8763">&lt;</span><span class="ct-62e845">0</span><span class="ct-ff8763">&gt;];</span></span></code></pre><!--]--></div><style>.ct-3d66f1{color:#A5D6FF}.ct-62e845{color:#79C0FF}.ct-d16a4a{color:#79C0FF}.ct-5413fc{color:#8B949E}.ct-c2ecc5{color:#D2A8FF}.ct-894712{color:#FFA657}.ct-f0e7aa{color:#FFA657}.ct-35880f{color:#FF7B72}.ct-ae19b1{color:#D2A8FF}.ct-204eca{color:#C9D1D9}.ct-3c112b{color:#FF7B72}.ct-30ff73{color:#FFA657}.ct-86b04a{color:#FF7B72}.ct-222f42{color:#A5D6FF}.ct-c00405{color:#C9D1D9}.ct-ff8763{color:#C9D1D9}.ct-8087a0{color:#FF7B72}.light .ct-8087a0{color:#859900}.light .ct-ff8763{color:#657B83}.light .ct-c00405{color:#268BD2}.light .ct-222f42{color:#2AA198}.light .ct-86b04a{color:#073642}.light .ct-30ff73{color:#268BD2}.light .ct-3c112b{color:#073642}.light .ct-204eca{color:#657B83}.light .ct-ae19b1{color:#268BD2}.light .ct-35880f{color:#859900}.light .ct-f0e7aa{color:#657B83}.light .ct-894712{color:#268BD2}.light .ct-c2ecc5{color:#268BD2}.light .ct-5413fc{color:#93A1A1}.light .ct-d16a4a{color:#859900}.light .ct-62e845{color:#D33682}.light .ct-3d66f1{color:#657B83}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/flatten-object-with-periods/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498912}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseA.989de2dc.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+files by flattening it with period delimiter. Supports plural forms.<!--]--></p><p><!--[-->Used for typing <a href="https://www.npmjs.com/package/i18n-js" rel="nofollow" target="_blank"><!--[-->i18n.js<!--]--></a> dictionaries;<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-7c02fe">import</span><span class="ct-7ec1ee"> </span><span class="ct-f5c6d3">en</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">from</span><span class="ct-7ec1ee"> </span><span class="ct-dc52a6">&#39;./en.json&#39;</span><span class="ct-7ec1ee">;</span></span><span class="line"><span class="ct-01c2c6">type</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">TranslationPath</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">=</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">Flatten</span><span class="ct-7ec1ee">&lt;</span><span class="ct-7c02fe">typeof</span><span class="ct-7ec1ee"> </span><span class="ct-f5c6d3">en</span><span class="ct-7ec1ee">&gt;;</span></span><span class="line"></span><span class="line"><span class="ct-21324f">const</span><span class="ct-d973b6"> </span><span class="ct-d9c4ba">t</span><span class="ct-d973b6"> </span><span class="ct-3b8dd8">=</span><span class="ct-d973b6"> (</span><span class="ct-b48404">key</span><span class="ct-3b8dd8">:</span><span class="ct-d973b6"> </span><span class="ct-ab0f84">TranslationPath</span><span class="ct-d973b6">, </span><span class="ct-b48404">options</span><span class="ct-3b8dd8">?:</span><span class="ct-d973b6"> </span><span class="ct-ab0f84">TranslateOptions</span><span class="ct-d973b6">) </span><span class="ct-21324f">=&gt;</span></span><span class="line"><span class="ct-7ec1ee">    </span><span class="ct-f5c6d3">I18nLib</span><span class="ct-7ec1ee">.</span><span class="ct-c84cf5">t</span><span class="ct-7ec1ee">(</span><span class="ct-f5c6d3">key</span><span class="ct-7ec1ee">, </span><span class="ct-f5c6d3">options</span><span class="ct-7ec1ee">);</span></span></code></pre><!--]--></div><p><!--[-->Flatten type defined here:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-4a1326">// This one based on answer from StackOverflow:</span></span><span class="line"><span class="ct-4a1326">// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object</span></span><span class="line"></span><span class="line"><span class="ct-7c02fe">export</span><span class="ct-7ec1ee"> </span><span class="ct-01c2c6">type</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">Flatten</span><span class="ct-7ec1ee">&lt;</span><span class="ct-9afba2">T</span><span class="ct-7ec1ee">, </span><span class="ct-9afba2">D</span><span class="ct-7ec1ee"> </span><span class="ct-01c2c6">extends</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">number</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">=</span><span class="ct-7ec1ee"> </span><span class="ct-45e961">5</span><span class="ct-7ec1ee">&gt; </span><span class="ct-7c02fe">=</span><span class="ct-7ec1ee"> [</span><span class="ct-9afba2">D</span><span class="ct-7ec1ee">] </span><span class="ct-01c2c6">extends</span><span class="ct-7ec1ee"> [</span><span class="ct-caf09a">never</span><span class="ct-7ec1ee">]</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">?</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">never</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">:</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">T</span><span class="ct-7ec1ee"> </span><span class="ct-01c2c6">extends</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">PluralForm</span><span class="ct-7ec1ee"> </span><span class="ct-4a1326">// plural object</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">?</span><span class="ct-7ec1ee"> </span><span class="ct-dc52a6">&#39;&#39;</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">:</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">T</span><span class="ct-7ec1ee"> </span><span class="ct-01c2c6">extends</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">object</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">?</span><span class="ct-7ec1ee"> { [</span><span class="ct-9afba2">K</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">in</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">keyof</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">T</span><span class="ct-7ec1ee">]</span><span class="ct-7c02fe">-?:</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">Join</span><span class="ct-7ec1ee">&lt;</span><span class="ct-9afba2">K</span><span class="ct-7ec1ee">, </span><span class="ct-9afba2">Flatten</span><span class="ct-7ec1ee">&lt;</span><span class="ct-9afba2">T</span><span class="ct-7ec1ee">[</span><span class="ct-9afba2">K</span><span class="ct-7ec1ee">], </span><span class="ct-9afba2">Prev</span><span class="ct-7ec1ee">[</span><span class="ct-9afba2">D</span><span class="ct-7ec1ee">]&gt;&gt; }[</span><span class="ct-7c02fe">keyof</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">T</span><span class="ct-7ec1ee">]</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">:</span><span class="ct-7ec1ee"> </span><span class="ct-dc52a6">&#39;&#39;</span><span class="ct-7ec1ee">;</span></span><span class="line"></span><span class="line"><span class="ct-4a1326">// Fix it for you plural form</span></span><span class="line"><span class="ct-01c2c6">type</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">PluralForm</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">=</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">Record</span><span class="ct-7ec1ee">&lt;</span><span class="ct-dc52a6">&#39;one&#39;</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">|</span><span class="ct-7ec1ee"> </span><span class="ct-dc52a6">&#39;few&#39;</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">|</span><span class="ct-7ec1ee"> </span><span class="ct-dc52a6">&#39;many&#39;</span><span class="ct-7ec1ee">, </span><span class="ct-caf09a">string</span><span class="ct-7ec1ee">&gt;;</span></span><span class="line"></span><span class="line"><span class="ct-01c2c6">type</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">Join</span><span class="ct-7ec1ee">&lt;</span><span class="ct-9afba2">K</span><span class="ct-7ec1ee">, </span><span class="ct-9afba2">P</span><span class="ct-7ec1ee">&gt; </span><span class="ct-7c02fe">=</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">K</span><span class="ct-7ec1ee"> </span><span class="ct-01c2c6">extends</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">string</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">|</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">number</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">?</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">P</span><span class="ct-7ec1ee"> </span><span class="ct-01c2c6">extends</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">string</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">|</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">number</span></span><span class="line"><span class="ct-7ec1ee">    </span><span class="ct-7c02fe">?</span><span class="ct-7ec1ee"> </span><span class="ct-dc52a6">`${</span><span class="ct-9afba2">K</span><span class="ct-dc52a6">}${&#39;&#39;</span><span class="ct-a4e364"> </span><span class="ct-01c2c6">extends</span><span class="ct-a4e364"> </span><span class="ct-9afba2">P</span><span class="ct-a4e364"> </span><span class="ct-7c02fe">?</span><span class="ct-a4e364"> </span><span class="ct-dc52a6">&#39;&#39;</span><span class="ct-a4e364"> </span><span class="ct-7c02fe">:</span><span class="ct-a4e364"> </span><span class="ct-dc52a6">&#39;.&#39;}${</span><span class="ct-9afba2">P</span><span class="ct-dc52a6">}`</span></span><span class="line"><span class="ct-7ec1ee">    </span><span class="ct-7c02fe">:</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">never</span></span><span class="line"><span class="ct-7ec1ee">  </span><span class="ct-7c02fe">:</span><span class="ct-7ec1ee"> </span><span class="ct-caf09a">never</span><span class="ct-7ec1ee">;</span></span><span class="line"></span><span class="line"><span class="ct-01c2c6">type</span><span class="ct-7ec1ee"> </span><span class="ct-9afba2">Prev</span><span class="ct-7ec1ee"> </span><span class="ct-7c02fe">=</span><span class="ct-7ec1ee"> [</span><span class="ct-caf09a">never</span><span class="ct-7ec1ee">, </span><span class="ct-45e961">0</span><span class="ct-7ec1ee">, </span><span class="ct-45e961">1</span><span class="ct-7ec1ee">, </span><span class="ct-45e961">2</span><span class="ct-7ec1ee">, </span><span class="ct-45e961">3</span><span class="ct-7ec1ee">, </span><span class="ct-45e961">4</span><span class="ct-7ec1ee">, </span><span class="ct-45e961">5</span><span class="ct-7ec1ee">, </span><span class="ct-7c02fe">...</span><span class="ct-9afba2">Array</span><span class="ct-7ec1ee">&lt;</span><span class="ct-45e961">0</span><span class="ct-7ec1ee">&gt;];</span></span></code></pre><!--]--></div><style>.ct-a4e364{color:#A5D6FF}.ct-45e961{color:#79C0FF}.ct-caf09a{color:#79C0FF}.ct-4a1326{color:#8B949E}.ct-c84cf5{color:#D2A8FF}.ct-ab0f84{color:#FFA657}.ct-b48404{color:#FFA657}.ct-3b8dd8{color:#FF7B72}.ct-d9c4ba{color:#D2A8FF}.ct-d973b6{color:#C9D1D9}.ct-21324f{color:#FF7B72}.ct-9afba2{color:#FFA657}.ct-01c2c6{color:#FF7B72}.ct-dc52a6{color:#A5D6FF}.ct-f5c6d3{color:#C9D1D9}.ct-7ec1ee{color:#C9D1D9}.ct-7c02fe{color:#FF7B72}.light .ct-7c02fe{color:#859900}.light .ct-7ec1ee{color:#657B83}.light .ct-f5c6d3{color:#268BD2}.light .ct-dc52a6{color:#2AA198}.light .ct-01c2c6{color:#073642}.light .ct-9afba2{color:#268BD2}.light .ct-21324f{color:#073642}.light .ct-d973b6{color:#657B83}.light .ct-d9c4ba{color:#268BD2}.light .ct-3b8dd8{color:#859900}.light .ct-b48404{color:#657B83}.light .ct-ab0f84{color:#268BD2}.light .ct-c84cf5{color:#268BD2}.light .ct-4a1326{color:#93A1A1}.light .ct-caf09a{color:#859900}.light .ct-45e961{color:#D33682}.light .ct-a4e364{color:#657B83}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/flatten-object-with-periods/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813361075}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseA.435cdbf8.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/typescript/frontend/vue/adding-global-properties-to-component/_payload.js b/typescript/frontend/vue/adding-global-properties-to-component/_payload.js
index 5f7287e..a7690df 100644
--- a/typescript/frontend/vue/adding-global-properties-to-component/_payload.js
+++ b/typescript/frontend/vue/adding-global-properties-to-component/_payload.js
@@ -1 +1 @@
-export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-6fvmNhB5QD":null},prerenderedAt:1667812499304}
\ No newline at end of file
+export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-6fvmNhB5QD":null},prerenderedAt:1667813361332}
\ No newline at end of file
diff --git a/typescript/frontend/vue/adding-global-properties-to-component/index.html b/typescript/frontend/vue/adding-global-properties-to-component/index.html
index e0b151f..4eb5b3d 100644
--- a/typescript/frontend/vue/adding-global-properties-to-component/index.html
+++ b/typescript/frontend/vue/adding-global-properties-to-component/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/typescript/frontend/vue/adding-global-properties-to-component/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><style>._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="head:count" content="2"><link rel="modulepreload" href="/typescript/frontend/vue/adding-global-properties-to-component/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><style>._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><article><h1></h1><!----></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/frontend/vue/adding-global-properties-to-component/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:c,value:c,unknown:a,forced:b}},_errors:{"content-query-6fvmNhB5QD":a},serverRendered:a,config:{public:{content:{clientDB:{isSPA:b,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:b,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812499304}}(true,false,"dark","shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/HomeReference.e315914b.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a href="/typescript/type-guards" class="_link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><article><h1></h1><!----></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/frontend/vue/adding-global-properties-to-component/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:c,value:c,unknown:a,forced:b}},_errors:{"content-query-6fvmNhB5QD":a},serverRendered:a,config:{public:{content:{clientDB:{isSPA:b,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:b,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813361332}}(true,false,"dark","shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/HomeReference.dcdfc2c4.js" crossorigin></script></body>
 </html>
\ No newline at end of file
diff --git a/typescript/type-guards/_payload.js b/typescript/type-guards/_payload.js
index eb12078..cb25821 100644
--- a/typescript/type-guards/_payload.js
+++ b/typescript/type-guards/_payload.js
@@ -1 +1 @@
-export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:z,_path:A}]}],"content-query-BxgTjDzHE9":{_path:A,_dir:k,_draft:r,_partial:r,_locale:"en",_empty:r,title:z,description:s,excerpt:{type:B,children:[{type:a,tag:n,props:{},children:[{type:c,value:s}]},{type:a,tag:h,props:{code:t,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:c,value:t}]}]}]},{type:a,tag:n,props:{},children:[{type:c,value:C}]},{type:a,tag:h,props:{code:u,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:c,value:u}]}]}]}]},body:{type:B,children:[{type:a,tag:n,props:{},children:[{type:c,value:s}]},{type:a,tag:h,props:{code:t,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:"ct-a52ad5"},children:[{type:c,value:"function"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-936a43"},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"|"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"Bird"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:")"}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"is"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"return"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"as"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-efe19e"},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"!=="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-c8d876"},children:[{type:c,value:"undefined"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:";"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]}]}]}]},{type:a,tag:n,props:{},children:[{type:c,value:C}]},{type:a,tag:h,props:{code:u,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:"ct-3520d8"},children:[{type:c,value:"const"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-8ce90e"},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"getSmallPet"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")) {"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"fly"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-e27096{color:#D2A8FF}.ct-8ce90e{color:#79C0FF}.ct-3520d8{color:#FF7B72}.ct-c8d876{color:#79C0FF}.ct-efe19e{color:#FFA657}.ct-49b21f{color:#C9D1D9}.ct-f00ca3{color:#FF7B72}.ct-023d5e{color:#C9D1D9}.ct-0f0d0d{color:#FFA657}.ct-7a0cdc{color:#FF7B72}.ct-9de1e3{color:#FFA657}.ct-936a43{color:#D2A8FF}.ct-efe60f{color:#C9D1D9}.ct-a52ad5{color:#FF7B72}.light .ct-a52ad5{color:#073642}.light .ct-efe60f{color:#657B83}.light .ct-936a43{color:#268BD2}.light .ct-9de1e3{color:#657B83}.light .ct-7a0cdc{color:#859900}.light .ct-0f0d0d{color:#268BD2}.light .ct-023d5e{color:#657B83}.light .ct-f00ca3{color:#859900}.light .ct-49b21f{color:#268BD2}.light .ct-efe19e{color:#268BD2}.light .ct-c8d876{color:#B58900}.light .ct-3520d8{color:#073642}.light .ct-8ce90e{color:#268BD2}.light .ct-e27096{color:#268BD2}"}]}],toc:{title:l,searchDepth:M,depth:M,links:[]}},_type:"markdown",_id:"content:Typescript:Type guards.md",_source:"content",_file:"Typescript\u002FType guards.md",_extension:"md"}},prerenderedAt:1667812498974}}("element","span","text","ct-023d5e"," ","line","ct-efe60f","code","pet","ct-f00ca3","typescript","","ct-49b21f","p","pre","ct-7a0cdc","ct-e27096",false,"Useful for type checking at compile and run time:","function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","ct-0f0d0d","Fish","  ","();","Type Guards","\u002Ftypescript\u002Ftype-guards","root","Usage:","isFish","(","ct-9de1e3",":"," {"," (","swim","}",".",2))
\ No newline at end of file
+export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:z,_path:A}]}],"content-query-BxgTjDzHE9":{_path:A,_dir:k,_draft:r,_partial:r,_locale:"en",_empty:r,title:z,description:s,excerpt:{type:B,children:[{type:a,tag:n,props:{},children:[{type:c,value:s}]},{type:a,tag:h,props:{code:t,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:c,value:t}]}]}]},{type:a,tag:n,props:{},children:[{type:c,value:C}]},{type:a,tag:h,props:{code:u,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:c,value:u}]}]}]}]},body:{type:B,children:[{type:a,tag:n,props:{},children:[{type:c,value:s}]},{type:a,tag:h,props:{code:t,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:"ct-1886ea"},children:[{type:c,value:"function"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-bf5b6c"},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"|"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"Bird"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:")"}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"is"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"return"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"as"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-6ad78b"},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"!=="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-67f2fa"},children:[{type:c,value:"undefined"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:";"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]}]}]}]},{type:a,tag:n,props:{},children:[{type:c,value:C}]},{type:a,tag:h,props:{code:u,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:"ct-b7f249"},children:[{type:c,value:"const"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-1bc9cf"},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"getSmallPet"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")) {"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"fly"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-7c13bd{color:#D2A8FF}.ct-1bc9cf{color:#79C0FF}.ct-b7f249{color:#FF7B72}.ct-67f2fa{color:#79C0FF}.ct-6ad78b{color:#FFA657}.ct-59b9b7{color:#C9D1D9}.ct-dac57f{color:#FF7B72}.ct-2e1e17{color:#C9D1D9}.ct-6f4e28{color:#FFA657}.ct-ac4659{color:#FF7B72}.ct-d477bd{color:#FFA657}.ct-bf5b6c{color:#D2A8FF}.ct-f6cb92{color:#C9D1D9}.ct-1886ea{color:#FF7B72}.light .ct-1886ea{color:#073642}.light .ct-f6cb92{color:#657B83}.light .ct-bf5b6c{color:#268BD2}.light .ct-d477bd{color:#657B83}.light .ct-ac4659{color:#859900}.light .ct-6f4e28{color:#268BD2}.light .ct-2e1e17{color:#657B83}.light .ct-dac57f{color:#859900}.light .ct-59b9b7{color:#268BD2}.light .ct-6ad78b{color:#268BD2}.light .ct-67f2fa{color:#B58900}.light .ct-b7f249{color:#073642}.light .ct-1bc9cf{color:#268BD2}.light .ct-7c13bd{color:#268BD2}"}]}],toc:{title:l,searchDepth:M,depth:M,links:[]}},_type:"markdown",_id:"content:Typescript:Type guards.md",_source:"content",_file:"Typescript\u002FType guards.md",_extension:"md"}},prerenderedAt:1667813361128}}("element","span","text","ct-2e1e17"," ","line","ct-f6cb92","code","pet","ct-dac57f","typescript","","ct-59b9b7","p","pre","ct-ac4659","ct-7c13bd",false,"Useful for type checking at compile and run time:","function isFish(pet: Fish | Bird): pet is Fish {\n  return (pet as Fish).swim !== undefined;\n}\n","const pet = getSmallPet();\n \nif (isFish(pet)) {\n  pet.swim();\n} else {\n  pet.fly();\n}\n","ct-6f4e28","Fish","  ","();","Type Guards","\u002Ftypescript\u002Ftype-guards","root","Usage:","isFish","(","ct-d477bd",":"," {"," (","swim","}",".",2))
\ No newline at end of file
diff --git a/typescript/type-guards/index.html b/typescript/type-guards/index.html
index bbe00cd..cecdd07 100644
--- a/typescript/type-guards/index.html
+++ b/typescript/type-guards/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html data-head-attrs="">
-<head><title>Type Guards • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Useful for type checking at compile and run time:"><meta name="head:count" content="3"><link rel="modulepreload" href="/typescript/type-guards/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.f8ff8132.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.2294e3b6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.46044f42.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.73696950.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.b4be76a2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.741e4176.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.dfe6c45f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.001d6eed.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.01993b55.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.f8f430c2.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.e315914b.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.1e37594f.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.e3af85ab.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.85420456.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.4629eda6.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.da2a25c3.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.42d91046.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
+<head><title>Type Guards • Obsidian Garden</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Useful for type checking at compile and run time:"><meta name="head:count" content="3"><link rel="modulepreload" href="/typescript/type-guards/_payload.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/entry.67e3e390.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/default.677dc96c.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.a62ad69a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js"><link rel="preload" as="style" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutMainMenu.ced8ac76.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/navigation.e6541d9a.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/content.35f5cbec.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.51894848.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.8c1d3c65.js"><link rel="preload" as="style" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="modulepreload" as="script" crossorigin href="/nuxt/LayoutFooter.e4ddbcf6.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/_...slug_.59847726.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/HomeReference.dcdfc2c4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseP.6c5d1090.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.1f9853bd.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/UiIconCopy.46b801d4.js"><link rel="modulepreload" as="script" crossorigin href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js"><link rel="preload" as="style" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-logo.8351f38f.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-native-logo.bdbaa7c9.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/react-ssr-logo.3593105e.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/ts-logo.5847c362.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/golang-logo.f772e478.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/html-logo.1f694231.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/arch-logo.838efbc7.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/gql-logo.1e66e5b3.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/swagger-logo.b314537c.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/vue-logo.17ff892a.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/postgres-logo.d981f813.svg"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/docker-logo.7f942bd1.svg"><link rel="prefetch" as="image" type="image/png" href="/nuxt/vault48.40538b94.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/orchid-map.2f398715.png"><link rel="prefetch" as="image" type="image/png" href="/nuxt/obsidian-garden.39e6dff3.png"><link rel="prefetch" as="script" crossorigin href="/nuxt/client-db.438de858.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/web-socket.26355217.js"><link rel="prefetch" as="script" crossorigin href="/nuxt/error-component.e7f78446.js"><link rel="prefetch" as="style" href="/nuxt/entry.97aae52d.css"><link rel="prefetch" as="image" type="image/svg+xml" href="/nuxt/logo.d91c5032.svg"><link rel="stylesheet" href="/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"><link rel="stylesheet" href="/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"><link rel="stylesheet" href="/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"><style>._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px 0;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px}</style><style>._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}}</style><style>._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}</style><link rel="stylesheet" href="/nuxt/entry.97aae52d.css" media="print" onload="this.media='all'; this.onload=null;"><script>const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"dark";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
 </script></head>
-<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a aria-current="page" href="/typescript/type-guards" class="router-link-active _active_192pu_81 _link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Type Guards</h1><article><div><p><!--[-->Useful for type checking at compile and run time:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-a52ad5">function</span><span class="ct-efe60f"> </span><span class="ct-936a43">isFish</span><span class="ct-efe60f">(</span><span class="ct-9de1e3">pet</span><span class="ct-7a0cdc">:</span><span class="ct-efe60f"> </span><span class="ct-0f0d0d">Fish</span><span class="ct-efe60f"> </span><span class="ct-7a0cdc">|</span><span class="ct-efe60f"> </span><span class="ct-0f0d0d">Bird</span><span class="ct-efe60f">)</span><span class="ct-7a0cdc">:</span><span class="ct-efe60f"> </span><span class="ct-9de1e3">pet</span><span class="ct-efe60f"> </span><span class="ct-7a0cdc">is</span><span class="ct-efe60f"> </span><span class="ct-0f0d0d">Fish</span><span class="ct-efe60f"> {</span></span><span class="line"><span class="ct-023d5e">  </span><span class="ct-f00ca3">return</span><span class="ct-023d5e"> (</span><span class="ct-49b21f">pet</span><span class="ct-023d5e"> </span><span class="ct-f00ca3">as</span><span class="ct-023d5e"> </span><span class="ct-efe19e">Fish</span><span class="ct-023d5e">).</span><span class="ct-49b21f">swim</span><span class="ct-023d5e"> </span><span class="ct-f00ca3">!==</span><span class="ct-023d5e"> </span><span class="ct-c8d876">undefined</span><span class="ct-023d5e">;</span></span><span class="line"><span class="ct-023d5e">}</span></span></code></pre><!--]--></div><p><!--[-->Usage:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-3520d8">const</span><span class="ct-023d5e"> </span><span class="ct-8ce90e">pet</span><span class="ct-023d5e"> </span><span class="ct-f00ca3">=</span><span class="ct-023d5e"> </span><span class="ct-e27096">getSmallPet</span><span class="ct-023d5e">();</span></span><span class="line"><span class="ct-023d5e"> </span></span><span class="line"><span class="ct-f00ca3">if</span><span class="ct-023d5e"> (</span><span class="ct-e27096">isFish</span><span class="ct-023d5e">(</span><span class="ct-49b21f">pet</span><span class="ct-023d5e">)) {</span></span><span class="line"><span class="ct-023d5e">  </span><span class="ct-49b21f">pet</span><span class="ct-023d5e">.</span><span class="ct-e27096">swim</span><span class="ct-023d5e">();</span></span><span class="line"><span class="ct-023d5e">} </span><span class="ct-f00ca3">else</span><span class="ct-023d5e"> {</span></span><span class="line"><span class="ct-023d5e">  </span><span class="ct-49b21f">pet</span><span class="ct-023d5e">.</span><span class="ct-e27096">fly</span><span class="ct-023d5e">();</span></span><span class="line"><span class="ct-023d5e">}</span></span></code></pre><!--]--></div><style>.ct-e27096{color:#D2A8FF}.ct-8ce90e{color:#79C0FF}.ct-3520d8{color:#FF7B72}.ct-c8d876{color:#79C0FF}.ct-efe19e{color:#FFA657}.ct-49b21f{color:#C9D1D9}.ct-f00ca3{color:#FF7B72}.ct-023d5e{color:#C9D1D9}.ct-0f0d0d{color:#FFA657}.ct-7a0cdc{color:#FF7B72}.ct-9de1e3{color:#FFA657}.ct-936a43{color:#D2A8FF}.ct-efe60f{color:#C9D1D9}.ct-a52ad5{color:#FF7B72}.light .ct-a52ad5{color:#073642}.light .ct-efe60f{color:#657B83}.light .ct-936a43{color:#268BD2}.light .ct-9de1e3{color:#657B83}.light .ct-7a0cdc{color:#859900}.light .ct-0f0d0d{color:#268BD2}.light .ct-023d5e{color:#657B83}.light .ct-f00ca3{color:#859900}.light .ct-49b21f{color:#268BD2}.light .ct-efe19e{color:#268BD2}.light .ct-c8d876{color:#B58900}.light .ct-3520d8{color:#073642}.light .ct-8ce90e{color:#268BD2}.light .ct-e27096{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/type-guards/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667812467668},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667812498974}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.f8ff8132.js" crossorigin></script><script type="module" src="/nuxt/default.2294e3b6.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.46044f42.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.73696950.js" crossorigin></script><script type="module" src="/nuxt/content.741e4176.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.dfe6c45f.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.f8f430c2.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.01993b55.js" crossorigin></script><script type="module" src="/nuxt/ProseP.1e37594f.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.e3af85ab.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.85420456.js" crossorigin></script></body>
+<body data-head-attrs=""><div id="__nuxt"><div class="_grid_bdvnl_1" hastransition="true"><button class="_menu_toggle_bdvnl_64 _button_5opgq_1 _menu_toggle_bdvnl_64"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#ffffff" class="_hamburger_5opgq_9"><rect x="0" y="3" width="24" height="2"></rect><rect x="0" y="11" width="24" height="2"></rect><rect x="0" y="19" width="24" height="2"></rect></svg></button><div class="_sidebar_bdvnl_25"><div class="_menu_bdvnl_44"><nav><div class="_logo_fvpir_8"><a href="/" class=""><div class="_title_fvpir_29">Obsidian Garden</div><div class="_subtitle_fvpir_35">by muerwre</div></a></div><div class="_section_title_fvpir_1">Cheatsheet</div><!--[--><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Blockchain</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/blockchain/common-typescript-examples" class="_link_192pu_66">Common Typescript Examples</a></div><div class="_row_192pu_24"><a href="/blockchain/smart-contracts" class="_link_192pu_66">Smart Contracts</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Css</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/css/automatic-grid-like-masonry-with-pure-css" class="_link_192pu_66">Automatic Grid Like Masonry With Pure CSS</a></div><div class="_row_192pu_24"><a href="/css/sass-nth-child-iterate-mixin" class="_link_192pu_66">Sass Nth Child Iterate Mixin</a></div><div class="_row_192pu_24"><a href="/css/test-if-browser-supports-css-rules" class="_link_192pu_66">Test If Browser Supports CSS Rules</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Docker</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/docker/building-static-pages-with-docker" class="_link_192pu_66">Building Static Pages With Docker</a></div><div class="_row_192pu_24"><a href="/docker/drone-ci" class="_link_192pu_66">Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/github-pages-with-drone-ci" class="_link_192pu_66">Github Pages With Drone Ci</a></div><div class="_row_192pu_24"><a href="/docker/private-docker-registry" class="_link_192pu_66">Private Docker Registry</a></div><div class="_row_192pu_24"><a href="/docker/refresh-containers-on-pull" class="_link_192pu_66">Refresh Containers On Pull</a></div><div class="_row_192pu_24"><a href="/docker/seed-dump-inside-docker" class="_link_192pu_66">Seed Dump Inside Docker</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-mysql" class="_link_192pu_66">Wait For Mysql</a></div><div class="_row_192pu_24"><a href="/docker/wait-for-redis" class="_link_192pu_66">Wait For Redis</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Frontend</div><div class="_children_192pu_86"><!--[--><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React Native</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react-native/oauth2-login" class="_link_192pu_66">OAuth2 Login</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/preserve-flatlist-scroll-position-in-react-native" class="_link_192pu_66">Preserve FlatList Scroll Position In React Native</a></div><div class="_row_192pu_24"><a href="/frontend/react-native/useful-comands" class="_link_192pu_66">Useful Comands</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">React</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/react/axios-refresh-token-on-react" class="_link_192pu_66">Axios Refresh Token On React</a></div><div class="_row_192pu_24"><a href="/frontend/react/axios-with-abortcontroller" class="_link_192pu_66">Axios With AbortController</a></div><!--]--></div></div><div class="_container_192pu_1 _secondary_192pu_4"><div class="_heading_192pu_48">Vue</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/frontend/vue/adding-global-properties-to-component" class="_link_192pu_66">Adding Global Properties To Component</a></div><div class="_row_192pu_24"><a href="/frontend/vue/make-nuxt-handle-obsidian-highlights" class="_link_192pu_66">Make Nuxt Handle Obsidian Highlights</a></div><!--]--></div></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Git</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/git/force-git-to-use-https" class="_link_192pu_66">Force Git To Use HTTPS</a></div><div class="_row_192pu_24"><a href="/git/git-aliases-and-useful-commands" class="_link_192pu_66">Git Aliases And Useful Commands</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Graphql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/graphql/apollo-client-pagination" class="_link_192pu_66">Apollo Client Pagination</a></div><div class="_row_192pu_24"><a href="/graphql/refresh-token-in-apollo-client" class="_link_192pu_66">Refresh Token In Apollo Client</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Linux</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/linux/gitea-for-git-hosting" class="_link_192pu_66">Gitea For Git Hosting</a></div><div class="_row_192pu_24"><a href="/linux/google-photos-alternative-with-photoprism" class="_link_192pu_66">Google Photos Alternative With Photoprism</a></div><div class="_row_192pu_24"><a href="/linux/resume-or-start-screen-session" class="_link_192pu_66">Resume Or Start Screen Session</a></div><div class="_row_192pu_24"><a href="/linux/rsync-file-with-ssh" class="_link_192pu_66">Rsync File With SSH</a></div><div class="_row_192pu_24"><a href="/linux/setting-up-nginx" class="_link_192pu_66">Setting Up NGINX</a></div><div class="_row_192pu_24"><a href="/linux/ssh" class="_link_192pu_66">SSH</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Sql</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/sql/mysql-and-mariadb-setup" class="_link_192pu_66">MySQL And MariaDB Setup</a></div><div class="_row_192pu_24"><a href="/sql/postgress-setup" class="_link_192pu_66">Postgress Setup</a></div><!--]--></div></div></div><div class="_row_fvpir_25"><div class="_container_192pu_1"><div class="_heading_192pu_48">Typescript</div><div class="_children_192pu_86"><!--[--><div class="_row_192pu_24"><a href="/typescript/add-global-variable-to-window" class="_link_192pu_66">Add Global Variable To Window</a></div><div class="_row_192pu_24"><a href="/typescript/flatten-object-with-periods" class="_link_192pu_66">Flatten Object With Periods</a></div><div class="_row_192pu_24"><a aria-current="page" href="/typescript/type-guards" class="router-link-active _active_192pu_81 _link_192pu_66">Type Guards</a></div><!--]--></div></div></div><!--]--></nav></div></div><div class="_main_bdvnl_17"><div class="_wrapper_1hfaq_1" hastransition="true"><div class="_content_1hfaq_7"><button class="_theme_toggle_1hfaq_28 _button_jz7in_1 _theme_toggle_1hfaq_28"><span></span></button><!--[--><!--[--><main><!--[--><h1>Type Guards</h1><article><div><p><!--[-->Useful for type checking at compile and run time:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-1886ea">function</span><span class="ct-f6cb92"> </span><span class="ct-bf5b6c">isFish</span><span class="ct-f6cb92">(</span><span class="ct-d477bd">pet</span><span class="ct-ac4659">:</span><span class="ct-f6cb92"> </span><span class="ct-6f4e28">Fish</span><span class="ct-f6cb92"> </span><span class="ct-ac4659">|</span><span class="ct-f6cb92"> </span><span class="ct-6f4e28">Bird</span><span class="ct-f6cb92">)</span><span class="ct-ac4659">:</span><span class="ct-f6cb92"> </span><span class="ct-d477bd">pet</span><span class="ct-f6cb92"> </span><span class="ct-ac4659">is</span><span class="ct-f6cb92"> </span><span class="ct-6f4e28">Fish</span><span class="ct-f6cb92"> {</span></span><span class="line"><span class="ct-2e1e17">  </span><span class="ct-dac57f">return</span><span class="ct-2e1e17"> (</span><span class="ct-59b9b7">pet</span><span class="ct-2e1e17"> </span><span class="ct-dac57f">as</span><span class="ct-2e1e17"> </span><span class="ct-6ad78b">Fish</span><span class="ct-2e1e17">).</span><span class="ct-59b9b7">swim</span><span class="ct-2e1e17"> </span><span class="ct-dac57f">!==</span><span class="ct-2e1e17"> </span><span class="ct-67f2fa">undefined</span><span class="ct-2e1e17">;</span></span><span class="line"><span class="ct-2e1e17">}</span></span></code></pre><!--]--></div><p><!--[-->Usage:<!--]--></p><div class="_wrapper_1pe7v_1"><button class="_language_1pe7v_9"><span class="_icon_1pe7v_5"><svg xmlns="http://www.w3.org/2000/svg" height="12" viewbox="0 0 24 24" width="12" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"></path><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></span><span>typescript</span></button><!--[--><pre><code><span class="line"><span class="ct-b7f249">const</span><span class="ct-2e1e17"> </span><span class="ct-1bc9cf">pet</span><span class="ct-2e1e17"> </span><span class="ct-dac57f">=</span><span class="ct-2e1e17"> </span><span class="ct-7c13bd">getSmallPet</span><span class="ct-2e1e17">();</span></span><span class="line"><span class="ct-2e1e17"> </span></span><span class="line"><span class="ct-dac57f">if</span><span class="ct-2e1e17"> (</span><span class="ct-7c13bd">isFish</span><span class="ct-2e1e17">(</span><span class="ct-59b9b7">pet</span><span class="ct-2e1e17">)) {</span></span><span class="line"><span class="ct-2e1e17">  </span><span class="ct-59b9b7">pet</span><span class="ct-2e1e17">.</span><span class="ct-7c13bd">swim</span><span class="ct-2e1e17">();</span></span><span class="line"><span class="ct-2e1e17">} </span><span class="ct-dac57f">else</span><span class="ct-2e1e17"> {</span></span><span class="line"><span class="ct-2e1e17">  </span><span class="ct-59b9b7">pet</span><span class="ct-2e1e17">.</span><span class="ct-7c13bd">fly</span><span class="ct-2e1e17">();</span></span><span class="line"><span class="ct-2e1e17">}</span></span></code></pre><!--]--></div><style>.ct-7c13bd{color:#D2A8FF}.ct-1bc9cf{color:#79C0FF}.ct-b7f249{color:#FF7B72}.ct-67f2fa{color:#79C0FF}.ct-6ad78b{color:#FFA657}.ct-59b9b7{color:#C9D1D9}.ct-dac57f{color:#FF7B72}.ct-2e1e17{color:#C9D1D9}.ct-6f4e28{color:#FFA657}.ct-ac4659{color:#FF7B72}.ct-d477bd{color:#FFA657}.ct-bf5b6c{color:#D2A8FF}.ct-f6cb92{color:#C9D1D9}.ct-1886ea{color:#FF7B72}.light .ct-1886ea{color:#073642}.light .ct-f6cb92{color:#657B83}.light .ct-bf5b6c{color:#268BD2}.light .ct-d477bd{color:#657B83}.light .ct-ac4659{color:#859900}.light .ct-6f4e28{color:#268BD2}.light .ct-2e1e17{color:#657B83}.light .ct-dac57f{color:#859900}.light .ct-59b9b7{color:#268BD2}.light .ct-6ad78b{color:#268BD2}.light .ct-67f2fa{color:#B58900}.light .ct-b7f249{color:#073642}.light .ct-1bc9cf{color:#268BD2}.light .ct-7c13bd{color:#268BD2}</style></div></article><!--]--></main><!--]--><!--]--></div><footer class="_footer_ogxvf_1 _footer_1hfaq_22 _footer_1hfaq_22"><div>btw, have a nice day</div><div class="_filler_ogxvf_9"></div><div> (2018 - 2022) <a href="https://github.com/muerwre/" rel="noopener noreferrer" target="_blank">muerwre</a></div></footer></div></div></div></div><script type="module">import p from "/typescript/type-guards/_payload.js";window.__NUXT__={...p,...((function(a,b,c,d,e,f){return {state:{"$scolor-mode":{preference:b,value:b,unknown:c,forced:a}},_errors:{},serverRendered:c,config:{public:{content:{clientDB:{isSPA:a,integrity:1667813329822},navigation:{fields:[]},base:"_content",tags:{p:"prose-p",a:"prose-a",blockquote:"prose-blockquote","code-inline":"prose-code-inline",code:"prose-code",em:"prose-em",h1:"prose-h1",h2:"prose-h2",h3:"prose-h3",h4:"prose-h4",h5:"prose-h5",h6:"prose-h6",hr:"prose-hr",img:"prose-img",ul:"prose-ul",ol:"prose-ol",li:"prose-li",strong:"prose-strong",table:"prose-table",thead:"prose-thead",tbody:"prose-tbody",td:"prose-td",th:"prose-th",tr:"prose-tr"},highlight:{theme:{default:"github-dark",light:"solarized-light"},preload:[d,"c","go","graphql","scss",d,e,"docker","typescript","javascript","nginx","bash","yaml",e],apiURL:"\u002Fapi\u002F_content\u002Fhighlight"},wsUrl:f,documentDriven:a,anchorLinks:{depth:4,exclude:[1]}}},app:{baseURL:"\u002F",buildAssetsDir:"nuxt\u002F",cdnURL:f}},prerenderedAt:1667813361128}}(false,"dark",true,"shell","sh","")))}</script><script type="module" src="/nuxt/entry.67e3e390.js" crossorigin></script><script type="module" src="/nuxt/default.677dc96c.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenuToggle.a62ad69a.js" crossorigin></script><script type="module" src="/nuxt/LayoutMainMenu.ced8ac76.js" crossorigin></script><script type="module" src="/nuxt/content.35f5cbec.js" crossorigin></script><script type="module" src="/nuxt/LayoutThemeToggle.51894848.js" crossorigin></script><script type="module" src="/nuxt/_...slug_.59847726.js" crossorigin></script><script type="module" src="/nuxt/LayoutFooter.e4ddbcf6.js" crossorigin></script><script type="module" src="/nuxt/ProseP.6c5d1090.js" crossorigin></script><script type="module" src="/nuxt/ProseCode.1f9853bd.js" crossorigin></script><script type="module" src="/nuxt/UiIconCopy.46b801d4.js" crossorigin></script></body>
 </html>
\ No newline at end of file