diff --git a/404.html b/404.html index 3367b49ea15..934f0735ed0 100644 --- a/404.html +++ b/404.html @@ -15,13 +15,13 @@ - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/065a8d55.779b9856.js b/assets/js/065a8d55.779b9856.js new file mode 100644 index 00000000000..797d70f464c --- /dev/null +++ b/assets/js/065a8d55.779b9856.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8883],{3905:function(t,a,e){e.d(a,{Zo:function(){return u},kt:function(){return g}});var n=e(7294);function l(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}function r(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var a=1;a=0||(l[e]=t[e]);return l}(t,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(l[e]=t[e])}return l}var d=n.createContext({}),m=function(t){var a=n.useContext(d),e=a;return t&&(e="function"==typeof t?t(a):i(i({},a),t)),e},u=function(t){var a=m(t.components);return n.createElement(d.Provider,{value:a},t.children)},k="mdxType",o={inlineCode:"code",wrapper:function(t){var a=t.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(t,a){var e=t.components,l=t.mdxType,r=t.originalType,d=t.parentName,u=p(t,["components","mdxType","originalType","parentName"]),k=m(e),N=l,g=k["".concat(d,".").concat(N)]||k[N]||o[N]||r;return e?n.createElement(g,i(i({ref:a},u),{},{components:e})):n.createElement(g,i({ref:a},u))}));function g(t,a){var e=arguments,l=a&&a.mdxType;if("string"==typeof t||l){var r=e.length,i=new Array(r);i[0]=N;var p={};for(var d in a)hasOwnProperty.call(a,d)&&(p[d]=a[d]);p.originalType=t,p[k]="string"==typeof t?t:l,i[1]=p;for(var m=2;m=0||(l[e]=t[e]);return l}(t,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(l[e]=t[e])}return l}var d=n.createContext({}),m=function(t){var a=n.useContext(d),e=a;return t&&(e="function"==typeof t?t(a):i(i({},a),t)),e},u=function(t){var a=m(t.components);return n.createElement(d.Provider,{value:a},t.children)},k="mdxType",o={inlineCode:"code",wrapper:function(t){var a=t.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(t,a){var e=t.components,l=t.mdxType,r=t.originalType,d=t.parentName,u=p(t,["components","mdxType","originalType","parentName"]),k=m(e),N=l,g=k["".concat(d,".").concat(N)]||k[N]||o[N]||r;return e?n.createElement(g,i(i({ref:a},u),{},{components:e})):n.createElement(g,i({ref:a},u))}));function g(t,a){var e=arguments,l=a&&a.mdxType;if("string"==typeof t||l){var r=e.length,i=new Array(r);i[0]=N;var p={};for(var d in a)hasOwnProperty.call(a,d)&&(p[d]=a[d]);p.originalType=t,p[k]="string"==typeof t?t:l,i[1]=p;for(var m=2;m=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=a.createContext({}),s=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),u=s(n),h=o,d=u["".concat(i,".").concat(h)]||u[h]||m[h]||r;return n?a.createElement(d,l(l({ref:t},c),{},{components:n})):a.createElement(d,l({ref:t},c))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=h;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p[u]="string"==typeof e?e:o,l[1]=p;for(var s=2;s=3.10 is required)"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"pip install openapi-generator-cli[jdk4py]\n")),(0,r.kt)("h2",{id:"docker"},"Docker"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Platform(s)"),": Linux, macOS, Windows")),(0,r.kt)("p",null,"The OpenAPI Generator Docker image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version."),(0,r.kt)("p",null,"To generate code from a valid ",(0,r.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"},"petstore.yaml")," doc with this image, you'll need to mount a local location as a volume.\nYou'll then need to output the generated code to this mapped volume. Everything else works the same as if you ran the command on your host machine."),(0,r.kt)("p",null,"Here's an example generating a Go client:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker run --rm \\\n -v ${PWD}:/local openapitools/openapi-generator-cli generate \\\n -i /local/petstore.yaml \\\n -g go \\\n -o /local/out/go\n")),(0,r.kt)("h2",{id:"jar"},"JAR"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Platform(s)"),": Linux, macOS, Windows")),(0,r.kt)("p",null,"If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):"),(0,r.kt)("p",null,"JAR location: ",(0,r.kt)("inlineCode",{parentName:"p"},"https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar")),(0,r.kt)("p",null,"For ",(0,r.kt)("strong",{parentName:"p"},"Mac/Linux")," users:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar -O openapi-generator-cli.jar\n")),(0,r.kt)("p",null,"For ",(0,r.kt)("strong",{parentName:"p"},"Windows")," users, you will need to install ",(0,r.kt)("a",{parentName:"p",href:"http://gnuwin32.sourceforge.net/packages/wget.htm"},"wget")," or you can use Invoke-WebRequest in PowerShell (3.0+), e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar\n")),(0,r.kt)("p",null,"After downloading the JAR, run ",(0,r.kt)("inlineCode",{parentName:"p"},"java -jar openapi-generator-cli.jar help")," to show the usage."),(0,r.kt)("p",null,"For Mac users, please make sure Java 11 is installed (Tips: run ",(0,r.kt)("inlineCode",{parentName:"p"},"java -version")," to check the version), and export ",(0,r.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," in order to use the supported Java version:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"export JAVA_HOME=`/usr/libexec/java_home -v 1.11`\nexport PATH=${JAVA_HOME}/bin:$PATH\n")),(0,r.kt)("h2",{id:"bash-launcher-script"},"Bash Launcher Script"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Platform(s)"),": Linux, macOS, Windows (variable)")),(0,r.kt)("p",null,"One downside to manual JAR downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at ",(0,r.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh"},"bin/utils/openapi-generator-cli.sh")," which solves this problem."),(0,r.kt)("p",null,"To install the launcher script, copy the contents of the script to a location on your path and make the script executable."),(0,r.kt)("p",null,"An example of setting this up (NOTE: Always evaluate scripts curled from external systems before executing them)."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir -p ~/bin/openapitools\ncurl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli\nchmod u+x ~/bin/openapitools/openapi-generator-cli\nexport PATH=$PATH:~/bin/openapitools/\n")),(0,r.kt)("p",null,"Now, ",(0,r.kt)("inlineCode",{parentName:"p"},"openapi-generator-cli"),' is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar,\nit will execute as normal. If a newer version is found, the script will download the latest release and execute it.'),(0,r.kt)("p",null,"If you need to invoke an older version of the generator, you can define the variable ",(0,r.kt)("inlineCode",{parentName:"p"},"OPENAPI_GENERATOR_VERSION")," either ad hoc or globally. You can export this variable if you'd like to persist a specific release version."),(0,r.kt)("p",null,"Examples:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},'# Execute latest released openapi-generator-cli\nopenapi-generator-cli version\n\n# Execute version 3.1.0 for the current invocation, regardless of the latest released version\nOPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version\n\n# Execute version 3.1.0-SNAPSHOT for the current invocation\nOPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version\n\n# Execute version 3.0.2 for every invocation in the current shell session\nexport OPENAPI_GENERATOR_VERSION=3.0.2\nopenapi-generator-cli version # is 3.0.2\nopenapi-generator-cli version # is also 3.0.2\n\n# To "install" a specific version, set the variable in .bashrc/.bash_profile\necho "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc\nsource ~/.bashrc\nopenapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc\n')))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/726258db.f738c1fd.js b/assets/js/726258db.f738c1fd.js deleted file mode 100644 index 3b901ee4aa8..00000000000 --- a/assets/js/726258db.f738c1fd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2309],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return d}});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=a.createContext({}),s=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),u=s(n),h=o,d=u["".concat(i,".").concat(h)]||u[h]||m[h]||r;return n?a.createElement(d,l(l({ref:t},c),{},{components:n})):a.createElement(d,l({ref:t},c))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=h;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p[u]="string"==typeof e?e:o,l[1]=p;for(var s=2;s=3.10 is required)"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"pip install openapi-generator-cli[jdk4py]\n")),(0,r.kt)("h2",{id:"docker"},"Docker"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Platform(s)"),": Linux, macOS, Windows")),(0,r.kt)("p",null,"The OpenAPI Generator Docker image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version."),(0,r.kt)("p",null,"To generate code from a valid ",(0,r.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"},"petstore.yaml")," doc with this image, you'll need to mount a local location as a volume.\nYou'll then need to output the generated code to this mapped volume. Everything else works the same as if you ran the command on your host machine."),(0,r.kt)("p",null,"Here's an example generating a Go client:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker run --rm \\\n -v ${PWD}:/local openapitools/openapi-generator-cli generate \\\n -i /local/petstore.yaml \\\n -g go \\\n -o /local/out/go\n")),(0,r.kt)("h2",{id:"jar"},"JAR"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Platform(s)"),": Linux, macOS, Windows")),(0,r.kt)("p",null,"If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):"),(0,r.kt)("p",null,"JAR location: ",(0,r.kt)("inlineCode",{parentName:"p"},"https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar")),(0,r.kt)("p",null,"For ",(0,r.kt)("strong",{parentName:"p"},"Mac/Linux")," users:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar -O openapi-generator-cli.jar\n")),(0,r.kt)("p",null,"For ",(0,r.kt)("strong",{parentName:"p"},"Windows")," users, you will need to install ",(0,r.kt)("a",{parentName:"p",href:"http://gnuwin32.sourceforge.net/packages/wget.htm"},"wget")," or you can use Invoke-WebRequest in PowerShell (3.0+), e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-powershell"},"Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar\n")),(0,r.kt)("p",null,"After downloading the JAR, run ",(0,r.kt)("inlineCode",{parentName:"p"},"java -jar openapi-generator-cli.jar help")," to show the usage."),(0,r.kt)("p",null,"For Mac users, please make sure Java 11 is installed (Tips: run ",(0,r.kt)("inlineCode",{parentName:"p"},"java -version")," to check the version), and export ",(0,r.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," in order to use the supported Java version:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"export JAVA_HOME=`/usr/libexec/java_home -v 1.11`\nexport PATH=${JAVA_HOME}/bin:$PATH\n")),(0,r.kt)("h2",{id:"bash-launcher-script"},"Bash Launcher Script"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Platform(s)"),": Linux, macOS, Windows (variable)")),(0,r.kt)("p",null,"One downside to manual JAR downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at ",(0,r.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh"},"bin/utils/openapi-generator-cli.sh")," which solves this problem."),(0,r.kt)("p",null,"To install the launcher script, copy the contents of the script to a location on your path and make the script executable."),(0,r.kt)("p",null,"An example of setting this up (NOTE: Always evaluate scripts curled from external systems before executing them)."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir -p ~/bin/openapitools\ncurl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli\nchmod u+x ~/bin/openapitools/openapi-generator-cli\nexport PATH=$PATH:~/bin/openapitools/\n")),(0,r.kt)("p",null,"Now, ",(0,r.kt)("inlineCode",{parentName:"p"},"openapi-generator-cli"),' is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar,\nit will execute as normal. If a newer version is found, the script will download the latest release and execute it.'),(0,r.kt)("p",null,"If you need to invoke an older version of the generator, you can define the variable ",(0,r.kt)("inlineCode",{parentName:"p"},"OPENAPI_GENERATOR_VERSION")," either ad hoc or globally. You can export this variable if you'd like to persist a specific release version."),(0,r.kt)("p",null,"Examples:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},'# Execute latest released openapi-generator-cli\nopenapi-generator-cli version\n\n# Execute version 3.1.0 for the current invocation, regardless of the latest released version\nOPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version\n\n# Execute version 3.1.0-SNAPSHOT for the current invocation\nOPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version\n\n# Execute version 3.0.2 for every invocation in the current shell session\nexport OPENAPI_GENERATOR_VERSION=3.0.2\nopenapi-generator-cli version # is 3.0.2\nopenapi-generator-cli version # is also 3.0.2\n\n# To "install" a specific version, set the variable in .bashrc/.bash_profile\necho "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc\nsource ~/.bashrc\nopenapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc\n')))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/cf67c7b0.beb4df3a.js b/assets/js/cf67c7b0.beb4df3a.js deleted file mode 100644 index 179eeebca16..00000000000 --- a/assets/js/cf67c7b0.beb4df3a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9978],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return g}});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=p(n),c=i,g=d["".concat(s,".").concat(c)]||d[c]||u[c]||r;return n?a.createElement(g,o(o({ref:t},m),{},{components:n})):a.createElement(g,o({ref:t},m))}));function g(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var p=2;p"),". In cases where you're unsure, you will need to find the ",(0,r.kt)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," assignment in your desired generator. This is almost always assigned in the constructor of the generator class. The C# generator assigns this as:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'embeddedTemplateDir = templateDir = "csharp";\n')),(0,r.kt)("p",null,"These templates are in our source repository at ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp"},"modules/openapi-generator/src/main/resources/csharp"),". Be sure to select the tag or branch for the version of OpenAPI Generator you're using before grabbing the templates."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"NOTE")," If you have specific logic you'd like to modify such as modifying the generated README, you ",(0,r.kt)("em",{parentName:"p"},"only")," need to pull and modify this individual template. OpenAPI Generator will lookup templates in this order:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"User customized library path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"custom_template/libraries/feign/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"User customized generator top-level path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"custom_template/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"Embedded library path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"resources/Java/libraries/feign/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"Embedded top-level path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"resources/Java/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"Common embedded path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"resources/_common/model.mustache"),")")),(0,r.kt)("h3",{id:"custom-logic"},"Custom Logic"),(0,r.kt)("p",null,"For this example, let's modify a Java client to use AOP via ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/jcabi/jcabi-aspects"},"jcabi/jcabi-aspects"),". We'll log API method execution at the ",(0,r.kt)("inlineCode",{parentName:"p"},"INFO")," level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating."),(0,r.kt)("p",null,"The Java generator supports a ",(0,r.kt)("inlineCode",{parentName:"p"},"library"),' option. This option works by defining base templates, then applying library-specific template overrides. This allows for template reuse for libraries sharing the same programming language. Templates defined as a library need only modify or extend the templates concerning the library, and generation falls back to the root templates (the "defaults") when not extended by the library. Generators which support the ',(0,r.kt)("inlineCode",{parentName:"p"},"library")," option will only support the libraries known by the generator at compile time, and will throw a runtime error if you try to provide a custom library name."),(0,r.kt)("p",null,"To get started, we will need to copy our target generator's directory in full."),(0,r.kt)("p",null,"The directory will be located under ",(0,r.kt)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/{generator}"),". In general, the generator directory matches the generator name (what you would pass to the ",(0,r.kt)("inlineCode",{parentName:"p"},"generator")," option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the ",(0,r.kt)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," option in your target generator's implementation."),(0,r.kt)("p",null,"If you've already cloned openapi-generator, find and copy the ",(0,r.kt)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/Java")," directory. If you have the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/sindresorhus/refined-github"},"Refined GitHub"),' Chrome or Firefox Extension, you can navigate to this directory on GitHub and click the "Download" button. Or, to pull the directory from latest master:'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir -p ~/.openapi-generator/templates/ && cd $_\ncurl -L https://api.github.com/repos/OpenAPITools/openapi-generator/tarball | tar xz\nmv `ls`/modules/openapi-generator/src/main/resources/Java ./Java\n\\rm -rf OpenAPITools-openapi-generator-*\ncd Java\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Optional"),": Before modifying your templates, you may want to ",(0,r.kt)("inlineCode",{parentName:"p"},"git init && git add . && git commit -am 'initial'")," so you can easily revert to the base templates."),(0,r.kt)("p",null,"At this point, you have ",(0,r.kt)("em",{parentName:"p"},"every")," Java library's template locally. Let's delete all libraries except the ",(0,r.kt)("inlineCode",{parentName:"p"},"resteasy")," library we'll be extending:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"ls -d libraries/* | grep -v resteasy | xargs rm -rf\n")),(0,r.kt)("p",null,"Execute ",(0,r.kt)("inlineCode",{parentName:"p"},"tree")," in this Java directory and inspect the mustache files and directory structure. You'll notice there are quite a few templates in the directory root, but extending this root to support resteasy only requires modifying a handful of files:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tree libraries/resteasy/\nlibraries/resteasy/\n\u251c\u2500\u2500 ApiClient.mustache\n\u251c\u2500\u2500 JSON.mustache\n\u251c\u2500\u2500 api.mustache\n\u251c\u2500\u2500 build.gradle.mustache\n\u251c\u2500\u2500 build.sbt.mustache\n\u2514\u2500\u2500 pom.mustache\n\n0 directories, 6 files\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"NOTE: Some generators may be sensitive to ",(0,r.kt)("em",{parentName:"p"},"which")," files exist. If you're concerned with redundant files like ",(0,r.kt)("inlineCode",{parentName:"p"},"pom.mustache")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"build.sbt.mustache"),", you can try deleting them. If the generator you're customizing fails at runtime, just ",(0,r.kt)("inlineCode",{parentName:"p"},"touch")," these files to create an empty file.")),(0,r.kt)("p",null,"First, let's add our new dependency to ",(0,r.kt)("inlineCode",{parentName:"p"},"libraries/resteasy/build.gradle.mustache"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},'diff --git a/libraries/resteasy/build.gradle.mustache b/libraries/resteasy/build.gradle.mustache\nindex 3b40702..a6d12e0 100644\n--- a/libraries/resteasy/build.gradle.mustache\n+++ b/libraries/resteasy/build.gradle.mustache\n@@ -134,6 +134,7 @@ ext {\n }\n\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "org.jboss.resteasy:resteasy-client:$resteasy_version"\n compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"\n\n')),(0,r.kt)("p",null,"Then, we'll add the necessary import to ",(0,r.kt)("inlineCode",{parentName:"p"},"api.mustache"),". This file is the template which becomes the API invoking class (e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"PetApi")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"StoreApi"),")."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex a4d0f9f..49b17c7 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -1,5 +1,6 @@\n package {{package}};\n\n+import com.jcabi.aspects.Loggable;\n import {{invokerPackage}}.ApiException;\n import {{invokerPackage}}.ApiClient;\n import {{invokerPackage}}.Configuration;\n\n")),(0,r.kt)("p",null,"Next, we'll find the code which generates API methods. You'll see ",(0,r.kt)("inlineCode",{parentName:"p"},"{{#operations}}{{#operation}}"),' which is a mustache "loop" which executes the template logic if the model applied to the template has an ',(0,r.kt)("inlineCode",{parentName:"p"},"operations")," array, and a non-null ",(0,r.kt)("inlineCode",{parentName:"p"},"operation")," instance in that array. You can pass ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")," when generating via CLI to inspect the full object model."),(0,r.kt)("p",null,"Further down in ",(0,r.kt)("inlineCode",{parentName:"p"},"api.mustache"),", find implementation of the method call, and add the ",(0,r.kt)("inlineCode",{parentName:"p"},"@Loggable")," annotation. This template is easy because it has a single method implementation."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex 49b17c7..16ee191 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -57,6 +57,7 @@ public class {{classname}} {\n {{#isDeprecated}}\n @Deprecated\n {{/isDeprecated}}\n+ @Loggable(Loggable.INFO)\n public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {\n Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};\n {{#allParams}}{{#required}}\n\n")),(0,r.kt)("p",null,"Finally, because our new dependency relies on AspectJ and code weaving, let's modify the ",(0,r.kt)("inlineCode",{parentName:"p"},"build.gradle.mustache")," again to set this up."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},'diff --git a/build.gradle.mustache b/build.gradle.mustache\nindex 04a9d55..7a93c50 100644\n--- a/build.gradle.mustache\n+++ b/build.gradle.mustache\n@@ -1,5 +1,6 @@\n apply plugin: \'idea\'\n apply plugin: \'eclipse\'\n+apply plugin: \'aspectj\'\n\n group = \'{{groupId}}\'\n version = \'{{artifactVersion}}\'\n@@ -12,6 +13,7 @@ buildscript {\n dependencies {\n classpath \'com.android.tools.build:gradle:2.3.+\'\n classpath \'com.github.dcendents:android-maven-gradle-plugin:1.5\'\n+ classpath "net.uberfoo.gradle:gradle-aspectj:2.2"\n }\n }\n\n@@ -140,9 +142,18 @@ ext {\n jersey_version = "1.19.4"\n jodatime_version = "2.9.9"\n junit_version = "4.13"\n+ aspectjVersion = \'1.9.0\'\n }\n\n+sourceCompatibility = \'1.8\'\n+targetCompatibility = \'1.8\'\n+\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n+ aspectpath "com.jcabi:jcabi-aspects:0.22.6"\n+ // usually, client code leaves logging implementation to the consumer code\n+ compile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.2"\n+ compile "org.apache.logging.log4j:log4j-core:2.8.2"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "com.sun.jersey:jersey-client:$jersey_version"\n compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"\n\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"NOTE: This example includes log4j-slf4j-impl to demonstrate that our new code is working. Generally you'll want to leave logging implementations up to your consumers.")),(0,r.kt)("p",null,"And because the java client generates with an outdated Gradle 2.6, let's update the gradle version in the default template (",(0,r.kt)("inlineCode",{parentName:"p"},"Java/gradle-wrapper.properties.mustache"),"):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},"diff --git a/gradle-wrapper.properties.mustache b/gradle-wrapper.properties.mustache\nindex b7a3647..3d9d088 100644\n--- a/gradle-wrapper.properties.mustache\n+++ b/gradle-wrapper.properties.mustache\n@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME\n distributionPath=wrapper/dists\n zipStoreBase=GRADLE_USER_HOME\n zipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-2.6-bin.zip\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-4.8-bin.zip\n\n")),(0,r.kt)("p",null,"Now we're ready to generate the client with our simple changes. When we pass the template directory option to our toolset, we ",(0,r.kt)("em",{parentName:"p"},"must")," pass the generator's root directory and ",(0,r.kt)("em",{parentName:"p"},"not")," the library-only directory."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g java --library resteasy \\\n -t ~/.openapi-generator/templates/Java \\\n -o ~/.openapi-generator/example \\\n -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml\n")),(0,r.kt)("p",null,"Make sure your custom template compiles:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd ~/.openapi-generator/example\ngradle assemble\n# or, regenerate the wrapper\ngradle wrapper --gradle-version 4.8 --distribution-type all\n./gradlew assemble\n")),(0,r.kt)("p",null,"You should see a log message showing our added dependency being downloaded:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text"},"\u2026\nDownload https://jcenter.bintray.com/com/jcabi/jcabi-aspects/0.22.6/jcabi-aspects-0.22.6.pom\n\u2026\n")),(0,r.kt)("p",null,"And for the sake of verifying our AOP modifications work, let's create a ",(0,r.kt)("inlineCode",{parentName:"p"},"src/main/resources/log4j2.properties")," file in our new client code:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-properties"},"status = error\ndest = err\nname = PropertiesConfig\n\nproperty.filename = target/rolling/rollingtest.log\n\nfilter.threshold.type = ThresholdFilter\nfilter.threshold.level = debug\n\nappender.console.type = Console\nappender.console.name = STDOUT\nappender.console.layout.type = PatternLayout\nappender.console.layout.pattern = %m%n\nappender.console.filter.threshold.type = ThresholdFilter\nappender.console.filter.threshold.level = error\n\nappender.rolling.type = RollingFile\nappender.rolling.name = RollingFile\nappender.rolling.fileName = ${filename}\nappender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz\nappender.rolling.layout.type = PatternLayout\nappender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n\nappender.rolling.policies.type = Policies\nappender.rolling.policies.time.type = TimeBasedTriggeringPolicy\nappender.rolling.policies.time.interval = 2\nappender.rolling.policies.time.modulate = true\nappender.rolling.policies.size.type = SizeBasedTriggeringPolicy\nappender.rolling.policies.size.size=100MB\nappender.rolling.strategy.type = DefaultRolloverStrategy\nappender.rolling.strategy.max = 5\n\nlogger.rolling.name = org.openapitools.client.api.PetApi\nlogger.rolling.level = debug\nlogger.rolling.additivity = false\nlogger.rolling.appenderRef.rolling.ref = RollingFile\n\nrootLogger.level = info\nrootLogger.appenderRef.stdout.ref = STDOUT\n")),(0,r.kt)("p",null,"Execute ",(0,r.kt)("inlineCode",{parentName:"p"},"./gradlew build")," and then ",(0,r.kt)("inlineCode",{parentName:"p"},"cat target/rolling/rollingtest.log"),". You should see messages logged for every call in PetApi with a stubbed unit test."),(0,r.kt)("p",null,"Congratulations! You've now modified one of the built-in templates to meet your client code's needs."),(0,r.kt)("p",null,"Adding/modifying template logic simply requires a little bit of ",(0,r.kt)("a",{parentName:"p",href:"https://mustache.github.io/"},"mustache"),", for which you can use existing templates as a guide."),(0,r.kt)("h3",{id:"custom-engines"},"Custom Engines"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Custom template engine support is ",(0,r.kt)("em",{parentName:"p"},"experimental"))),(0,r.kt)("p",null,"If Mustache or the experimental Handlebars engines don't suit your needs, you can define an adapter to your templating engine of choice. To do this, you'll need to define a new project which consumes the ",(0,r.kt)("inlineCode",{parentName:"p"},"openapi-generator-core")," artifact, and at a minimum implement ",(0,r.kt)("inlineCode",{parentName:"p"},"TemplatingEngineAdapter"),"."),(0,r.kt)("p",null,"This example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"creates an adapter providing the fundamental logic to compile ",(0,r.kt)("a",{parentName:"li",href:"https://pebbletemplates.io"},"Pebble Templates")),(0,r.kt)("li",{parentName:"ul"},"will be implemented in Kotlin to demonstrate ServiceLoader configuration specific to Kotlin (Java will be similar)"),(0,r.kt)("li",{parentName:"ul"},"requires Gradle 5.0+"),(0,r.kt)("li",{parentName:"ul"},"provides project setup instructions for IntelliJ")),(0,r.kt)("p",null,"To begin, create a ",(0,r.kt)("a",{parentName:"p",href:"https://www.jetbrains.com/help/idea/getting-started-with-gradle.html"},"new Gradle project")," with Kotlin support. To do this, go to ",(0,r.kt)("inlineCode",{parentName:"p"},"File")," \u279e ",(0,r.kt)("inlineCode",{parentName:"p"},"New")," \u279e ",(0,r.kt)("inlineCode",{parentName:"p"},"Project"),', choose "Gradle" and "Kotlin". Specify groupId ',(0,r.kt)("inlineCode",{parentName:"p"},"org.openapitools.examples")," and artifactId ",(0,r.kt)("inlineCode",{parentName:"p"},"pebble-template-adapter"),"."),(0,r.kt)("p",null,"Ensure the new project uses Gradle 5.0. Navigate to the newly created directory and execute:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"gradle wrapper --gradle-version 5.0\n")),(0,r.kt)("p",null,"In ",(0,r.kt)("inlineCode",{parentName:"p"},"build.gradle"),", we'll add a dependency for OpenAPI Tools core which defines the interface and an abstract helper type for implementing the adapter. We'll also pull in the Pebble artifact. We'll be evaluating this new artifact locally, so we'll also add the Maven plugin for installing to the local maven repository. We'll also create a fatjar using the ",(0,r.kt)("inlineCode",{parentName:"p"},"shadow")," plugin to simplify our classpath."),(0,r.kt)("p",null,"Modifications to the new project's ",(0,r.kt)("inlineCode",{parentName:"p"},"build.gradle")," should be made in the ",(0,r.kt)("inlineCode",{parentName:"p"},"plugins")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies")," nodes:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},' plugins {\n id \'org.jetbrains.kotlin.jvm\' version \'1.3.11\'\n id "com.github.johnrengelman.shadow" version "5.0.0"\n }\n\n dependencies {\n compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"\n compile "org.openapitools:openapi-generator-core:4.0.0-SNAPSHOT"\n compile "io.pebbletemplates:pebble:3.0.8"\n }\n')),(0,r.kt)("p",null,"The above configuration for the ",(0,r.kt)("inlineCode",{parentName:"p"},"shadow")," plugin is strictly optional. It is not needed, for instance, if you plan to publish your adapter and consume it via the Maven or Gradle plugins."),(0,r.kt)("p",null,"Next, create a new class file called ",(0,r.kt)("inlineCode",{parentName:"p"},"PebbleTemplateEngineAdapter")," under ",(0,r.kt)("inlineCode",{parentName:"p"},"src/kotlin"),". We'll define the template adapter's name as ",(0,r.kt)("inlineCode",{parentName:"p"},"pebble")," and we'll also list this as the only supported file extension. We'll implement the adapter by extending ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractTemplatingEngineAdapter"),", which includes reusable logic, such as retrieving a list of all possible template names for our provided template extensions(s)."),(0,r.kt)("p",null,"The class in its simplest form looks like this (with inline comments):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'// Allows specifying engine by class name\n// e.g. -e org.openapitools.examples.templating.PebbleTemplateAdapter\n@file:JvmName("PebbleTemplateAdapter")\npackage org.openapitools.examples.templating\n\n// imports\n\nclass PebbleTemplateAdapter : AbstractTemplatingEngineAdapter() {\n // initialize the template compilation engine\n private val engine: PebbleEngine = PebbleEngine.Builder()\n .cacheActive(false)\n .loader(DelegatingLoader(listOf(FileLoader(), ClasspathLoader())))\n .build()\n\n // allows targeting engine by id/name: -e pebble\n override fun getIdentifier(): String = "pebble"\n\n override fun compileTemplate(\n generator: TemplatingGenerator?,\n bundle: MutableMap?,\n templateFile: String?\n ): String {\n // This will convert, for example, model.mustache to model.pebble\n val modifiedTemplate = this.getModifiedFileLocation(templateFile).first()\n\n // Uses generator built-in template resolution strategy to find the full template file\n val filePath = generator?.getFullTemplatePath(modifiedTemplate)\n\n val writer = StringWriter()\n // Conditionally writes out the template if found.\n if (filePath != null) {\n engine.getTemplate(filePath.toAbsolutePath().toString())?.evaluate(writer, bundle)\n }\n return writer.toString()\n }\n\n override fun getFileExtensions(): Array = arrayOf("pebble")\n}\n')),(0,r.kt)("p",null,"Lastly, create a file ",(0,r.kt)("inlineCode",{parentName:"p"},"resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter"),", containing the full class path to the above class:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"org.openapitools.examples.templating.PebbleTemplateAdapter\n")),(0,r.kt)("p",null,"This allows the adapter to load via ServiceLoader, and to be referenced via the identifier ",(0,r.kt)("inlineCode",{parentName:"p"},"pebble"),". This is optional; if you don't provide the above file and contents, you'll only be able to load the engine via full class name (explained in a bit)."),(0,r.kt)("p",null,"Now, build the fatjar for this new adapter:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"./gradlew shadowJar\n")),(0,r.kt)("p",null,"To test compilation of some templates, we'll need to first create one or more template files. Create a temp directory at ",(0,r.kt)("inlineCode",{parentName:"p"},"/tmp/pebble-example/templates")," and add the following files."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"api.pebble")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'package {{packageName}}\n\nimport (\n "net/http"\n{% for item in imports %}\n "{{item.import}}"\n{% endfor %}\n)\n\ntype Generated{{classname}}Servicer\n\n// etc\n')),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"model.pebble")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'package {{packageName}}\n\n{% for item in models %}\n{% if item.isEnum %}\n// TODO: enum\n{% else %}\n{% if item.description is not empty %}// {{item.description}}{% endif %}\ntype {{item.classname}} struct {\n{% for var in item.model.vars %}\n {% if var.description is not empty %}// {{var.description}}{% endif %}\n {{var.name}} {% if var.isNullable %}*{% endif %}{{var.dataType}} `json:"{{var.baseName}}{% if var.required == false %},omitempty{% endif %}"{% if var.withXml == true %} xml:"{{var.baseName}}{% if var.isXmlAttribute %},attr{% endif %}"{% endif %}`\n{% endfor %}\n}\n{% endif %}\n{{model.name}}\n{% endfor %}\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Find object structures passed to templates later in this document's ",(0,r.kt)("strong",{parentName:"p"},"Structures")," section.")),(0,r.kt)("p",null,"Finally, we can compile some code by explicitly defining our classpath and jar entrypoint for CLI (be sure to modify ",(0,r.kt)("inlineCode",{parentName:"p"},"/your/path")," below)"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"java $JAVA_OPTS -cp /your/path/build/libs/pebble-template-adapter-1.0-SNAPSHOT-all.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \\\n org.openapitools.codegen.OpenAPIGenerator \\\n generate \\\n -g go \\\n -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-minimal.json \\\n -e pebble \\\n -o /tmp/pebble-example/out \\\n -t /tmp/pebble-example/templates \\\n --global-property models,modelDocs,modelTests,apis,apiTests,apiDocs\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"NOTE")," Running your custom generator requires adding it to the classpath. This differs on ",(0,r.kt)("a",{parentName:"p",href:"https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html"},"Windows")," slightly from ",(0,r.kt)("a",{parentName:"p",href:"https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"},"unix"),"."),(0,r.kt)("p",null,"In the above example, we've targeted our custom template engine adapter via ",(0,r.kt)("inlineCode",{parentName:"p"},"-e pebble"),". If you don't include the SPI file under ",(0,r.kt)("inlineCode",{parentName:"p"},"META-INF/services"),", you'll need to specify the exact classpath: ",(0,r.kt)("inlineCode",{parentName:"p"},"org.openapitools.examples.templating.PebbleTemplateAdapter"),". Notice that the target class here matches the Kotlin class name. This is because of the ",(0,r.kt)("inlineCode",{parentName:"p"},"@file:JvmName")," annotation."),(0,r.kt)("p",null,"Congratulations on creating a custom templating engine adapter!"),(0,r.kt)("h2",{id:"structures"},"Structures"),(0,r.kt)("p",null,"Aside from transforming an API document, the implementing class gets to decide how to apply the data structure to templates. We can decide which data structure to apply to which template files. You have the following structures at your disposal."),(0,r.kt)("p",null,"Examples for the following structures will be presented using the following spec document:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},' swagger: "2.0"\n info:\n version: "1.0.0"\n title: "Swagger Petstore"\n description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"\n termsOfService: "http://swagger.io/terms/"\n contact:\n name: "Swagger API Team"\n license:\n name: "MIT"\n host: "petstore.swagger.io"\n basePath: "/api"\n schemes:\n - "http"\n consumes:\n - "application/json"\n produces:\n - "application/json"\n paths:\n /pets:\n get:\n description: "Returns all pets from the system that the user has access to"\n produces:\n - "application/json"\n responses:\n "200":\n description: "A list of pets."\n schema:\n type: "array"\n items:\n $ref: "#/definitions/Pet"\n definitions:\n Pet:\n type: "object"\n required:\n - "id"\n - "name"\n properties:\n id:\n type: "integer"\n format: "int64"\n name:\n type: "string"\n tag:\n type: "string"\n\n')),(0,r.kt)("h3",{id:"operations"},"Operations"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Inspect operation structures passed to templates with system property ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")),(0,r.kt)("p",{parentName:"blockquote"},"Example:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugOpenAPI=true\n"))),(0,r.kt)("p",null,"There is a data structure which represents all the operations that are defined in the OpenAPI specification. A single API file is created for each ",(0,r.kt)("inlineCode",{parentName:"p"},"OperationGroup"),", which is essentially a grouping of different operations. See the ",(0,r.kt)("inlineCode",{parentName:"p"},"addOperationToGroup")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"DefaultCodegen.java")," for details on this operation."),(0,r.kt)("p",null,"You can have many files created for each ",(0,r.kt)("inlineCode",{parentName:"p"},"OperationGroup")," by processing multiple templates and assigning a different file naming pattern to them. So for a single file per operation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'// process the `api.mustache` template and output a single file with suffix `.java`:\napiTemplateFiles.put("api.mustache", ".java");\n')),(0,r.kt)("p",null,"For C-like languages which also require header files, you may create two files per operation."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-objectivec"},'// create a header and implementation for each operation group:\napiTemplateFiles.put("api-header.mustache", ".h");\napiTemplateFiles.put("api-body.mustache", ".m");\n')),(0,r.kt)("p",null,"Here, an Operation with tag ",(0,r.kt)("inlineCode",{parentName:"p"},"Pet")," will generate two files: ",(0,r.kt)("inlineCode",{parentName:"p"},"SWGPetApi.h")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"SWGPetApi.m"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"SWG")," prefix and ",(0,r.kt)("inlineCode",{parentName:"p"},"Api")," suffix are options specific to the Objective-C generator."),(0,r.kt)("h3",{id:"models"},"Models"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Inspect models passed to templates with system property ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugModels=true")),(0,r.kt)("p",{parentName:"blockquote"},"Execute:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugModels=true\n"))),(0,r.kt)("p",null,"Each model identified inside the generator will be passed into the ",(0,r.kt)("inlineCode",{parentName:"p"},"Models")," data structure and will generate a new model file (or files) for each model."),(0,r.kt)("p",null,"A ",(0,r.kt)("inlineCode",{parentName:"p"},"Pet")," model with three properties will provide a ",(0,r.kt)("em",{parentName:"p"},"lot")," of information about the type and properties. The output from ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugModels=true")," is presented in truncated format here."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'[ {\n "importPath" : "openapi.Pet",\n "model" : {\n "name" : "Pet",\n "classname" : "Pet",\n "classVarName" : "Pet",\n "modelJson" : "{\\n \\"required\\" : [ \\"id\\", \\"name\\" ],\\n \\"type\\" : \\"object\\",\\n \\"properties\\" : {\\n \\"id\\" : {\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n },\\n \\"name\\" : {\\n \\"type\\" : \\"string\\"\\n },\\n \\"tag\\" : {\\n \\"type\\" : \\"string\\"\\n }\\n }\\n}",\n "dataType" : "map[string]interface{}",\n "classFilename" : "model_pet",\n "isAlias" : false,\n "isString" : false,\n "isInteger" : false,\n "vars" : [ {\n "baseName" : "id",\n "getter" : "getId",\n "setter" : "setId",\n "dataType" : "int64",\n "datatypeWithEnum" : "int64",\n "dataFormat" : "int64",\n "name" : "Id",\n "defaultValueWithParam" : " = data.id;",\n "baseType" : "int64",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : false,\n "isNumeric" : true,\n "isInteger" : false,\n "isLong" : true,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Id",\n "nameInSnakeCase" : "ID",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "int64",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "name",\n "getter" : "getName",\n "setter" : "setName",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Name",\n "defaultValueWithParam" : " = data.name;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Name",\n "nameInSnakeCase" : "NAME",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "tag",\n "getter" : "getTag",\n "setter" : "setTag",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Tag",\n "defaultValueWithParam" : " = data.tag;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : false,\n "hasMoreNonReadOnly" : false,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Tag",\n "nameInSnakeCase" : "TAG",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n } ],\n "requiredVars" : [ /* id, name */ ],\n "optionalVars" : [ /* tag */ ],\n "readOnlyVars" : [ ],\n "readWriteVars" : [ /* lists metadata for all three properties */ ],\n "allVars" : [ /* lists all properties */],\n "parentVars" : [ ],\n "mandatory" : [ "id", "name" ],\n "allMandatory" : [ "id", "name" ],\n "imports" : [ ],\n "hasVars" : true,\n "emptyVars" : false,\n "hasMoreModels" : false,\n "hasEnums" : false,\n "isEnum" : false,\n "hasRequired" : true,\n "hasOptional" : true,\n "isArray" : false,\n "hasChildren" : false,\n "isMap" : false,\n "hasOnlyReadOnly" : false,\n "vendorExtensions" : { }\n }\n} ]\n')),(0,r.kt)("p",null,"Templates are passed redundant properties, depending on the semantics of the array. For example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"vars")," lists all defined model properties"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"requiredVars")," lists all model properties marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"required")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"optionalVars")," lists all model properties ",(0,r.kt)("em",{parentName:"li"},"not")," marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"required")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"readWriteVars")," lists all model properties ",(0,r.kt)("em",{parentName:"li"},"not")," marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"readOnlyVars")," lists all model properties marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"allVars")," lists all model properties. This may include the same set as ",(0,r.kt)("inlineCode",{parentName:"li"},"vars"),", but may also include generator-defined properties")),(0,r.kt)("p",null,'We expose the same properties in multiple sets because this allows us to conditionally iterate over properties based on some condition ("is it required" or "is it readonly"). This is driven by the use of the logic-less Mustache templates. It is possible that models passed to the templating engine may be cleaned up as we support more template engines, but such an effort will go through a deprecation phase and would be communicated at runtime through log messages.'),(0,r.kt)("h3",{id:"supportingfiles"},"supportingFiles"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Inspect supportingFiles passed to templates with system property ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugSupportingFiles=true")),(0,r.kt)("p",{parentName:"blockquote"},"Execute:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugSupportingFiles=true\n"))),(0,r.kt)("p",null,'This is a "catch-all" which gives you the entire structure--operations, model, etc--so you can create "single-file" code from them.'),(0,r.kt)("p",null,"Supporting files can either be processed through the templating engine or copied as-is. When creating your own templates, you're limited to the files and extensions expected by the generator implementation. For more control over the supporting files produced by a generator, see our ",(0,r.kt)("a",{parentName:"p",href:"/docs/customization"},"customization")," documentation."),(0,r.kt)("h2",{id:"variables"},"Variables"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"This is a very limited list of variable name explanations. Feel free to ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/OpenAPITools/openapi-generator/pull/new/master"},"open a pull request")," to add to this documentation!")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"complexType"),": stores the name of the model (e.g. Pet)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"isContainer"),": true if the parameter or property is an array or a map."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"isPrimitiveType"),": true if the parameter or property type is a primitive type (e.g. string, integer, etc) as defined in the spec.")),(0,r.kt)("p",null,"More variables can be found ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java"},"here"),"."),(0,r.kt)("h2",{id:"mustache-lambdas"},"Mustache Lambdas"),(0,r.kt)("p",null,"Many generators (",(0,r.kt)("em",{parentName:"p"},"those extending DefaultCodegen"),") come with a small set of lambda functions available under the key ",(0,r.kt)("inlineCode",{parentName:"p"},"lambda"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"lowercase")," - Converts all of the characters in this fragment to lower case using the rules of the ",(0,r.kt)("inlineCode",{parentName:"li"},"ROOT")," locale."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uppercase")," - Converts all of the characters in this fragment to upper case using the rules of the ",(0,r.kt)("inlineCode",{parentName:"li"},"ROOT")," locale."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"titlecase")," - Converts text in a fragment to title case. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"once upon a time")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"Once Upon A Time"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"camelcase")," - Converts text in a fragment to camelCase. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"Input-text")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"inputText"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uncamelize")," - Converts text in a fragment from camelCase or PascalCase to a string of words separated by whitespaces. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"inputText")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input Text"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented")," - Prepends 4 spaces indention from second line of a fragment on. First line will be indented by Mustache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented_8")," - Prepends 8 spaces indention from second line of a fragment on. First line will be indented by Mustache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented_12")," - Prepends 12 spaces indention from second line of a fragment on. First line will be indented by Mustache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented_16")," -Prepends 16 spaces indention from second line of a fragment on. First line will be indented by Mustache.")),(0,r.kt)("p",null,"Lambda is invoked by ",(0,r.kt)("inlineCode",{parentName:"p"},"lambda.[lambda name]")," expression. For example: ",(0,r.kt)("inlineCode",{parentName:"p"},"{{#lambda.lowercase}}FRAGMENT TO LOWERCASE{{/lambda.lowercase}}")," to lower case text between ",(0,r.kt)("inlineCode",{parentName:"p"},"lambda.lowercase"),"."),(0,r.kt)("h2",{id:"extensions"},"Extensions"),(0,r.kt)("p",null,'OpenAPI supports a concept called "Extensions". These are called "Specification Extensions" ',(0,r.kt)("a",{parentName:"p",href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions"},"in 3.x"),' and "Vendor Extensions" ',(0,r.kt)("a",{parentName:"p",href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions"},"in 2.0"),'.\nYou\'ll see them referred to as "Vendor Extensions" in most places in this project.'),(0,r.kt)("p",null,"Vendor extensions allow you to provide vendor-specific configurations to your specification document."),(0,r.kt)("p",null,"For example, suppose you use your specification document for code generation with a (hypothetical) C# OpenAPI generator supporting a desired operationId prefix where the extension is ",(0,r.kt)("inlineCode",{parentName:"p"},"x-csharp-operationid"),", you can define this property alongside the object you'd like to extend (which would be a Path Object in this case). You could then apply additional extensions alongside this property, whether they're for another language or other tooling."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Well-defined vendor extensions don't cause conflicts with other tooling.")),(0,r.kt)("p",null,'The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates.'),(0,r.kt)("h3",{id:"all-generators-core"},"All generators (core)"),(0,r.kt)("h4",{id:"enum"},"Enum"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-varnames")," can be used to have another enum name for the corresponding value.\nThis is used to define names of the enum items."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-descriptions")," can be used to provide an individual description for each value.\nThis is used for comments in the code (like javadoc if the target language is java)."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-descriptions")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-varnames")," are each expected to be list of items containing the same number of items as ",(0,r.kt)("inlineCode",{parentName:"p"},"enum"),".\nThe order of the items in the list matters: their position is used to group them together."),(0,r.kt)("p",null,"Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"WeatherType:\n type: integer\n format: int32\n enum:\n - 42\n - 18\n - 56\n x-enum-descriptions:\n - 'Blue sky'\n - 'Slightly overcast'\n - 'Take an umbrella with you'\n x-enum-varnames:\n - Sunny\n - Cloudy\n - Rainy\n")),(0,r.kt)("p",null,"In the example for the integer value ",(0,r.kt)("inlineCode",{parentName:"p"},"42"),", the description will be ",(0,r.kt)("inlineCode",{parentName:"p"},"Blue sky")," and the name of the enum item will be ",(0,r.kt)("inlineCode",{parentName:"p"},"Sunny")," (some generators changes it to ",(0,r.kt)("inlineCode",{parentName:"p"},"SUNNY")," to respect some coding convention)."),(0,r.kt)("h3",{id:"objc"},"ObjC"),(0,r.kt)("h4",{id:"x-objc-operationid"},"x-objc-operationId"),(0,r.kt)("p",null,"To customize the method name, you can provide a different name in x-objc-operationId, e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"summary: Add a new pet to the store\ndescription: ''\noperationId: addPet\nx-objc-operationId: CreateNewPet\n")),(0,r.kt)("h3",{id:"java-feign"},"Java (Feign)"),(0,r.kt)("h4",{id:"x-accepts"},"x-accepts"),(0,r.kt)("p",null,"A single ",(0,r.kt)("inlineCode",{parentName:"p"},"Accepts")," value as the Feign API client needs a single value for ",(0,r.kt)("inlineCode",{parentName:"p"},"Accepts")," header, e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"consumes:\n - application/json\n - application/xml\nx-accepts: application/json\n")),(0,r.kt)("h3",{id:"x-content-type"},"x-content-type"),(0,r.kt)("p",null,'A single "Content-Type" value as the Feign API client needs a single value for ',(0,r.kt)("inlineCode",{parentName:"p"},"Content-Type")," header, e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"produces:\n - application/xml\n - application/json\nx-content-type: application/json\n")),(0,r.kt)("h3",{id:"rust-server"},"Rust-server"),(0,r.kt)("h4",{id:"x-response-id"},"x-response-id"),(0,r.kt)("p",null,"Each response may specify a unique ",(0,r.kt)("inlineCode",{parentName:"p"},"x-response-id"),". ",(0,r.kt)("inlineCode",{parentName:"p"},"rust-server")," will use this to name the corresponding enum variant in the code. e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"paths:\n /ping:\n get:\n responses:\n 200:\n description: OK\n x-response-id: Pong\n")),(0,r.kt)("h3",{id:"mysql-schema"},"MySQL Schema"),(0,r.kt)("h4",{id:"x-mysqlschema"},"x-mysqlSchema"),(0,r.kt)("p",null,"MySQL schema generator creates vendor extensions based on openapi ",(0,r.kt)("inlineCode",{parentName:"p"},"dataType")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"dataFormat"),". When user defined extensions with same key already exists codegen accepts those as is. It means it won't validate properties or correct it for you. Every model in ",(0,r.kt)("inlineCode",{parentName:"p"},"definitions")," can contain table related and column related extensions like in example below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"definitions:\n Order:\n description: This should be most common InnoDB table\n type: object\n properties:\n id:\n description: >-\n This column should be unsigned BIGINT with AUTO_INCREMENT\n type: integer\n format: int64\n x-mysqlSchema:\n columnDefinition:\n colName: id\n colDataType: DECIMAL\n colDataTypeArguments:\n - argumentValue: 16\n isString: false\n - argumentValue: 4\n isString: false\n colUnsigned: true\n colNotNull: true\n colDefault:\n defaultValue: AUTO_INCREMENT\n isString: false\n isNumeric: false\n isKeyword: true\n colComment: >-\n Column comment. This column should be unsigned BIGINT with AUTO_INCREMENT\n x-mysqlSchema:\n tableDefinition:\n tblName: orders\n tblStorageEngine: InnoDB\n tblComment: >-\n Table comment. This should be most common InnoDB table\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"There are properties that are not implemented by now(",(0,r.kt)("inlineCode",{parentName:"p"},"tblStorageEngine"),"), but you can see how generator can be enhanced in future.")),(0,r.kt)("h2",{id:"mustache-tips"},"Mustache Tips"),(0,r.kt)("p",null,"Here are a few tips we've found useful for new template authors.\nFor more details on Mustache see ",(0,r.kt)("a",{parentName:"p",href:"https://mustache.github.io/mustache.5.html"},"mustache.5"),". See also ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/samskivert/jmustache"},"samskivert/jmustache")," for implementation-specific details."),(0,r.kt)("h3",{id:"firstlast"},"First/Last"),(0,r.kt)("p",null,"To access the first or last element in a list using Mustache:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-mustache"},"{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}}\n{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}}\n")),(0,r.kt)("h3",{id:"this"},"This"),(0,r.kt)("p",null,"Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept)."),(0,r.kt)("p",null,"You can inspect this entire context by outputting ",(0,r.kt)("inlineCode",{parentName:"p"},"{{this}}"),". For example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-mustache"},"{{#operations}}{{this}}{{/operations}}\n")),(0,r.kt)("h3",{id:"index"},"Index"),(0,r.kt)("p",null,"If you'd like a 1-based index in your array traversal, you can use ",(0,r.kt)("inlineCode",{parentName:"p"},"{{-index}}"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-mustache"},"{{#enums}}{{-index}} {{enum}}{{/enums}}\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/cf67c7b0.f417475a.js b/assets/js/cf67c7b0.f417475a.js new file mode 100644 index 00000000000..d11f5d3f1d8 --- /dev/null +++ b/assets/js/cf67c7b0.f417475a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9978],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return g}});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=p(n),c=i,g=d["".concat(s,".").concat(c)]||d[c]||u[c]||r;return n?a.createElement(g,o(o({ref:t},m),{},{components:n})):a.createElement(g,o({ref:t},m))}));function g(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var p=2;p"),". In cases where you're unsure, you will need to find the ",(0,r.kt)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," assignment in your desired generator. This is almost always assigned in the constructor of the generator class. The C# generator assigns this as:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'embeddedTemplateDir = templateDir = "csharp";\n')),(0,r.kt)("p",null,"These templates are in our source repository at ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp"},"modules/openapi-generator/src/main/resources/csharp"),". Be sure to select the tag or branch for the version of OpenAPI Generator you're using before grabbing the templates."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"NOTE")," If you have specific logic you'd like to modify such as modifying the generated README, you ",(0,r.kt)("em",{parentName:"p"},"only")," need to pull and modify this individual template. OpenAPI Generator will lookup templates in this order:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"User customized library path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"custom_template/libraries/feign/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"User customized generator top-level path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"custom_template/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"Embedded library path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"resources/Java/libraries/feign/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"Embedded top-level path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"resources/Java/model.mustache"),")"),(0,r.kt)("li",{parentName:"ul"},"Common embedded path (e.g. ",(0,r.kt)("inlineCode",{parentName:"li"},"resources/_common/model.mustache"),")")),(0,r.kt)("h3",{id:"custom-logic"},"Custom Logic"),(0,r.kt)("p",null,"For this example, let's modify a Java client to use AOP via ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/jcabi/jcabi-aspects"},"jcabi/jcabi-aspects"),". We'll log API method execution at the ",(0,r.kt)("inlineCode",{parentName:"p"},"INFO")," level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating."),(0,r.kt)("p",null,"The Java generator supports a ",(0,r.kt)("inlineCode",{parentName:"p"},"library"),' option. This option works by defining base templates, then applying library-specific template overrides. This allows for template reuse for libraries sharing the same programming language. Templates defined as a library need only modify or extend the templates concerning the library, and generation falls back to the root templates (the "defaults") when not extended by the library. Generators which support the ',(0,r.kt)("inlineCode",{parentName:"p"},"library")," option will only support the libraries known by the generator at compile time, and will throw a runtime error if you try to provide a custom library name."),(0,r.kt)("p",null,"To get started, we will need to copy our target generator's directory in full."),(0,r.kt)("p",null,"The directory will be located under ",(0,r.kt)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/{generator}"),". In general, the generator directory matches the generator name (what you would pass to the ",(0,r.kt)("inlineCode",{parentName:"p"},"generator")," option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the ",(0,r.kt)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," option in your target generator's implementation."),(0,r.kt)("p",null,"If you've already cloned openapi-generator, find and copy the ",(0,r.kt)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/Java")," directory. If you have the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/sindresorhus/refined-github"},"Refined GitHub"),' Chrome or Firefox Extension, you can navigate to this directory on GitHub and click the "Download" button. Or, to pull the directory from latest master:'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir -p ~/.openapi-generator/templates/ && cd $_\ncurl -L https://api.github.com/repos/OpenAPITools/openapi-generator/tarball | tar xz\nmv `ls`/modules/openapi-generator/src/main/resources/Java ./Java\n\\rm -rf OpenAPITools-openapi-generator-*\ncd Java\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Optional"),": Before modifying your templates, you may want to ",(0,r.kt)("inlineCode",{parentName:"p"},"git init && git add . && git commit -am 'initial'")," so you can easily revert to the base templates."),(0,r.kt)("p",null,"At this point, you have ",(0,r.kt)("em",{parentName:"p"},"every")," Java library's template locally. Let's delete all libraries except the ",(0,r.kt)("inlineCode",{parentName:"p"},"resteasy")," library we'll be extending:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"ls -d libraries/* | grep -v resteasy | xargs rm -rf\n")),(0,r.kt)("p",null,"Execute ",(0,r.kt)("inlineCode",{parentName:"p"},"tree")," in this Java directory and inspect the mustache files and directory structure. You'll notice there are quite a few templates in the directory root, but extending this root to support resteasy only requires modifying a handful of files:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tree libraries/resteasy/\nlibraries/resteasy/\n\u251c\u2500\u2500 ApiClient.mustache\n\u251c\u2500\u2500 JSON.mustache\n\u251c\u2500\u2500 api.mustache\n\u251c\u2500\u2500 build.gradle.mustache\n\u251c\u2500\u2500 build.sbt.mustache\n\u2514\u2500\u2500 pom.mustache\n\n0 directories, 6 files\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"NOTE: Some generators may be sensitive to ",(0,r.kt)("em",{parentName:"p"},"which")," files exist. If you're concerned with redundant files like ",(0,r.kt)("inlineCode",{parentName:"p"},"pom.mustache")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"build.sbt.mustache"),", you can try deleting them. If the generator you're customizing fails at runtime, just ",(0,r.kt)("inlineCode",{parentName:"p"},"touch")," these files to create an empty file.")),(0,r.kt)("p",null,"First, let's add our new dependency to ",(0,r.kt)("inlineCode",{parentName:"p"},"libraries/resteasy/build.gradle.mustache"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},'diff --git a/libraries/resteasy/build.gradle.mustache b/libraries/resteasy/build.gradle.mustache\nindex 3b40702..a6d12e0 100644\n--- a/libraries/resteasy/build.gradle.mustache\n+++ b/libraries/resteasy/build.gradle.mustache\n@@ -134,6 +134,7 @@ ext {\n }\n\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "org.jboss.resteasy:resteasy-client:$resteasy_version"\n compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"\n\n')),(0,r.kt)("p",null,"Then, we'll add the necessary import to ",(0,r.kt)("inlineCode",{parentName:"p"},"api.mustache"),". This file is the template which becomes the API invoking class (e.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"PetApi")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"StoreApi"),")."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex a4d0f9f..49b17c7 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -1,5 +1,6 @@\n package {{package}};\n\n+import com.jcabi.aspects.Loggable;\n import {{invokerPackage}}.ApiException;\n import {{invokerPackage}}.ApiClient;\n import {{invokerPackage}}.Configuration;\n\n")),(0,r.kt)("p",null,"Next, we'll find the code which generates API methods. You'll see ",(0,r.kt)("inlineCode",{parentName:"p"},"{{#operations}}{{#operation}}"),' which is a mustache "loop" which executes the template logic if the model applied to the template has an ',(0,r.kt)("inlineCode",{parentName:"p"},"operations")," array, and a non-null ",(0,r.kt)("inlineCode",{parentName:"p"},"operation")," instance in that array. You can pass ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")," when generating via CLI to inspect the full object model."),(0,r.kt)("p",null,"Further down in ",(0,r.kt)("inlineCode",{parentName:"p"},"api.mustache"),", find implementation of the method call, and add the ",(0,r.kt)("inlineCode",{parentName:"p"},"@Loggable")," annotation. This template is easy because it has a single method implementation."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex 49b17c7..16ee191 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -57,6 +57,7 @@ public class {{classname}} {\n {{#isDeprecated}}\n @Deprecated\n {{/isDeprecated}}\n+ @Loggable(Loggable.INFO)\n public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {\n Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};\n {{#allParams}}{{#required}}\n\n")),(0,r.kt)("p",null,"Finally, because our new dependency relies on AspectJ and code weaving, let's modify the ",(0,r.kt)("inlineCode",{parentName:"p"},"build.gradle.mustache")," again to set this up."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},'diff --git a/build.gradle.mustache b/build.gradle.mustache\nindex 04a9d55..7a93c50 100644\n--- a/build.gradle.mustache\n+++ b/build.gradle.mustache\n@@ -1,5 +1,6 @@\n apply plugin: \'idea\'\n apply plugin: \'eclipse\'\n+apply plugin: \'aspectj\'\n\n group = \'{{groupId}}\'\n version = \'{{artifactVersion}}\'\n@@ -12,6 +13,7 @@ buildscript {\n dependencies {\n classpath \'com.android.tools.build:gradle:2.3.+\'\n classpath \'com.github.dcendents:android-maven-gradle-plugin:1.5\'\n+ classpath "net.uberfoo.gradle:gradle-aspectj:2.2"\n }\n }\n\n@@ -140,9 +142,18 @@ ext {\n jersey_version = "1.19.4"\n jodatime_version = "2.9.9"\n junit_version = "4.13"\n+ aspectjVersion = \'1.9.0\'\n }\n\n+sourceCompatibility = \'1.8\'\n+targetCompatibility = \'1.8\'\n+\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n+ aspectpath "com.jcabi:jcabi-aspects:0.22.6"\n+ // usually, client code leaves logging implementation to the consumer code\n+ compile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.2"\n+ compile "org.apache.logging.log4j:log4j-core:2.8.2"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "com.sun.jersey:jersey-client:$jersey_version"\n compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"\n\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"NOTE: This example includes log4j-slf4j-impl to demonstrate that our new code is working. Generally you'll want to leave logging implementations up to your consumers.")),(0,r.kt)("p",null,"And because the java client generates with an outdated Gradle 2.6, let's update the gradle version in the default template (",(0,r.kt)("inlineCode",{parentName:"p"},"Java/gradle-wrapper.properties.mustache"),"):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},"diff --git a/gradle-wrapper.properties.mustache b/gradle-wrapper.properties.mustache\nindex b7a3647..3d9d088 100644\n--- a/gradle-wrapper.properties.mustache\n+++ b/gradle-wrapper.properties.mustache\n@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME\n distributionPath=wrapper/dists\n zipStoreBase=GRADLE_USER_HOME\n zipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-2.6-bin.zip\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-4.8-bin.zip\n\n")),(0,r.kt)("p",null,"Now we're ready to generate the client with our simple changes. When we pass the template directory option to our toolset, we ",(0,r.kt)("em",{parentName:"p"},"must")," pass the generator's root directory and ",(0,r.kt)("em",{parentName:"p"},"not")," the library-only directory."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g java --library resteasy \\\n -t ~/.openapi-generator/templates/Java \\\n -o ~/.openapi-generator/example \\\n -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml\n")),(0,r.kt)("p",null,"Make sure your custom template compiles:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd ~/.openapi-generator/example\ngradle assemble\n# or, regenerate the wrapper\ngradle wrapper --gradle-version 4.8 --distribution-type all\n./gradlew assemble\n")),(0,r.kt)("p",null,"You should see a log message showing our added dependency being downloaded:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text"},"\u2026\nDownload https://jcenter.bintray.com/com/jcabi/jcabi-aspects/0.22.6/jcabi-aspects-0.22.6.pom\n\u2026\n")),(0,r.kt)("p",null,"And for the sake of verifying our AOP modifications work, let's create a ",(0,r.kt)("inlineCode",{parentName:"p"},"src/main/resources/log4j2.properties")," file in our new client code:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-properties"},"status = error\ndest = err\nname = PropertiesConfig\n\nproperty.filename = target/rolling/rollingtest.log\n\nfilter.threshold.type = ThresholdFilter\nfilter.threshold.level = debug\n\nappender.console.type = Console\nappender.console.name = STDOUT\nappender.console.layout.type = PatternLayout\nappender.console.layout.pattern = %m%n\nappender.console.filter.threshold.type = ThresholdFilter\nappender.console.filter.threshold.level = error\n\nappender.rolling.type = RollingFile\nappender.rolling.name = RollingFile\nappender.rolling.fileName = ${filename}\nappender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz\nappender.rolling.layout.type = PatternLayout\nappender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n\nappender.rolling.policies.type = Policies\nappender.rolling.policies.time.type = TimeBasedTriggeringPolicy\nappender.rolling.policies.time.interval = 2\nappender.rolling.policies.time.modulate = true\nappender.rolling.policies.size.type = SizeBasedTriggeringPolicy\nappender.rolling.policies.size.size=100MB\nappender.rolling.strategy.type = DefaultRolloverStrategy\nappender.rolling.strategy.max = 5\n\nlogger.rolling.name = org.openapitools.client.api.PetApi\nlogger.rolling.level = debug\nlogger.rolling.additivity = false\nlogger.rolling.appenderRef.rolling.ref = RollingFile\n\nrootLogger.level = info\nrootLogger.appenderRef.stdout.ref = STDOUT\n")),(0,r.kt)("p",null,"Execute ",(0,r.kt)("inlineCode",{parentName:"p"},"./gradlew build")," and then ",(0,r.kt)("inlineCode",{parentName:"p"},"cat target/rolling/rollingtest.log"),". You should see messages logged for every call in PetApi with a stubbed unit test."),(0,r.kt)("p",null,"Congratulations! You've now modified one of the built-in templates to meet your client code's needs."),(0,r.kt)("p",null,"Adding/modifying template logic simply requires a little bit of ",(0,r.kt)("a",{parentName:"p",href:"https://mustache.github.io/"},"mustache"),", for which you can use existing templates as a guide."),(0,r.kt)("h3",{id:"custom-engines"},"Custom Engines"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Custom template engine support is ",(0,r.kt)("em",{parentName:"p"},"experimental"))),(0,r.kt)("p",null,"If Mustache or the experimental Handlebars engines don't suit your needs, you can define an adapter to your templating engine of choice. To do this, you'll need to define a new project which consumes the ",(0,r.kt)("inlineCode",{parentName:"p"},"openapi-generator-core")," artifact, and at a minimum implement ",(0,r.kt)("inlineCode",{parentName:"p"},"TemplatingEngineAdapter"),"."),(0,r.kt)("p",null,"This example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"creates an adapter providing the fundamental logic to compile ",(0,r.kt)("a",{parentName:"li",href:"https://pebbletemplates.io"},"Pebble Templates")),(0,r.kt)("li",{parentName:"ul"},"will be implemented in Kotlin to demonstrate ServiceLoader configuration specific to Kotlin (Java will be similar)"),(0,r.kt)("li",{parentName:"ul"},"requires Gradle 5.0+"),(0,r.kt)("li",{parentName:"ul"},"provides project setup instructions for IntelliJ")),(0,r.kt)("p",null,"To begin, create a ",(0,r.kt)("a",{parentName:"p",href:"https://www.jetbrains.com/help/idea/getting-started-with-gradle.html"},"new Gradle project")," with Kotlin support. To do this, go to ",(0,r.kt)("inlineCode",{parentName:"p"},"File")," \u279e ",(0,r.kt)("inlineCode",{parentName:"p"},"New")," \u279e ",(0,r.kt)("inlineCode",{parentName:"p"},"Project"),', choose "Gradle" and "Kotlin". Specify groupId ',(0,r.kt)("inlineCode",{parentName:"p"},"org.openapitools.examples")," and artifactId ",(0,r.kt)("inlineCode",{parentName:"p"},"pebble-template-adapter"),"."),(0,r.kt)("p",null,"Ensure the new project uses Gradle 5.0. Navigate to the newly created directory and execute:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"gradle wrapper --gradle-version 5.0\n")),(0,r.kt)("p",null,"In ",(0,r.kt)("inlineCode",{parentName:"p"},"build.gradle"),", we'll add a dependency for OpenAPI Tools core which defines the interface and an abstract helper type for implementing the adapter. We'll also pull in the Pebble artifact. We'll be evaluating this new artifact locally, so we'll also add the Maven plugin for installing to the local maven repository. We'll also create a fatjar using the ",(0,r.kt)("inlineCode",{parentName:"p"},"shadow")," plugin to simplify our classpath."),(0,r.kt)("p",null,"Modifications to the new project's ",(0,r.kt)("inlineCode",{parentName:"p"},"build.gradle")," should be made in the ",(0,r.kt)("inlineCode",{parentName:"p"},"plugins")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies")," nodes:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff"},' plugins {\n id \'org.jetbrains.kotlin.jvm\' version \'1.3.11\'\n id "com.github.johnrengelman.shadow" version "5.0.0"\n }\n\n dependencies {\n compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"\n compile "org.openapitools:openapi-generator-core:4.0.0-SNAPSHOT"\n compile "io.pebbletemplates:pebble:3.0.8"\n }\n')),(0,r.kt)("p",null,"The above configuration for the ",(0,r.kt)("inlineCode",{parentName:"p"},"shadow")," plugin is strictly optional. It is not needed, for instance, if you plan to publish your adapter and consume it via the Maven or Gradle plugins."),(0,r.kt)("p",null,"Next, create a new class file called ",(0,r.kt)("inlineCode",{parentName:"p"},"PebbleTemplateEngineAdapter")," under ",(0,r.kt)("inlineCode",{parentName:"p"},"src/kotlin"),". We'll define the template adapter's name as ",(0,r.kt)("inlineCode",{parentName:"p"},"pebble")," and we'll also list this as the only supported file extension. We'll implement the adapter by extending ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractTemplatingEngineAdapter"),", which includes reusable logic, such as retrieving a list of all possible template names for our provided template extensions(s)."),(0,r.kt)("p",null,"The class in its simplest form looks like this (with inline comments):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-kotlin"},'// Allows specifying engine by class name\n// e.g. -e org.openapitools.examples.templating.PebbleTemplateAdapter\n@file:JvmName("PebbleTemplateAdapter")\npackage org.openapitools.examples.templating\n\n// imports\n\nclass PebbleTemplateAdapter : AbstractTemplatingEngineAdapter() {\n // initialize the template compilation engine\n private val engine: PebbleEngine = PebbleEngine.Builder()\n .cacheActive(false)\n .loader(DelegatingLoader(listOf(FileLoader(), ClasspathLoader())))\n .build()\n\n // allows targeting engine by id/name: -e pebble\n override fun getIdentifier(): String = "pebble"\n\n override fun compileTemplate(\n generator: TemplatingGenerator?,\n bundle: MutableMap?,\n templateFile: String?\n ): String {\n // This will convert, for example, model.mustache to model.pebble\n val modifiedTemplate = this.getModifiedFileLocation(templateFile).first()\n\n // Uses generator built-in template resolution strategy to find the full template file\n val filePath = generator?.getFullTemplatePath(modifiedTemplate)\n\n val writer = StringWriter()\n // Conditionally writes out the template if found.\n if (filePath != null) {\n engine.getTemplate(filePath.toAbsolutePath().toString())?.evaluate(writer, bundle)\n }\n return writer.toString()\n }\n\n override fun getFileExtensions(): Array = arrayOf("pebble")\n}\n')),(0,r.kt)("p",null,"Lastly, create a file ",(0,r.kt)("inlineCode",{parentName:"p"},"resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter"),", containing the full class path to the above class:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"org.openapitools.examples.templating.PebbleTemplateAdapter\n")),(0,r.kt)("p",null,"This allows the adapter to load via ServiceLoader, and to be referenced via the identifier ",(0,r.kt)("inlineCode",{parentName:"p"},"pebble"),". This is optional; if you don't provide the above file and contents, you'll only be able to load the engine via full class name (explained in a bit)."),(0,r.kt)("p",null,"Now, build the fatjar for this new adapter:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"./gradlew shadowJar\n")),(0,r.kt)("p",null,"To test compilation of some templates, we'll need to first create one or more template files. Create a temp directory at ",(0,r.kt)("inlineCode",{parentName:"p"},"/tmp/pebble-example/templates")," and add the following files."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"api.pebble")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'package {{packageName}}\n\nimport (\n "net/http"\n{% for item in imports %}\n "{{item.import}}"\n{% endfor %}\n)\n\ntype Generated{{classname}}Servicer\n\n// etc\n')),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"model.pebble")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'package {{packageName}}\n\n{% for item in models %}\n{% if item.isEnum %}\n// TODO: enum\n{% else %}\n{% if item.description is not empty %}// {{item.description}}{% endif %}\ntype {{item.classname}} struct {\n{% for var in item.model.vars %}\n {% if var.description is not empty %}// {{var.description}}{% endif %}\n {{var.name}} {% if var.isNullable %}*{% endif %}{{var.dataType}} `json:"{{var.baseName}}{% if var.required == false %},omitempty{% endif %}"{% if var.withXml == true %} xml:"{{var.baseName}}{% if var.isXmlAttribute %},attr{% endif %}"{% endif %}`\n{% endfor %}\n}\n{% endif %}\n{{model.name}}\n{% endfor %}\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Find object structures passed to templates later in this document's ",(0,r.kt)("strong",{parentName:"p"},"Structures")," section.")),(0,r.kt)("p",null,"Finally, we can compile some code by explicitly defining our classpath and jar entrypoint for CLI (be sure to modify ",(0,r.kt)("inlineCode",{parentName:"p"},"/your/path")," below)"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"java $JAVA_OPTS -cp /your/path/build/libs/pebble-template-adapter-1.0-SNAPSHOT-all.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \\\n org.openapitools.codegen.OpenAPIGenerator \\\n generate \\\n -g go \\\n -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-minimal.json \\\n -e pebble \\\n -o /tmp/pebble-example/out \\\n -t /tmp/pebble-example/templates \\\n --global-property models,modelDocs,modelTests,apis,apiTests,apiDocs\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"NOTE")," Running your custom generator requires adding it to the classpath. This differs on ",(0,r.kt)("a",{parentName:"p",href:"https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html"},"Windows")," slightly from ",(0,r.kt)("a",{parentName:"p",href:"https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"},"unix"),"."),(0,r.kt)("p",null,"In the above example, we've targeted our custom template engine adapter via ",(0,r.kt)("inlineCode",{parentName:"p"},"-e pebble"),". If you don't include the SPI file under ",(0,r.kt)("inlineCode",{parentName:"p"},"META-INF/services"),", you'll need to specify the exact classpath: ",(0,r.kt)("inlineCode",{parentName:"p"},"org.openapitools.examples.templating.PebbleTemplateAdapter"),". Notice that the target class here matches the Kotlin class name. This is because of the ",(0,r.kt)("inlineCode",{parentName:"p"},"@file:JvmName")," annotation."),(0,r.kt)("p",null,"Congratulations on creating a custom templating engine adapter!"),(0,r.kt)("h2",{id:"structures"},"Structures"),(0,r.kt)("p",null,"Aside from transforming an API document, the implementing class gets to decide how to apply the data structure to templates. We can decide which data structure to apply to which template files. You have the following structures at your disposal."),(0,r.kt)("p",null,"Examples for the following structures will be presented using the following spec document:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},' swagger: "2.0"\n info:\n version: "1.0.0"\n title: "Swagger Petstore"\n description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"\n termsOfService: "http://swagger.io/terms/"\n contact:\n name: "Swagger API Team"\n license:\n name: "MIT"\n host: "petstore.swagger.io"\n basePath: "/api"\n schemes:\n - "http"\n consumes:\n - "application/json"\n produces:\n - "application/json"\n paths:\n /pets:\n get:\n description: "Returns all pets from the system that the user has access to"\n produces:\n - "application/json"\n responses:\n "200":\n description: "A list of pets."\n schema:\n type: "array"\n items:\n $ref: "#/definitions/Pet"\n definitions:\n Pet:\n type: "object"\n required:\n - "id"\n - "name"\n properties:\n id:\n type: "integer"\n format: "int64"\n name:\n type: "string"\n tag:\n type: "string"\n\n')),(0,r.kt)("h3",{id:"operations"},"Operations"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Inspect operation structures passed to templates with system property ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")),(0,r.kt)("p",{parentName:"blockquote"},"Example:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugOpenAPI=true\n"))),(0,r.kt)("p",null,"There is a data structure which represents all the operations that are defined in the OpenAPI specification. A single API file is created for each ",(0,r.kt)("inlineCode",{parentName:"p"},"OperationGroup"),", which is essentially a grouping of different operations. See the ",(0,r.kt)("inlineCode",{parentName:"p"},"addOperationToGroup")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"DefaultCodegen.java")," for details on this operation."),(0,r.kt)("p",null,"You can have many files created for each ",(0,r.kt)("inlineCode",{parentName:"p"},"OperationGroup")," by processing multiple templates and assigning a different file naming pattern to them. So for a single file per operation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'// process the `api.mustache` template and output a single file with suffix `.java`:\napiTemplateFiles.put("api.mustache", ".java");\n')),(0,r.kt)("p",null,"For C-like languages which also require header files, you may create two files per operation."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-objectivec"},'// create a header and implementation for each operation group:\napiTemplateFiles.put("api-header.mustache", ".h");\napiTemplateFiles.put("api-body.mustache", ".m");\n')),(0,r.kt)("p",null,"Here, an Operation with tag ",(0,r.kt)("inlineCode",{parentName:"p"},"Pet")," will generate two files: ",(0,r.kt)("inlineCode",{parentName:"p"},"SWGPetApi.h")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"SWGPetApi.m"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"SWG")," prefix and ",(0,r.kt)("inlineCode",{parentName:"p"},"Api")," suffix are options specific to the Objective-C generator."),(0,r.kt)("h3",{id:"models"},"Models"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Inspect models passed to templates with system property ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugModels=true")),(0,r.kt)("p",{parentName:"blockquote"},"Execute:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugModels=true\n"))),(0,r.kt)("p",null,"Each model identified inside the generator will be passed into the ",(0,r.kt)("inlineCode",{parentName:"p"},"Models")," data structure and will generate a new model file (or files) for each model."),(0,r.kt)("p",null,"A ",(0,r.kt)("inlineCode",{parentName:"p"},"Pet")," model with three properties will provide a ",(0,r.kt)("em",{parentName:"p"},"lot")," of information about the type and properties. The output from ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugModels=true")," is presented in truncated format here."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'[ {\n "importPath" : "openapi.Pet",\n "model" : {\n "name" : "Pet",\n "classname" : "Pet",\n "classVarName" : "Pet",\n "modelJson" : "{\\n \\"required\\" : [ \\"id\\", \\"name\\" ],\\n \\"type\\" : \\"object\\",\\n \\"properties\\" : {\\n \\"id\\" : {\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n },\\n \\"name\\" : {\\n \\"type\\" : \\"string\\"\\n },\\n \\"tag\\" : {\\n \\"type\\" : \\"string\\"\\n }\\n }\\n}",\n "dataType" : "map[string]interface{}",\n "classFilename" : "model_pet",\n "isAlias" : false,\n "isString" : false,\n "isInteger" : false,\n "vars" : [ {\n "baseName" : "id",\n "getter" : "getId",\n "setter" : "setId",\n "dataType" : "int64",\n "datatypeWithEnum" : "int64",\n "dataFormat" : "int64",\n "name" : "Id",\n "defaultValueWithParam" : " = data.id;",\n "baseType" : "int64",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : false,\n "isNumeric" : true,\n "isInteger" : false,\n "isLong" : true,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Id",\n "nameInSnakeCase" : "ID",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "int64",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "name",\n "getter" : "getName",\n "setter" : "setName",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Name",\n "defaultValueWithParam" : " = data.name;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Name",\n "nameInSnakeCase" : "NAME",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "tag",\n "getter" : "getTag",\n "setter" : "setTag",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Tag",\n "defaultValueWithParam" : " = data.tag;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : false,\n "hasMoreNonReadOnly" : false,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Tag",\n "nameInSnakeCase" : "TAG",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n } ],\n "requiredVars" : [ /* id, name */ ],\n "optionalVars" : [ /* tag */ ],\n "readOnlyVars" : [ ],\n "readWriteVars" : [ /* lists metadata for all three properties */ ],\n "allVars" : [ /* lists all properties */],\n "parentVars" : [ ],\n "mandatory" : [ "id", "name" ],\n "allMandatory" : [ "id", "name" ],\n "imports" : [ ],\n "hasVars" : true,\n "emptyVars" : false,\n "hasMoreModels" : false,\n "hasEnums" : false,\n "isEnum" : false,\n "hasRequired" : true,\n "hasOptional" : true,\n "isArray" : false,\n "hasChildren" : false,\n "isMap" : false,\n "hasOnlyReadOnly" : false,\n "vendorExtensions" : { }\n }\n} ]\n')),(0,r.kt)("p",null,"Templates are passed redundant properties, depending on the semantics of the array. For example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"vars")," lists all defined model properties"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"requiredVars")," lists all model properties marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"required")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"optionalVars")," lists all model properties ",(0,r.kt)("em",{parentName:"li"},"not")," marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"required")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"readWriteVars")," lists all model properties ",(0,r.kt)("em",{parentName:"li"},"not")," marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"readOnlyVars")," lists all model properties marked with ",(0,r.kt)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"allVars")," lists all model properties. This may include the same set as ",(0,r.kt)("inlineCode",{parentName:"li"},"vars"),", but may also include generator-defined properties")),(0,r.kt)("p",null,'We expose the same properties in multiple sets because this allows us to conditionally iterate over properties based on some condition ("is it required" or "is it readonly"). This is driven by the use of the logic-less Mustache templates. It is possible that models passed to the templating engine may be cleaned up as we support more template engines, but such an effort will go through a deprecation phase and would be communicated at runtime through log messages.'),(0,r.kt)("h3",{id:"supportingfiles"},"supportingFiles"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Inspect supportingFiles passed to templates with system property ",(0,r.kt)("inlineCode",{parentName:"p"},"--global-property debugSupportingFiles=true")),(0,r.kt)("p",{parentName:"blockquote"},"Execute:"),(0,r.kt)("pre",{parentName:"blockquote"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugSupportingFiles=true\n"))),(0,r.kt)("p",null,'This is a "catch-all" which gives you the entire structure--operations, model, etc--so you can create "single-file" code from them.'),(0,r.kt)("p",null,"Supporting files can either be processed through the templating engine or copied as-is. When creating your own templates, you're limited to the files and extensions expected by the generator implementation. For more control over the supporting files produced by a generator, see our ",(0,r.kt)("a",{parentName:"p",href:"/docs/customization"},"customization")," documentation."),(0,r.kt)("h2",{id:"variables"},"Variables"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"This is a very limited list of variable name explanations. Feel free to ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/OpenAPITools/openapi-generator/pull/new/master"},"open a pull request")," to add to this documentation!")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"complexType"),": stores the name of the model (e.g. Pet)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"isContainer"),": true if the parameter or property is an array or a map."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"isPrimitiveType"),": true if the parameter or property type is a primitive type (e.g. string, integer, etc) as defined in the spec.")),(0,r.kt)("p",null,"More variables can be found ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java"},"here"),"."),(0,r.kt)("h2",{id:"mustache-lambdas"},"Mustache Lambdas"),(0,r.kt)("p",null,"Many generators (",(0,r.kt)("em",{parentName:"p"},"those extending DefaultCodegen"),") come with a small set of lambda functions available under the key ",(0,r.kt)("inlineCode",{parentName:"p"},"lambda"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"lowercase")," - Converts all of the characters in this fragment to lower case using the rules of the ",(0,r.kt)("inlineCode",{parentName:"li"},"ROOT")," locale."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uppercase")," - Converts all of the characters in this fragment to upper case using the rules of the ",(0,r.kt)("inlineCode",{parentName:"li"},"ROOT")," locale."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"snakecase")," - Converts text in a fragment to snake case. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"once upon a time")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"once_upon_a_time"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"titlecase")," - Converts text in a fragment to title case. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"once upon a time")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"Once Upon A Time"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"kebabcase")," - Converts text in a fragment to snake case. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"Once Upon A Time")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"once-upon-a-time"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"pascalcase")," - Converts text in a fragment to snake case. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"once upon a time")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"OnceUponATime"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"camelcase")," - Converts text in a fragment to camelCase. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"Input-text")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"inputText"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"uncamelize")," - Converts text in a fragment from camelCase or PascalCase to a string of words separated by whitespaces. For example ",(0,r.kt)("inlineCode",{parentName:"li"},"inputText")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input Text"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"forwardslash")," - Replaces all occurrences of ",(0,r.kt)("inlineCode",{parentName:"li"},"\\/"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"\\")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"//")," in a fragment by ",(0,r.kt)("inlineCode",{parentName:"li"},"/"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"backslash")," - Replaces all occurrences ",(0,r.kt)("inlineCode",{parentName:"li"},"/")," in a fragment by ",(0,r.kt)("inlineCode",{parentName:"li"},"\\"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"doublequote")," - Prepends ",(0,r.kt)("inlineCode",{parentName:"li"},'"')," to the beginning and appends ",(0,r.kt)("inlineCode",{parentName:"li"},'"')," to the end of a fragment."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented")," - Prepends 4 spaces indention from second line of a fragment on. First line will be indented by Mustache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented_8")," - Prepends 8 spaces indention from second line of a fragment on. First line will be indented by Mustache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented_12")," - Prepends 12 spaces indention from second line of a fragment on. First line will be indented by Mustache."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"indented_16")," -Prepends 16 spaces indention from second line of a fragment on. First line will be indented by Mustache.")),(0,r.kt)("p",null,"Some generators provide additional lambdas. Lambda is invoked by ",(0,r.kt)("inlineCode",{parentName:"p"},"lambda.[lambda name]")," expression. For example: ",(0,r.kt)("inlineCode",{parentName:"p"},"{{#lambda.lowercase}}FRAGMENT TO LOWERCASE{{/lambda.lowercase}}")," to lower case text between ",(0,r.kt)("inlineCode",{parentName:"p"},"lambda.lowercase"),"."),(0,r.kt)("h2",{id:"extensions"},"Extensions"),(0,r.kt)("p",null,'OpenAPI supports a concept called "Extensions". These are called "Specification Extensions" ',(0,r.kt)("a",{parentName:"p",href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions"},"in 3.x"),' and "Vendor Extensions" ',(0,r.kt)("a",{parentName:"p",href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions"},"in 2.0"),'.\nYou\'ll see them referred to as "Vendor Extensions" in most places in this project.'),(0,r.kt)("p",null,"Vendor extensions allow you to provide vendor-specific configurations to your specification document."),(0,r.kt)("p",null,"For example, suppose you use your specification document for code generation with a (hypothetical) C# OpenAPI generator supporting a desired operationId prefix where the extension is ",(0,r.kt)("inlineCode",{parentName:"p"},"x-csharp-operationid"),", you can define this property alongside the object you'd like to extend (which would be a Path Object in this case). You could then apply additional extensions alongside this property, whether they're for another language or other tooling."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Well-defined vendor extensions don't cause conflicts with other tooling.")),(0,r.kt)("p",null,'The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates.'),(0,r.kt)("h3",{id:"all-generators-core"},"All generators (core)"),(0,r.kt)("h4",{id:"enum"},"Enum"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-varnames")," can be used to have another enum name for the corresponding value.\nThis is used to define names of the enum items."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-descriptions")," can be used to provide an individual description for each value.\nThis is used for comments in the code (like javadoc if the target language is java)."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-descriptions")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"x-enum-varnames")," are each expected to be list of items containing the same number of items as ",(0,r.kt)("inlineCode",{parentName:"p"},"enum"),".\nThe order of the items in the list matters: their position is used to group them together."),(0,r.kt)("p",null,"Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"WeatherType:\n type: integer\n format: int32\n enum:\n - 42\n - 18\n - 56\n x-enum-descriptions:\n - 'Blue sky'\n - 'Slightly overcast'\n - 'Take an umbrella with you'\n x-enum-varnames:\n - Sunny\n - Cloudy\n - Rainy\n")),(0,r.kt)("p",null,"In the example for the integer value ",(0,r.kt)("inlineCode",{parentName:"p"},"42"),", the description will be ",(0,r.kt)("inlineCode",{parentName:"p"},"Blue sky")," and the name of the enum item will be ",(0,r.kt)("inlineCode",{parentName:"p"},"Sunny")," (some generators changes it to ",(0,r.kt)("inlineCode",{parentName:"p"},"SUNNY")," to respect some coding convention)."),(0,r.kt)("h3",{id:"objc"},"ObjC"),(0,r.kt)("h4",{id:"x-objc-operationid"},"x-objc-operationId"),(0,r.kt)("p",null,"To customize the method name, you can provide a different name in x-objc-operationId, e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"summary: Add a new pet to the store\ndescription: ''\noperationId: addPet\nx-objc-operationId: CreateNewPet\n")),(0,r.kt)("h3",{id:"java-feign"},"Java (Feign)"),(0,r.kt)("h4",{id:"x-accepts"},"x-accepts"),(0,r.kt)("p",null,"A single ",(0,r.kt)("inlineCode",{parentName:"p"},"Accepts")," value as the Feign API client needs a single value for ",(0,r.kt)("inlineCode",{parentName:"p"},"Accepts")," header, e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"consumes:\n - application/json\n - application/xml\nx-accepts: application/json\n")),(0,r.kt)("h3",{id:"x-content-type"},"x-content-type"),(0,r.kt)("p",null,'A single "Content-Type" value as the Feign API client needs a single value for ',(0,r.kt)("inlineCode",{parentName:"p"},"Content-Type")," header, e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"produces:\n - application/xml\n - application/json\nx-content-type: application/json\n")),(0,r.kt)("h3",{id:"rust-server"},"Rust-server"),(0,r.kt)("h4",{id:"x-response-id"},"x-response-id"),(0,r.kt)("p",null,"Each response may specify a unique ",(0,r.kt)("inlineCode",{parentName:"p"},"x-response-id"),". ",(0,r.kt)("inlineCode",{parentName:"p"},"rust-server")," will use this to name the corresponding enum variant in the code. e.g."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"paths:\n /ping:\n get:\n responses:\n 200:\n description: OK\n x-response-id: Pong\n")),(0,r.kt)("h3",{id:"mysql-schema"},"MySQL Schema"),(0,r.kt)("h4",{id:"x-mysqlschema"},"x-mysqlSchema"),(0,r.kt)("p",null,"MySQL schema generator creates vendor extensions based on openapi ",(0,r.kt)("inlineCode",{parentName:"p"},"dataType")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"dataFormat"),". When user defined extensions with same key already exists codegen accepts those as is. It means it won't validate properties or correct it for you. Every model in ",(0,r.kt)("inlineCode",{parentName:"p"},"definitions")," can contain table related and column related extensions like in example below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"definitions:\n Order:\n description: This should be most common InnoDB table\n type: object\n properties:\n id:\n description: >-\n This column should be unsigned BIGINT with AUTO_INCREMENT\n type: integer\n format: int64\n x-mysqlSchema:\n columnDefinition:\n colName: id\n colDataType: DECIMAL\n colDataTypeArguments:\n - argumentValue: 16\n isString: false\n - argumentValue: 4\n isString: false\n colUnsigned: true\n colNotNull: true\n colDefault:\n defaultValue: AUTO_INCREMENT\n isString: false\n isNumeric: false\n isKeyword: true\n colComment: >-\n Column comment. This column should be unsigned BIGINT with AUTO_INCREMENT\n x-mysqlSchema:\n tableDefinition:\n tblName: orders\n tblStorageEngine: InnoDB\n tblComment: >-\n Table comment. This should be most common InnoDB table\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"There are properties that are not implemented by now(",(0,r.kt)("inlineCode",{parentName:"p"},"tblStorageEngine"),"), but you can see how generator can be enhanced in future.")),(0,r.kt)("h2",{id:"mustache-tips"},"Mustache Tips"),(0,r.kt)("p",null,"Here are a few tips we've found useful for new template authors.\nFor more details on Mustache see ",(0,r.kt)("a",{parentName:"p",href:"https://mustache.github.io/mustache.5.html"},"mustache.5"),". See also ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/samskivert/jmustache"},"samskivert/jmustache")," for implementation-specific details."),(0,r.kt)("h3",{id:"firstlast"},"First/Last"),(0,r.kt)("p",null,"To access the first or last element in a list using Mustache:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-mustache"},"{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}}\n{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}}\n")),(0,r.kt)("h3",{id:"this"},"This"),(0,r.kt)("p",null,"Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept)."),(0,r.kt)("p",null,"You can inspect this entire context by outputting ",(0,r.kt)("inlineCode",{parentName:"p"},"{{this}}"),". For example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-mustache"},"{{#operations}}{{this}}{{/operations}}\n")),(0,r.kt)("h3",{id:"index"},"Index"),(0,r.kt)("p",null,"If you'd like a 1-based index in your array traversal, you can use ",(0,r.kt)("inlineCode",{parentName:"p"},"{{-index}}"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-mustache"},"{{#enums}}{{-index}} {{enum}}{{/enums}}\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/dc50c507.29986376.js b/assets/js/dc50c507.29986376.js deleted file mode 100644 index 7016a5f9ee1..00000000000 --- a/assets/js/dc50c507.29986376.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2686],{3905:function(t,a,e){e.d(a,{Zo:function(){return m},kt:function(){return g}});var n=e(7294);function l(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}function r(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var a=1;a=0||(l[e]=t[e]);return l}(t,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(l[e]=t[e])}return l}var k=n.createContext({}),u=function(t){var a=n.useContext(k),e=a;return t&&(e="function"==typeof t?t(a):i(i({},a),t)),e},m=function(t){var a=u(t.components);return n.createElement(k.Provider,{value:a},t.children)},d="mdxType",o={inlineCode:"code",wrapper:function(t){var a=t.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(t,a){var e=t.components,l=t.mdxType,r=t.originalType,k=t.parentName,m=p(t,["components","mdxType","originalType","parentName"]),d=u(e),N=l,g=d["".concat(k,".").concat(N)]||d[N]||o[N]||r;return e?n.createElement(g,i(i({ref:a},m),{},{components:e})):n.createElement(g,i({ref:a},m))}));function g(t,a){var e=arguments,l=a&&a.mdxType;if("string"==typeof t||l){var r=e.length,i=new Array(r);i[0]=N;var p={};for(var k in a)hasOwnProperty.call(a,k)&&(p[k]=a[k]);p.originalType=t,p[d]="string"==typeof t?t:l,i[1]=p;for(var u=2;u=0||(l[e]=t[e]);return l}(t,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(l[e]=t[e])}return l}var m=n.createContext({}),k=function(t){var a=n.useContext(m),e=a;return t&&(e="function"==typeof t?t(a):i(i({},a),t)),e},u=function(t){var a=k(t.components);return n.createElement(m.Provider,{value:a},t.children)},d="mdxType",o={inlineCode:"code",wrapper:function(t){var a=t.children;return n.createElement(n.Fragment,{},a)}},N=n.forwardRef((function(t,a){var e=t.components,l=t.mdxType,r=t.originalType,m=t.parentName,u=p(t,["components","mdxType","originalType","parentName"]),d=k(e),N=l,g=d["".concat(m,".").concat(N)]||d[N]||o[N]||r;return e?n.createElement(g,i(i({ref:a},u),{},{components:e})):n.createElement(g,i({ref:a},u))}));function g(t,a){var e=arguments,l=a&&a.mdxType;if("string"==typeof t||l){var r=e.length,i=new Array(r);i[0]=N;var p={};for(var m in a)hasOwnProperty.call(a,m)&&(p[m]=a[m]);p.originalType=t,p[d]="string"==typeof t?t:l,i[1]=p;for(var k=2;k1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/0)&&(F.current.unobserve(e),F.current.disconnect(),null!=I&&window.docusaurus.prefetch(I))}))})),F.current.observe(e))},to:I},g&&{isActive:y,activeClassName:b}))}var g=a.forwardRef(m)},5999:function(e,t,n){"use strict";n.d(t,{Z:function(){return c},I:function(){return s}});var r=n(7294);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var a=n(7529);function i(e){var t,n,r=e.id,o=e.message;if(void 0===r&&void 0===o)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=a[null!=r?r:o])?n:o)?t:r}function s(e,t){return o(i({message:e.message,id:e.id}),t)}function c(e){var t=e.children,n=e.id,a=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var s=i({message:t,id:n});return r.createElement(r.Fragment,null,o(s,a))}},9935:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},3919:function(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return o},b:function(){return r}})},4996:function(e,t,n){"use strict";n.d(t,{C:function(){return i},Z:function(){return s}});var r=n(7294),o=n(2263),a=n(3919);function i(){var e=(0,o.Z)().siteConfig,t=e.baseUrl,n=e.url,i=(0,r.useCallback)((function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,i=o.forcePrependBaseUrl,s=void 0!==i&&i,c=o.absolute,l=void 0!==c&&c;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(s)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var u=n.startsWith(t)?n:t+n.replace(/^\//,"");return l?e+u:u}(n,t,e,r)}),[n,t]);return{withBaseUrl:i}}function s(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},2263:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(8940);function a(){return(0,r.useContext)(o._)}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(8934);function a(){return(0,r.useContext)(o._)}},9670:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var o,a=n[0],i=n[1],s=r?r+"."+a:a;"object"==typeof(o=i)&&o&&Object.keys(o).length>0?e(i,s):t[s]=i}))}(e),t}},226:function(e,t,n){"use strict";n.d(t,{_:function(){return o},z:function(){return a}});var r=n(7294),o=r.createContext(null);function a(e){var t=e.children,n=e.value,a=r.useContext(o),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:a,value:n})}),[a,n]);return r.createElement(o.Provider,{value:i},t)}},143:function(e,t,n){"use strict";n.d(t,{Iw:function(){return v},gA:function(){return f},WS:function(){return m},_r:function(){return d},Jo:function(){return b},zh:function(){return p},yW:function(){return h},gB:function(){return g}});var r=n(6550),o=n(2263),a=n(9935);function i(e,t){void 0===t&&(t={});var n=(0,o.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function c(e,t){var n=s(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}function l(e,t){var n,o,a=c(e,t),i=null==a?void 0:a.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:a,activeDoc:i,alternateDocVersions:i?(n=i.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}var u={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},p=function(e){return function(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});var r=i(e),o=null==r?void 0:r[t];if(!o&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}("docusaurus-plugin-content-docs",e,{failfast:!0})};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return a}(d(),(0,r.TH)().pathname,e)}function m(e){void 0===e&&(e={});var t=f(e),n=(0,r.TH)().pathname;if(t)return{activePlugin:t,activeVersion:c(t.pluginData,n)}}function g(e){return p(e).versions}function h(e){var t=p(e);return s(t)}function v(e){return l(p(e),(0,r.TH)().pathname)}function b(e){return function(e,t){var n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(p(e),(0,r.TH)().pathname)}},4367:function(e,t,n){"use strict";n.r(t);var r={onRouteDidUpdate:function(e){var t=e.location,n=e.previousLocation;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||(window.ga("set","page",t.pathname+t.search+t.hash),window.ga("send","pageview"))}};t.default=r},8320:function(e,t,n){"use strict";n.r(t);var r=n(4865),o=n.n(r);o().configure({showSpinner:!1});var a={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){o().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){o().done()}};t.default=a},3310:function(e,t,n){"use strict";n.r(t);var r,o,a=n(7410),i=n(6809);r=a.Z,o=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,o.forEach((function(e){n(6726)("./prism-"+e)})),delete globalThis.Prism},9471:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o="iconExternalLink_nPIU";function a(e){var t=e.width,n=void 0===t?13.5:t,a=e.height,i=void 0===a?13.5:a;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:o},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},4774:function(e,t,n){"use strict";n.d(t,{Z:function(){return $t}});var r=n(7294),o=n(6010),a=n(4763),i=n(833),s=n(7462),c=n(6550),l=n(5999),u=n(5936),d="docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){var e=(0,r.useRef)(null),t=(0,c.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&p(n)}),[]);return(0,u.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}var m=(0,l.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){var t,n=null!=(t=e.children)?t:m,o=f(),a=o.containerRef,i=o.onClick;return r.createElement("div",{ref:a,role:"region","aria-label":m},r.createElement("a",(0,s.Z)({},e,{href:"#"+d,onClick:i}),n))}var h=n(5281),v=n(9727),b="skipToContent_fXgn";function y(){return r.createElement(g,{className:b})}var w=n(6668),k=n(9689),x=n(3366),E=["width","height","color","strokeWidth","className"];function S(e){var t=e.width,n=void 0===t?21:t,o=e.height,a=void 0===o?21:o,i=e.color,c=void 0===i?"currentColor":i,l=e.strokeWidth,u=void 0===l?1.2:l,d=(e.className,(0,x.Z)(e,E));return r.createElement("svg",(0,s.Z)({viewBox:"0 0 15 15",width:n,height:a},d),r.createElement("g",{stroke:c,strokeWidth:u},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var _="closeButton_CVFx";function T(e){return r.createElement("button",(0,s.Z)({type:"button","aria-label":(0,l.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,o.Z)("clean-btn close",_,e.className)}),r.createElement(S,{width:14,height:14,strokeWidth:3.1}))}var C="content_knG7";function L(e){var t=(0,w.L)().announcementBar.content;return r.createElement("div",(0,s.Z)({},e,{className:(0,o.Z)(C,e.className),dangerouslySetInnerHTML:{__html:t}}))}var A="announcementBar_mb4j",P="announcementBarPlaceholder_vyr4",R="announcementBarClose_gvF7",j="announcementBarContent_xLdY";function O(){var e=(0,w.L)().announcementBar,t=(0,k.nT)(),n=t.isActive,o=t.close;if(!n)return null;var a=e.backgroundColor,i=e.textColor,s=e.isCloseable;return r.createElement("div",{className:A,style:{backgroundColor:a,color:i},role:"banner"},s&&r.createElement("div",{className:P}),r.createElement(L,{className:j}),s&&r.createElement(T,{onClick:o,className:R}))}var I=n(2961),N=n(2466);var D=n(9688),M=n(3102),F=r.createContext(null);function B(e){var t,n,o,a,i,s,c,l=e.children,u=(t=(0,I.e)(),n=(0,M.HY)(),o=(0,r.useState)(!1),a=o[0],i=o[1],s=null!==n.component,c=(0,D.D9)(s),(0,r.useEffect)((function(){s&&!c&&i(!0)}),[s,c]),(0,r.useEffect)((function(){s?t.shown||i(!0):i(!1)}),[t.shown,s]),(0,r.useMemo)((function(){return[a,i]}),[a]));return r.createElement(F.Provider,{value:u},l)}function z(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function U(){var e=(0,r.useContext)(F);if(!e)throw new D.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],o=(0,r.useCallback)((function(){return n(!1)}),[n]),a=(0,M.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:o,content:z(a)}}),[o,a,t])}function q(e){var t=e.header,n=e.primaryMenu,a=e.secondaryMenu,i=U().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,o.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},a)))}var Z=n(2949),G=n(2389);function H(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function $(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}var V={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function W(e){var t=e.className,n=e.value,a=e.onChange,i=(0,G.Z)(),s=(0,l.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,l.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,o.Z)(V.toggle,t)},r.createElement("button",{className:(0,o.Z)("clean-btn",V.toggleButton,!i&&V.toggleButtonDisabled),type:"button",onClick:function(){return a("dark"===n?"light":"dark")},disabled:!i,title:s,"aria-label":s,"aria-live":"polite"},r.createElement(H,{className:(0,o.Z)(V.toggleIcon,V.lightToggleIcon)}),r.createElement($,{className:(0,o.Z)(V.toggleIcon,V.darkToggleIcon)})))}var K=r.memo(W);function Q(e){var t=e.className,n=(0,w.L)().colorMode.disableSwitch,o=(0,Z.I)(),a=o.colorMode,i=o.setColorMode;return n?null:r.createElement(K,{className:t,value:a,onChange:i})}var Y=n(1327);function X(){return r.createElement(Y.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function J(){var e=(0,I.e)();return r.createElement("button",{type:"button","aria-label":(0,l.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(S,{color:"var(--ifm-color-emphasis-600)"}))}function ee(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(X,null),r.createElement(Q,{className:"margin-right--md"}),r.createElement(J,null))}var te=n(9960),ne=n(4996),re=n(3919),oe=n(8022),ae=n(9471),ie=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function se(e){var t=e.activeBasePath,n=e.activeBaseRegex,o=e.to,a=e.href,i=e.label,c=e.html,l=e.isDropdownLink,u=e.prependBaseUrlToHref,d=(0,x.Z)(e,ie),p=(0,ne.Z)(o),f=(0,ne.Z)(t),m=(0,ne.Z)(a,{forcePrependBaseUrl:!0}),g=i&&a&&!(0,re.Z)(a),h=c?{dangerouslySetInnerHTML:{__html:c}}:{children:r.createElement(r.Fragment,null,i,g&&r.createElement(ae.Z,l&&{width:12,height:12}))};return a?r.createElement(te.Z,(0,s.Z)({href:u?m:a},d,h)):r.createElement(te.Z,(0,s.Z)({to:p,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,oe.F)(n,t.pathname):t.pathname.startsWith(f)}},d,h))}var ce=["className","isDropdownItem"],le=["className","isDropdownItem"],ue=["mobile","position"];function de(e){var t=e.className,n=e.isDropdownItem,a=void 0!==n&&n,i=(0,x.Z)(e,ce),c=r.createElement(se,(0,s.Z)({className:(0,o.Z)(a?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:a},i));return a?r.createElement("li",null,c):c}function pe(e){var t=e.className,n=(e.isDropdownItem,(0,x.Z)(e,le));return r.createElement("li",{className:"menu__list-item"},r.createElement(se,(0,s.Z)({className:(0,o.Z)("menu__link",t)},n)))}function fe(e){var t,n=e.mobile,o=void 0!==n&&n,a=(e.position,(0,x.Z)(e,ue)),i=o?pe:de;return r.createElement(i,(0,s.Z)({},a,{activeClassName:null!=(t=a.activeClassName)?t:o?"menu__link--active":"navbar__link--active"}))}var me=n(6043),ge=n(8596),he=n(2263);var ve=["items","position","className","onClick"],be=["items","className","position","onClick"],ye=["mobile"];function we(e,t){return e.some((function(e){return function(e,t){return!!(0,ge.Mg)(e.to,t)||!!(0,oe.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function ke(e){var t,n=e.items,a=e.position,i=e.className,c=(e.onClick,(0,x.Z)(e,ve)),l=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],p=u[1];return(0,r.useEffect)((function(){var e=function(e){l.current&&!l.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[l]),r.createElement("div",{ref:l,className:(0,o.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===a,"dropdown--show":d})},r.createElement(se,(0,s.Z)({"aria-haspopup":"true","aria-expanded":d,role:"button",href:c.to?void 0:"#",className:(0,o.Z)("navbar__link",i)},c,{onClick:c.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p(!d))}}),null!=(t=c.children)?t:c.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(ct,(0,s.Z)({isDropdownItem:!0,onKeyDown:function(e){if(t===n.length-1&&"Tab"===e.key){e.preventDefault(),p(!1);var r=l.current.nextElementSibling;if(r)(r instanceof HTMLAnchorElement?r:r.querySelector("a")).focus()}},activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function xe(e){var t,n,a=e.items,i=e.className,l=(e.position,e.onClick),u=(0,x.Z)(e,be),d=(n=(0,he.Z)().siteConfig.baseUrl,(0,c.TH)().pathname.replace(n,"/")),p=we(a,d),f=(0,me.u)({initialState:function(){return!p}}),m=f.collapsed,g=f.toggleCollapsed,h=f.setCollapsed;return(0,r.useEffect)((function(){p&&h(!p)}),[d,p,h]),r.createElement("li",{className:(0,o.Z)("menu__list-item",{"menu__list-item--collapsed":m})},r.createElement(se,(0,s.Z)({role:"button",className:(0,o.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},u,{onClick:function(e){e.preventDefault(),g()}}),null!=(t=u.children)?t:u.label),r.createElement(me.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:m},a.map((function(e,t){return r.createElement(ct,(0,s.Z)({mobile:!0,isDropdownItem:!0,onClick:l,activeClassName:"menu__link--active"},e,{key:t}))}))))}function Ee(e){var t=e.mobile,n=void 0!==t&&t,o=(0,x.Z)(e,ye),a=n?xe:ke;return r.createElement(a,o)}var Se=n(4711),_e=["width","height"];function Te(e){var t=e.width,n=void 0===t?20:t,o=e.height,a=void 0===o?20:o,i=(0,x.Z)(e,_e);return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},i),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}var Ce="iconLanguage_nlXk",Le=["mobile","dropdownItemsBefore","dropdownItemsAfter"];function Ae(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var Pe=n(830),Re=["translations"];function je(){return je=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var De="Ctrl";var Me=r.forwardRef((function(e,t){var n=e.translations,o=void 0===n?{}:n,a=Ne(e,Re),i=o.buttonText,s=void 0===i?"Search":i,c=o.buttonAriaLabel,l=void 0===c?"Search":c,u=Oe((0,r.useState)(null),2),d=u[0],p=u[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("\u2318"):p(De))}),[]),r.createElement("button",je({type:"button",className:"DocSearch DocSearch-Button","aria-label":l},a,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(Pe.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},s)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===De?r.createElement(Ae,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Fe=n(5742),Be=n(6177),ze=n(239),Ue=n(3320);var qe=n(3935),Ze={button:{buttonText:(0,l.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,l.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,l.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})},Ge=["contextualSearch","externalUrlRegex"],He=null;function $e(e){var t=e.hit,n=e.children;return r.createElement(te.Z,{to:t.url},n)}function Ve(e){var t=e.state,n=e.onClose,o=(0,Be.O)().generateSearchPageLink;return r.createElement(te.Z,{to:o(t.query),onClick:n},r.createElement(l.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function We(e){var t,o,a,i,l,u=e.contextualSearch,d=e.externalUrlRegex,p=(0,x.Z)(e,Ge),f=(0,he.Z)().siteMetadata,m=(0,ze.l)(),g=["language:"+(a=(0,Ue._q)()).locale,a.tags.map((function(e){return"docusaurus_tag:"+e}))],h=null!=(t=null==(o=p.searchParameters)?void 0:o.facetFilters)?t:[],v=u?(i=h,[].concat((l=function(e){return"string"==typeof e?[e]:e})(g),l(i))):h,b=Object.assign({},p.searchParameters,{facetFilters:v}),y=(0,c.k6)(),w=(0,r.useRef)(null),k=(0,r.useRef)(null),E=(0,r.useState)(!1),S=E[0],_=E[1],T=(0,r.useState)(void 0),C=T[0],L=T[1],A=(0,r.useCallback)((function(){return He?Promise.resolve():Promise.all([n.e(6780).then(n.bind(n,6780)),Promise.all([n.e(532),n.e(6945)]).then(n.bind(n,6945)),Promise.all([n.e(532),n.e(8894)]).then(n.bind(n,8894))]).then((function(e){var t=e[0].DocSearchModal;He=t}))}),[]),P=(0,r.useCallback)((function(){A().then((function(){w.current=document.createElement("div"),document.body.insertBefore(w.current,document.body.firstChild),_(!0)}))}),[A,_]),R=(0,r.useCallback)((function(){var e;_(!1),null==(e=w.current)||e.remove()}),[_]),j=(0,r.useCallback)((function(e){A().then((function(){_(!0),L(e.key)}))}),[A,_,L]),O=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,oe.F)(d,t)?window.location.href=t:y.push(t)}}).current,I=(0,r.useRef)((function(e){return p.transformItems?p.transformItems(e):e.map((function(e){return Object.assign({},e,{url:m(e.url)})}))})).current,N=(0,r.useMemo)((function(){return function(e){return r.createElement(Ve,(0,s.Z)({},e,{onClose:R}))}}),[R]),D=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",f.docusaurusVersion),e}),[f.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,o=e.onClose,a=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){(27===e.keyCode&&t||"k"===e.key.toLowerCase()&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?o():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&a(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,o,a,i])}({isOpen:S,onOpen:P,onClose:R,onInput:j,searchButtonRef:k}),r.createElement(r.Fragment,null,r.createElement(Fe.Z,null,r.createElement("link",{rel:"preconnect",href:"https://"+p.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})),r.createElement(Me,{onTouchStart:A,onFocus:A,onMouseOver:A,onClick:P,ref:k,translations:Ze.button}),S&&He&&w.current&&(0,qe.createPortal)(r.createElement(He,(0,s.Z)({onClose:R,initialScrollY:window.scrollY,initialQuery:C,navigator:O,transformItems:I,hitComponent:$e,transformSearchClient:D},p.searchPagePath&&{resultsFooterComponent:N},p,{searchParameters:b,placeholder:Ze.placeholder,translations:Ze.modal})),w.current))}function Ke(){var e=(0,he.Z)().siteConfig;return r.createElement(We,e.themeConfig.algolia)}var Qe="searchBox_ZlJk";function Ye(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,o.Z)(n,Qe)},t)}var Xe=n(143),Je=n(8425),et=["docId","label","docsPluginId"];var tt=["sidebarId","label","docsPluginId"];var nt=["label","to","docsPluginId"];var rt=n(373),ot=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],at=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var it={default:fe,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,o=e.dropdownItemsAfter,a=(0,x.Z)(e,Le),i=(0,he.Z)().i18n,u=i.currentLocale,d=i.locales,p=i.localeConfigs,f=(0,Se.l)(),m=(0,c.TH)(),g=m.search,h=m.hash,v=d.map((function(e){var n=""+("pathname://"+f.createUrl({locale:e,fullyQualified:!1}))+g+h;return{label:p[e].label,lang:p[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}})),b=[].concat(n,v,o),y=t?(0,l.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):p[u].label;return r.createElement(Ee,(0,s.Z)({},a,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(Te,{className:Ce}),y),items:b}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(Ye,{className:n},r.createElement(Ke,null))},dropdown:Ee,html:function(e){var t=e.value,n=e.className,a=e.mobile,i=void 0!==a&&a,s=e.isDropdownItem,c=void 0!==s&&s,l=c?"li":"div";return r.createElement(l,{className:(0,o.Z)({navbar__item:!i&&!c,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,o=e.docsPluginId,a=(0,x.Z)(e,et),i=(0,Xe.Iw)(o).activeDoc,c=(0,Je.vY)(t,o);return null===c?null:r.createElement(fe,(0,s.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.path)===c.path||!(null==i||!i.sidebar)&&i.sidebar===c.sidebar},label:null!=n?n:c.id,to:c.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,o=e.docsPluginId,a=(0,x.Z)(e,tt),i=(0,Xe.Iw)(o).activeDoc,c=(0,Je.oz)(t,o).link;if(!c)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(fe,(0,s.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:c.label,to:c.path}))},docsVersion:function(e){var t=e.label,n=e.to,o=e.docsPluginId,a=(0,x.Z)(e,nt),i=(0,Je.lO)(o)[0],c=null!=t?t:i.label,l=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(fe,(0,s.Z)({},a,{label:c,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,o=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,i=e.dropdownItemsAfter,u=(0,x.Z)(e,ot),d=(0,c.TH)(),p=d.search,f=d.hash,m=(0,Xe.Iw)(n),g=(0,Xe.gB)(n),h=(0,rt.J)(n).savePreferredVersionName,v=g.map((function(e){var t,n=null!=(t=m.alternateDocVersions[e.name])?t:at(e);return{label:e.label,to:""+n.path+p+f,isActive:function(){return e===m.activeVersion},onClick:function(){return h(e.name)}}})),b=[].concat(a,v,i),y=(0,Je.lO)(n)[0],w=t&&b.length>1?(0,l.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,k=t&&b.length>1?void 0:at(y).path;return b.length<=1?r.createElement(fe,(0,s.Z)({},u,{mobile:t,label:w,to:k,isActive:o?function(){return!1}:void 0})):r.createElement(Ee,(0,s.Z)({},u,{mobile:t,label:w,to:k,items:b,isActive:o?function(){return!1}:void 0}))}},st=["type"];function ct(e){var t=e.type,n=(0,x.Z)(e,st),o=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=it[o];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(a,n)}function lt(){var e=(0,I.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(ct,(0,s.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function ut(e){return r.createElement("button",(0,s.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(l.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function dt(){var e=0===(0,w.L)().navbar.items.length,t=U();return r.createElement(r.Fragment,null,!e&&r.createElement(ut,{onClick:function(){return t.hide()}}),t.content)}function pt(){var e,t=(0,I.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(q,{header:r.createElement(ee,null),primaryMenu:r.createElement(lt,null),secondaryMenu:r.createElement(dt,null)}):null}var ft="navbarHideable_m1mJ",mt="navbarHidden_jGov";function gt(e){return r.createElement("div",(0,s.Z)({role:"presentation"},e,{className:(0,o.Z)("navbar-sidebar__backdrop",e.className)}))}function ht(e){var t=e.children,n=(0,w.L)().navbar,a=n.hideOnScroll,i=n.style,s=(0,I.e)(),c=function(e){var t=(0,r.useState)(e),n=t[0],o=t[1],a=(0,r.useRef)(!1),i=(0,r.useRef)(0),s=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,N.RF)((function(t,n){var r=t.scrollY;if(e)if(r=s?o(!1):r+l0&&r.createElement(Ot,{links:n}),logo:o&&r.createElement(Mt,{logo:o}),copyright:t&&r.createElement(Ft,{copyright:t})})}var Ut=r.memo(zt),qt=(0,D.Qc)([Z.S,k.pl,N.OC,rt.L5,i.VC,function(e){var t=e.children;return r.createElement(M.n2,null,r.createElement(I.M,null,r.createElement(B,null,t)))}]);function Zt(e){var t=e.children;return r.createElement(qt,null,t)}function Gt(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(l.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(l.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}var Ht="mainWrapper_z2l0";function $t(e){var t=e.children,n=e.noFooter,s=e.wrapperClassName,c=e.title,l=e.description;return(0,v.t)(),r.createElement(Zt,null,r.createElement(i.d,{title:c,description:l}),r.createElement(y,null),r.createElement(O,null),r.createElement(St,null),r.createElement("div",{id:d,className:(0,o.Z)(h.k.wrapper.main,Ht,s)},r.createElement(a.Z,{fallback:function(e){return r.createElement(Gt,e)}},t)),!n&&r.createElement(Ut,null))}},1327:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7462),o=n(3366),a=n(7294),i=n(9960),s=n(4996),c=n(2263),l=n(6668),u=n(941),d=["imageClassName","titleClassName"];function p(e){var t=e.logo,n=e.alt,r=e.imageClassName,o={light:(0,s.Z)(t.src),dark:(0,s.Z)(t.srcDark||t.src)},i=a.createElement(u.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},i):i}function f(e){var t,n=(0,c.Z)().siteConfig.title,u=(0,l.L)().navbar,f=u.title,m=u.logo,g=e.imageClassName,h=e.titleClassName,v=(0,o.Z)(e,d),b=(0,s.Z)((null==m?void 0:m.href)||"/"),y=f?"":n,w=null!=(t=null==m?void 0:m.alt)?t:y;return a.createElement(i.Z,(0,r.Z)({to:b},v,(null==m?void 0:m.target)&&{target:m.target}),m&&a.createElement(p,{logo:m,alt:w,imageClassName:g}),null!=f&&a.createElement("b",{className:h},f))}},197:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(5742);function a(e){var t=e.locale,n=e.version,a=e.tag,i=t;return r.createElement(o.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),a&&r.createElement("meta",{name:"docusaurus_tag",content:a}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),a&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:a}))}},941:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(7462),o=n(3366),a=n(7294),i=n(6010),s=n(2389),c=n(2949),l={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"},u=["sources","className","alt"];function d(e){var t=(0,s.Z)(),n=(0,c.I)().colorMode,d=e.sources,p=e.className,f=e.alt,m=(0,o.Z)(e,u),g=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,g.map((function(e){return a.createElement("img",(0,r.Z)({key:e,src:d[e],alt:f,className:(0,i.Z)(l.themedImage,l["themedImage--"+e],p)},m))})))}},6043:function(e,t,n){"use strict";n.d(t,{u:function(){return l},z:function(){return v}});var r=n(7462),o=n(3366),a=n(7294),i=n(412),s=["collapsed"],c=["lazy"];function l(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function s(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return p(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(s(),requestAnimationFrame((function(){a.style.height=u.height,a.style.overflow=u.overflow}))):(a.style.display="block",requestAnimationFrame((function(){s()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function m(e){if(!i.Z.canUseDOM)return e?u:d}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,c=e.className,l=e.disableSSRStyle,u=(0,a.useRef)(null);return f({collapsibleRef:u,collapsed:r,animation:i}),a.createElement(n,{ref:u,style:l?void 0:m(r),onTransitionEnd:function(e){"height"===e.propertyName&&(p(u.current,r),null==s||s(r))},className:c},o)}function h(e){var t=e.collapsed,n=(0,o.Z)(e,s),i=(0,a.useState)(!t),c=i[0],l=i[1],u=(0,a.useState)(t),d=u[0],p=u[1];return(0,a.useLayoutEffect)((function(){t||l(!0)}),[t]),(0,a.useLayoutEffect)((function(){c&&p(t)}),[c,t]),c?a.createElement(g,(0,r.Z)({},n,{collapsed:d})):null}function v(e){var t=e.lazy,n=(0,o.Z)(e,c),r=t?h:g;return a.createElement(r,n)}},9689:function(e,t,n){"use strict";n.d(t,{nT:function(){return m},pl:function(){return f}});var r=n(7294),o=n(2389),a=n(12),i=n(9688),s=n(6668),c=(0,a.WA)("docusaurus.announcement.dismiss"),l=(0,a.WA)("docusaurus.announcement.id"),u=function(){return"true"===c.get()},d=function(e){return c.set(String(e))},p=r.createContext(null);function f(e){var t=e.children,n=function(){var e=(0,s.L)().announcementBar,t=(0,o.Z)(),n=(0,r.useState)((function(){return!!t&&u()})),a=n[0],i=n[1];(0,r.useEffect)((function(){i(u())}),[]);var c=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=l.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;l.set(t),r&&d(!1),!r&&u()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!a,close:c}}),[e,a,c])}();return r.createElement(p.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(p);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:function(e,t,n){"use strict";n.d(t,{I:function(){return h},S:function(){return g}});var r=n(7294),o=n(412),a=n(9688),i=n(12),s=n(6668),c=r.createContext(void 0),l="theme",u=(0,i.WA)(l),d="light",p="dark",f=function(e){return e===p?p:d};function m(){var e=(0,s.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,i=(0,r.useState)(function(e){return o.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)}(t)),c=i[0],m=i[1];(0,r.useEffect)((function(){n&&u.del()}),[n]);var g=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(m(e),o&&function(e){u.set(f(e))}(e)):(m(a?window.matchMedia("(prefers-color-scheme: dark)").matches?p:d:t),u.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(c))}),[c]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===l){var t=u.get();null!==t&&g(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,g]);var h=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||h.current?h.current=window.matchMedia("print").matches:g(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[g,n,a]),(0,r.useMemo)((function(){return{colorMode:c,setColorMode:g,get isDarkTheme(){return c===p},setLightTheme:function(){g(d)},setDarkTheme:function(){g(p)}}}),[c,g])}function g(e){var t=e.children,n=m();return r.createElement(c.Provider,{value:n},t)}function h(){var e=(0,r.useContext)(c);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:function(e,t,n){"use strict";n.d(t,{J:function(){return y},L5:function(){return v},Oh:function(){return w}});var r=n(7294),o=n(143),a=n(9935),i=n(6668),s=n(8425),c=n(9688),l=n(12),u=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,l.WA)(u(e),{persistence:t}).set(n)},p=function(e,t){return(0,l.WA)(u(e),{persistence:t}).get()},f=function(e,t){(0,l.WA)(u(e),{persistence:t}).del()};var m=r.createContext(null);function g(){var e=(0,o._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),a=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),s=a[0],c=a[1];return(0,r.useEffect)((function(){c(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,o=p(t,n),r[t].versions.some((function(e){return e.name===o}))?{preferredVersionName:o}:(f(t,n),{preferredVersionName:null}))];var t,o})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),c((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function h(e){var t=e.children,n=g();return r.createElement(m.Provider,{value:n},t)}function v(e){var t=e.children;return s.cE?r.createElement(h,null,t):r.createElement(r.Fragment,null,t)}function b(){var e=(0,r.useContext)(m);if(!e)throw new c.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=a.m);var n=(0,o.zh)(e),i=b(),s=i[0],c=i[1],l=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===l})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){c.savePreferredVersion(e,t)}),[c,e])}}function w(){var e=(0,o._r)(),t=b()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,a=e[r],i=t[r].preferredVersionName,null!=(o=a.versions.find((function(e){return e.name===i})))?o:null)];var r,o,a,i})))}},1116:function(e,t,n){"use strict";n.d(t,{V:function(){return c},b:function(){return s}});var r=n(7294),o=n(9688),a=Symbol("EmptyContext"),i=r.createContext(a);function s(e){var t=e.children,n=e.name,o=e.items,a=(0,r.useMemo)((function(){return n&&o?{name:n,items:o}:null}),[n,o]);return r.createElement(i.Provider,{value:a},t)}function c(){var e=(0,r.useContext)(i);if(e===a)throw new o.i6("DocsSidebarProvider");return e}},2961:function(e,t,n){"use strict";n.d(t,{M:function(){return p},e:function(){return f}});var r=n(7294),o=n(3102),a=n(7524),i=n(6550),s=(n(1688),n(9688));function c(e){!function(e){var t=(0,i.k6)(),n=(0,s.zX)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var l=n(6668),u=r.createContext(void 0);function d(){var e,t=(e=(0,o.HY)(),0===(0,l.L)().navbar.items.length&&!e.component),n=(0,a.i)(),i=!t&&"mobile"===n,s=(0,r.useState)(!1),u=s[0],d=s[1];c((function(){if(u)return d(!1),!1}));var p=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:i,toggle:p,shown:u}}),[t,i,p,u])}function p(e){var t=e.children,n=d();return r.createElement(u.Provider,{value:n},t)}function f(){var e=r.useContext(u);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},3102:function(e,t,n){"use strict";n.d(t,{HY:function(){return s},Zo:function(){return c},n2:function(){return i}});var r=n(7294),o=n(9688),a=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(a.Provider,{value:n},t)}function s(){var e=(0,r.useContext)(a);if(!e)throw new o.i6("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){var t=e.component,n=e.props,i=(0,r.useContext)(a);if(!i)throw new o.i6("NavbarSecondaryMenuContentProvider");var s=i[1],c=(0,o.Ql)(n);return(0,r.useEffect)((function(){s({component:t,props:c})}),[s,t,c]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},9727:function(e,t,n){"use strict";n.d(t,{h:function(){return o},t:function(){return a}});var r=n(7294),o="navigation-with-keyboard";function a(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},6177:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var r=n(7294),o=n(6550),a=n(2263),i="q";function s(){var e=(0,o.k6)(),t=(0,a.Z)().siteConfig,n=t.baseUrl,s=t.themeConfig.algolia.searchPagePath,c=(0,r.useState)(""),l=c[0],u=c[1];return(0,r.useEffect)((function(){var e,t=null!=(e=new URLSearchParams(window.location.search).get(i))?e:"";u(t)}),[]),{searchQuery:l,setSearchQuery:(0,r.useCallback)((function(t){var n=new URLSearchParams(window.location.search);t?n.set(i,t):n.delete(i),e.replace({search:n.toString()}),u(t)}),[e]),generateSearchPageLink:(0,r.useCallback)((function(e){return""+n+s+"?"+"q="+encodeURIComponent(e)}),[n,s])}}},7524:function(e,t,n){"use strict";n.d(t,{i:function(){return l}});var r=n(7294),o=n(412),a="desktop",i="mobile",s="ssr";function c(){return o.Z.canUseDOM?window.innerWidth>996?a:i:s}function l(){var e=(0,r.useState)((function(){return c()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(c())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},5281:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},8425:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Wl:function(){return m},_F:function(){return h},cE:function(){return f},hI:function(){return x},lO:function(){return y},vY:function(){return k},oz:function(){return w},s1:function(){return b}});var a=n(7294),i=n(6550),s=n(8790),c=n(143),l=n(373),u=n(1116);function d(e){return Array.from(new Set(e))}var p=n(8596),f=!!c._r;function m(e){if(e.href)return e.href;for(var t,n=o(e.items);!(t=n()).done;){var r=t.value;if("link"===r.type)return r.href;if("category"===r.type){var a=m(r);if(a)return a}}}var g=function(e,t){return void 0!==e&&(0,p.Mg)(e,t)};function h(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||function(e,t){return e.some((function(e){return h(e,t)}))}(e.items,t))}function v(e){var t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,a=void 0!==r&&r,i=[];return function e(t){for(var r,s=o(t);!(r=s()).done;){var c=r.value;if("category"===c.type&&((0,p.Mg)(c.href,n)||e(c.items))||"link"===c.type&&(0,p.Mg)(c.href,n))return a&&"category"!==c.type||i.unshift(c),!0}return!1}(t),i}function b(){var e,t=(0,u.V)(),n=(0,i.TH)().pathname;return!1!==(null==(e=(0,c.gA)())?void 0:e.pluginData.breadcrumbs)&&t?v({sidebarItems:t.items,pathname:n}):null}function y(e){var t=(0,c.Iw)(e).activeVersion,n=(0,l.J)(e).preferredVersion,r=(0,c.yW)(e);return(0,a.useMemo)((function(){return d([t,n,r].filter(Boolean))}),[t,n,r])}function w(e,t){var n=y(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\n Available sidebar ids are:\n - '+Object.keys(t).join("\n- "));return r[1]}),[e,n])}function k(e,t){var n=y(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("DocNavbarItem: couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+d(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function x(e){var t=e.route,n=e.versionMetadata,r=(0,i.TH)(),o=t.routes,a=o.find((function(e){return(0,i.LX)(r.pathname,e)}));if(!a)return null;var c=a.sidebar,l=c?n.docsSidebars[c]:void 0;return{docElement:(0,s.H)(o),sidebarName:c,sidebarItems:l}}},2128:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(2263);function o(e){var t=(0,r.Z)().siteConfig,n=t.title,o=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+o+" "+n:n}},833:function(e,t,n){"use strict";n.d(t,{FG:function(){return p},d:function(){return u},VC:function(){return f}});var r=n(7294),o=n(6010),a=n(5742),i=n(226);function s(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var c=n(4996),l=n(2128);function u(e){var t=e.title,n=e.description,o=e.keywords,i=e.image,s=e.children,u=(0,l.p)(t),d=(0,c.C)().withBaseUrl,p=i?d(i,{absolute:!0}):void 0;return r.createElement(a.Z,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),o&&r.createElement("meta",{name:"keywords",content:Array.isArray(o)?o.join(","):o}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),s)}var d=r.createContext(void 0);function p(e){var t=e.className,n=e.children,i=r.useContext(d),s=(0,o.Z)(i,t);return r.createElement(d.Provider,{value:s},r.createElement(a.Z,null,r.createElement("html",{className:s})),n)}function f(e){var t=e.children,n=s(),a="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(p,{className:(0,o.Z)(a,i)},t)}},9688:function(e,t,n){"use strict";n.d(t,{i6:function(){return m},Qc:function(){return h},zX:function(){return p},D9:function(){return f},Ql:function(){return g}});var r=n(6528),o=n(4578);function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var i=n(9611);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,n){return c=s()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,i.Z)(o,n.prototype),o},c.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return c(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},l(e)}var u=n(7294),d=n(412).Z.canUseDOM?u.useLayoutEffect:u.useEffect;function p(e){var t=(0,u.useRef)(e);return d((function(){t.current=e}),[e]),(0,u.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,u.useRef)();return d((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var o,a,i,s,c;return(c=e.call(this)||this).name="ReactContextError",c.message="Hook "+(null!=(o=null==(a=c.stack)||null==(i=a.split("\n")[1])||null==(s=i.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:s.groups.name)?o:"")+" is called outside the <"+t+">. "+(null!=n?n:""),c}return(0,o.Z)(t,e),t}(l(Error));function g(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,u.useMemo)((function(){return e}),t.flat())}function h(e){return function(t){var n=t.children;return u.createElement(u.Fragment,null,e.reduceRight((function(e,t){return u.createElement(t,null,e)}),n))}}},8022:function(e,t,n){"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:function(){return r}})},8596:function(e,t,n){"use strict";n.d(t,{Mg:function(){return i},Ns:function(){return s}});var r=n(7294),o=n(723),a=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,a.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:o.Z,baseUrl:e})}),[e])}},2466:function(e,t,n){"use strict";n.d(t,{Ct:function(){return p},OC:function(){return c},RF:function(){return d}});var r=n(7294),o=n(412),a=n(2389),i=n(9688);var s=r.createContext(void 0);function c(e){var t,n=e.children,o=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(s.Provider,{value:o},n)}function l(){var e=(0,r.useContext)(s);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var u=function(){return o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=l().scrollEventsEnabledRef,o=(0,r.useRef)(u()),a=(0,i.zX)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=u();a(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[a,n].concat(t))}function p(){var e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var o=document.documentElement.scrollTop;(n&&o>e||!n&&o=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!l)for(;d--;d)i.unshift("..");!l||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var c=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=s(t),o=s(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},l=n(8776);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function f(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function g(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.Z)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&c(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=g(e,t,p(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),l=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(l,i(e,u,d)),1===e?(c(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){c(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),l=document.querySelector(r.parent);return c(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,a){for(var i,s,c=o(e),l=1;l=d.reach);E+=x.value.length,x=x.next){var S=x.value;if(t.length>e.length)return;if(!(S instanceof o)){var _,T=1;if(b){if(!(_=a(k,E,e,v))||_.index>=e.length)break;var C=_.index,L=_.index+_[0].length,A=E;for(A+=x.value.length;C>=A;)A+=(x=x.next).value.length;if(E=A-=x.value.length,x.value instanceof o)continue;for(var P=x;P!==t.tail&&(Ad.reach&&(d.reach=I);var N=x.prev;if(j&&(N=c(t,N,j),E+=j.length),l(t,N,T),x=c(t,N,new o(p,h?r.tokenize(R,h):R,y,R)),O&&c(t,x,O),T>1){var D={cause:p+","+m,reach:I};i(e,t,n,x.prev,E,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function l(e,t,n){for(var r=t.next,o=0;o"+a.content+""},r}(),r=n;n.default=n,r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:n}};o["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.c=r.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),r.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),r.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},r.languages.c.string],char:r.languages.c.char,comment:r.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:r.languages.c}}}}),r.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete r.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(r),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(r),r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(r),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(r),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(r),r.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:r.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},r.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=p(/^\{$/,/^\}$/);if(-1===s)continue;for(var c=n;c=0&&f(l,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function c(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function l(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,c(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function u(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,u={},d=c(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=s(i++,r)););return u[n]=o,n})).join(""),n,r),p=Object.keys(u);return i=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[i],a="string"==typeof r?r:r.content,s=a.indexOf(o);if(-1!==s){++i;var c=a.substring(0,s),d=l(u[o]),f=a.substring(s+o.length),m=[];if(c&&m.push(c),m.push(d),f){var g=[f];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(r),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},s=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var c=i(o);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(c=i(t[r-1])+c,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",c,null,c)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(r),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(r),r.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},r.languages.go=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),r.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete r.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(s){for(var c=0;c=a.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof l?l:l.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++o;var g=p.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=p.substring(m+f.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),v&&b.push.apply(b,i([v])),"string"==typeof l?s.splice.apply(s,[c,1].concat(b)):l.content=b}}else l.content&&i(l.content)}return s}(n.tokens)}}}})}(r),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(r),r.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},r.languages.webmanifest=r.languages.json,r.languages.less=r.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),r.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),r.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},r.languages.objectivec=r.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete r.languages.objectivec["class-name"],r.languages.objc=r.languages.objectivec,r.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,r.languages.reason=r.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),r.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete r.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(r),r.languages.scss=r.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),r.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),r.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),r.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),r.languages.scss.atrule.inside.rest=r.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(r),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(r),r.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},t.Z=r},9901:function(e){e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:function(e,t,n){const r=n(9901),o=n(9642),a=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];o(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(6500).resolve(t)],delete Prism.languages[e],n(6500)(t),a.add(e)}))}i.silent=!1,e.exports=i},6726:function(e,t,n){var r={"./":2885};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=6726},6500:function(e,t,n){var r={"./":2885};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=6500},9642:function(e){"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var s={},c=e[r];if(c){function l(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in s))for(var i in o(t,a),s[t]=!0,n[t])s[i]=!0}t(c.require,l),t(c.optional,l),t(c.modify,l)}n[r]=s,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,i,s){var c=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),l=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(c);i=i.map(l),s=(s||[]).map(l);var u=n(i),d=n(s);i.forEach((function e(n){var r=c[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var p,f=r(c),m=u;o(m);){for(var g in p={},m){var h=c[g];t(h&&h.modify,(function(e){e in d&&(p[e]=!0)}))}for(var v in d)if(!(v in u))for(var b in f(v))if(b in u){p[v]=!0;break}for(var y in m=p)u[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,i=o?o.parallel:e,s={},c={};function l(e){if(e in s)return s[e];c[e]=!0;var o,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)o=r(e);else{var p=i(u.map((function(e){var t=l(e);return delete c[e],t})));a?o=a(p,(function(){return r(e)})):r(e)}return s[e]=o}for(var u in n)l(u);var d=[];for(var p in c)d.push(s[p]);return i(d)}(f,u,t,n)}};return w}}();e.exports=t},2703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:function(e,t,n){"use strict";var r=n(7294),o=n(7418),a=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n