1(globalThis.rspackChunkwebsite||=[]).push([[17526],{61357(e,t){function n(e){let t,n=[];for(let r of e.split(",").map(e=>e.trim()))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,s,a]=t;if(r&&a){let e=(r=parseInt(r))<(a=parseInt(a))?1:-1;("-"===s||".."===s||"\u2025"===s)&&(a+=e);for(let t=r;t!==a;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},82967(e,t,n){"use strict";n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>d,default:()=>f,frontMatter:()=>u,metadata:()=>r,toc:()=>g});var r=JSON.parse('{"id":"api/plugins/plugin-google-gtag","title":"\u{1F4E6} plugin-google-gtag","description":"The default Global Site Tag (gtag.js) plugin. It is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform. This section describes how to configure a Docusaurus site to enable global site tag for Google Analytics.","source":"@site/versioned_docs/version-3.0.1/api/plugins/plugin-google-gtag.mdx","sourceDirName":"api/plugins","slug":"/api/plugins/@docusaurus/plugin-google-gtag","permalink":"/docs/3.0.1/api/plugins/@docusaurus/plugin-google-gtag","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/docs/api/plugins/plugin-google-gtag.mdx","tags":[],"version":"3.0.1","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1772830092000,"sidebarPosition":7,"frontMatter":{"sidebar_position":7,"slug":"/api/plugins/@docusaurus/plugin-google-gtag"},"sidebar":"api","previous":{"title":"\u{1F4E6} plugin-google-analytics","permalink":"/docs/3.0.1/api/plugins/@docusaurus/plugin-google-analytics"},"next":{"title":"\u{1F4E6} plugin-google-tag-manager","permalink":"/docs/3.0.1/api/plugins/@docusaurus/plugin-google-tag-manager"}}'),s=n(61058),a=n(24801),l=n(65855),o=n(49714),i=n(65665),c=n(9929);let u={sidebar_position:7,slug:"/api/plugins/@docusaurus/plugin-google-gtag"},d="\u{1F4E6} plugin-google-gtag",h={},g=[{value:"Installation",id:"installation",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Example configuration",id:"ex-config",level:3}];function p(e){let t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"-plugin-google-gtag",children:"\u{1F4E6} plugin-google-gtag"})}),"\n","\n",(0,s.jsxs)(t.p,{children:["The default ",(0,s.jsx)(t.a,{href:"https://developers.google.com/tag-platform/gtagjs",children:"Global Site Tag (gtag.js)"})," plugin. It is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform. This section describes how to configure a Docusaurus site to enable global site tag for Google Analytics."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["You can use ",(0,s.jsx)(t.a,{href:"https://tagassistant.google.com/",children:"Google's Tag Assistant"})," tool to check if your gtag is set up correctly!"]})}),"\n",(0,s.jsx)(t.admonition,{title:"production only",type:"warning",children:(0,s.jsxs)(t.p,{children:["This plugin is always inactive in development and ",(0,s.jsx)(t.strong,{children:"only active in production"})," to avoid polluting the analytics statistics."]})}),"\n",(0,s.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,s.jsxs)(l.A,{groupId:"npm2yarn",children:[(0,s.jsx)(o.A,{value:"npm",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"npm install --save @docusaurus/plugin-google-gtag\n"})})}),(0,s.jsx)(o.A,{value:"yarn",label:"Yarn",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"yarn add @docusaurus/plugin-google-gtag\n"})})}),(0,s.jsx)(o.A,{value:"pnpm",label:"pnpm",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"pnpm add @docusaurus/plugin-google-gtag\n"})})}),(0,s.jsx)(o.A,{value:"bun",label:"Bun",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"bun add @docusaurus/plugin-google-gtag\n"})})})]}),"\n",(0,s.jsxs)(t.admonition,{type:"tip",children:[(0,s.jsxs)(t.p,{children:["If you use the preset ",(0,s.jsx)(t.code,{children:"@docusaurus/preset-classic"}),", you don't need to install this plugin as a dependency."]}),(0,s.jsxs)(t.p,{children:["You can configure this plugin through the ",(0,s.jsx)(t.a,{href:"/docs/3.0.1/using-plugins#docusauruspreset-classic",children:"preset options"}),"."]})]}),"\n",(0,s.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsx)(t.p,{children:"Accepted fields:"}),"\n",(0,s.jsx)(i.A,{children:(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Default"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"trackingID"})}),(0,s.jsx)(t.td,{children:(0,s.jsx)("code",{children:"string | string[]"})}),(0,s.jsx)(t.td,{children:(0,s.jsx)(t.strong,{children:"Required"})}),(0,s.jsx)(t.td,{children:"The tracking ID of your gtag service. It is possible to provide multiple ids."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"anonymizeIP"})}),(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"boolean"})}),(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"false"})}),(0,s.jsx)(t.td,{children:"Whether the IP should be anonymized when sending requests."})]})]})]})}),"\n",(0,s.jsx)(t.h3,{id:"ex-config",children:"Example configuration"}),"\n",(0,s.jsx)(t.p,{children:"You can configure this plugin through preset options or plugin options."}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsx)(t.p,{children:"Most Docusaurus users configure this plugin through the preset options."})}),"\n","\n",(0,s.jsx)(c.A,{pluginName:"@docusaurus/plugin-google-gtag",presetOptionName:"gtag",code:"{\n trackingID: 'G-999X9XX9XX',\n anonymizeIP: true,\n}"})]})}function f(e={}){let{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}}
1,49714(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(61058),s=n(23372),a=n(25237);function l({children:e,className:t,hidden:n}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)("tabItem_pnkT",t),hidden:n,children:e})}function o({children:e,className:t,value:n}){let{selectedValue:s,lazy:i}=(0,a.uc)(),c=n===s;return!c&&i?null:(0,r.jsx)(l,{className:t,hidden:!c,children:e})}},65855(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(61058),s=n(23372),a=n(2445),l=n(25237),o=n(70662),i=n(73749);function c({className:e}){let{selectedValue:t,selectValue:n,tabValues:a,block:i}=(0,l.uc)(),u=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.a_)(),h=e=>{let r=e.currentTarget,s=a[u.indexOf(r)].value;s!==t&&(d(r),n(s))},g=e=>{let t=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{let n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{let n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1]}}t?.focus()};return(0,r.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":i},e),children:a.map(({value:e,label:n,attributes:a})=>(0,r.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{u.push(e)},onKeyDown:g,onClick:h,...a,className:(0,s.A)("tabs__item","tabItem_AQgk",a?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function u({children:e}){return(0,r.jsx)("div",{className:"margin-top--md",children:e})}function d({className:e,children:t}){return(0,r.jsxs)("div",{className:(0,s.A)(a.G.tabs.container,"tabs-container","tabList_Qoir"),children:[(0,r.jsx)(c,{className:e}),(0,r.jsx)(u,{children:t})]})}function h(e){let t=(0,i.A)(),n=(0,l.OC)(e);return(0,r.jsx)(l.O_,{value:n,children:(0,r.jsx)(d,{className:e.className,children:(0,l.vT)(e.children)})},String(t))}},64196(e,t,n){"use strict";var r=n(74531),s=n(2844);function a(){let{prism:e}=(0,s.p)(),{colorMode:t}=(0,r.G)(),n=e.theme,a=e.darkTheme||n;return"dark"===t?a:n}n.d(t,{A:()=>a})},25237(e,t,n){"use strict";n.d(t,{OC:()=>d,O_:()=>p,uc:()=>g,vT:()=>c});var r=n(61058),s=n(13706),a=n(90577),l=n(27611),o=n(78328),i=n(87116);function c(e){return s.Children.toArray(e).filter(e=>"\n"!==e)}function u({value:e,tabValues:t}){return t.some(t=>t.value===e)}function d(e){let t,{defaultValue:n,queryString:r=!1,groupId:c}=e,d=function(e){let{values:t,children:n}=e;return(0,s.useMemo)(()=>{let e=t??s.Children.toArray(n).flatMap(e=>{if(!e)return[];if((0,s.isValidElement)(e)&&function(e){let{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return[e];let t="string"==typeof e.type?e.type:e.type.name;throw Error(`Docusaurus error: Bad <Tabs> child <${t}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop. 2If you do not want to pass on a "value" prop to the direct children of <Tabs>, you can also pass an explicit <Tabs values={...}> prop.`)}).map(({props:{value:e,label:t,attributes:n,default:r}})=>({value:e,label:t,attributes:n,default:r})),r=(0,o.XI)(e,(e,t)=>e.value===t.value);if(r.length>0)throw Error(`Docusaurus error: Duplicate values "${r.map(e=>`'${e.value}'`).join(", ")}" found in <Tabs>. Every value needs to be unique.`);return e},[t,n])}(e),[h,g]=(0,s.useState)(()=>(function({defaultValue:e,tabValues:t}){if(0===t.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!u({value:e,tabValues:t}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}let n=t.find(e=>e.default)??t[0];if(!n)throw Error("Unexpected error: 0 tabValues");return n.value})({defaultValue:n,tabValues:d})),[p,f]=function({queryString:e=!1,groupId:t}){let n=(0,a.W6)(),r=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,l.aZ)(r),(0,s.useCallback)(e=>{if(!r)return;let t=new URLSearchParams(n.location.search);t.set(r,e),n.replace({...n.location,search:t.toString()})},[r,n])]}({queryString:r,groupId:c}),[m,x]=function({groupId:e}){let t=e?`docusaurus.tab.${e}`:null,[n,r]=(0,i.Dv)(t);return[n,(0,s.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:c}),b=u({value:t=p??m,tabValues:d})?t:null;return(0,s.useLayoutEffect)(()=>{b&&g(b)},[b]),{selectedValue:h,selectValue:(0,s.useCallback)(e=>{if(!u({value:e,tabValues:d}))throw Error(`Can't select invalid tab value=${e}`);g(e),f(e),x(e)},[f,x,d]),tabValues:d,lazy:e.lazy??!1,block:e.block??!1}}let h=(0,s.createContext)(null);function g(){let e=s.useContext(h);if(!e)throw Error("useTabsContext() must be used within a Tabs component");return e}function p(e){return(0,r.jsx)(h,{value:e.value,children:e.children})}},41376(e,t,n){"use strict";n.d(t,{A:()=>B});var r=n(61058),s=n(13706),a=n(82674);let l=(0,s.createContext)(null);function o({value:e,children:t}){return(0,r.jsx)(l,{value:e,children:t})}var i=n(64196);let c=e=>`${e};`;function u({code:e,children:t,...n}){let s=(0,i.A)(),l=n.metastring?.includes("noInline")??!1;
2return(0,r.jsx)(a.Q,{noInline:l,theme:s,...n,code:e?.replace(/\n$/,""),transformCode:n.transformCode??c,children:t})}function d(e){let[t,n]=(0,s.useState)(0),a=(0,s.useCallback)(()=>n(e=>e+1),[]),l=(0,s.useMemo)(()=>({reset:a}),[a]);return(0,r.jsx)(o,{value:l,children:(0,r.jsx)(u,{...e})},t)}function h({children:e}){return(0,r.jsx)("div",{className:"playgroundContainer_TDLX",children:e})}var g=n(2844),p=n(35648),f=n(30895),m=n(49466),x=n(57208),b=n(23372);function j({children:e,buttons:t}){return(0,r.jsxs)("div",{className:(0,b.A)("playgroundHeader_h_Hu"),children:[(0,r.jsx)("div",{className:"playgroundHeaderContent_epzO",children:e}),t&&(0,r.jsx)("div",{className:"playgroundHeaderButtons_RTSm",children:t})]})}function v(){return(0,r.jsx)("div",{children:"Loading..."})}function y(){return(0,r.jsx)(p.A,{fallback:(0,r.jsx)(v,{}),children:()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.A,{fallback:e=>(0,r.jsx)(f.MN,{...e}),children:(0,r.jsx)(a.pA,{})}),(0,r.jsx)(a.p1,{})]})})}function A(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{children:(0,r.jsx)(x.A,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,r.jsx)("div",{className:"playgroundPreview_u2xE",children:(0,r.jsx)(y,{})})]})}var k=n(73749);function w(){return(0,r.jsxs)("svg",{className:"resetButtonIcon_B9AZ",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"}),(0,r.jsx)("path",{d:"M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z"})]})}function N(){return(0,r.jsx)(x.A,{id:"theme.Playground.buttons.reset",description:"The reset button label for live code blocks",children:"Reset"})}function C({className:e}){let{reset:t}=function(){let e=(0,s.useContext)(l);if(!e)throw Error("usePlayground must be used within PlaygroundProvider");return e}();return(0,r.jsxs)("button",{type:"button","aria-label":"Reset code to original",title:"Reset",className:(0,b.A)("clean-btn",e,"resetButton_gKmz"),onClick:()=>t(),children:[(0,r.jsx)(w,{}),(0,r.jsx)(N,{})]})}function T(){let e=(0,k.A)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{buttons:(0,r.jsx)(C,{}),children:(0,r.jsx)(x.A,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,r.jsx)(a.w,{className:"playgroundEditor_uqZ4"},String(e))]})}function I(e){let t=(0,g.p)().liveCodeBlock,n=e.position??t.playgroundPosition;return(0,r.jsx)(r.Fragment,{children:"top"===n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A,{}),(0,r.jsx)(T,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T,{}),(0,r.jsx)(A,{})]})})}function B({children:e,transformCode:t,position:n,...s}){return(0,r.jsx)(h,{children:(0,r.jsx)(d,{code:e,...s,children:(0,r.jsx)(I,{position:n})})})}},35648(e,t,n){"use strict";var r=n(61058),s=n(13706),a=n(18859);function l({children:e}){return(0,s.use)((0,a.browser)()),(0,r.jsx)(r.Fragment,{children:e?.()})}function o({children:e,fallback:t}){return(0,r.jsx)(s.Suspense,{fallback:t??null,children:(0,r.jsx)(l,{children:e})})}n.d(t,{A:()=>o})},65665(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(61058),s=n(13706),a=n(50547),l=n(90577);function o({name:e,children:t,ref:n}){let i=function(e){let t=e;for(;(0,s.isValidElement)(t);)[t]=s.Children.toArray(t.props.children);if("string"!=typeof t)throw Error(`Could not extract APITable row name from JSX tree: 3${JSON.stringify(e,null,2)}`);return t}(t),c=e?`${e}-${i}`:i,u=`#${c}`,d=(0,l.W6)();return(0,a.A)().collectAnchor(c),(0,r.jsx)("tr",{id:c,tabIndex:0,ref:d.location.hash===u?n:void 0,onClick:e=>{let t="TD"===e.target.tagName.toUpperCase(),n=!!window.getSelection()?.toString();t&&!n&&d.push(u)},onKeyDown:e=>{"Enter"===e.key&&d.push(u)},children:t.props.children})}function i({children:e,name:t}){if("table"!==e.type)throw Error("Bad usage of APITable component.\nIt is probably that your Markdown table is malformed.\nMake sure to double-check you have the appropriate number of columns for each table row.");let[n,a]=s.Children.toArray(e.props.children),l=(0,s.useRef)(null);(0,s.useEffect)(()=>{l.current?.focus()},[l]);let c=s.Children.map(a.props.children,e=>(0,r.jsx)(o,{name:t,ref:l,children:e}));return(0,r.jsxs)("table",{className:"apiTable_e8hp",children:[n,(0,r.jsx)("tbody",{children:c})]})}},9929(e,t,n){"use strict";let r;var s=n(61058),a=n(96212),l=n(73333),o=n(57208),i=n(65855),c=n(49714),u=n(35168);function d({code:e,pluginName:t,presetOptionName:n}){let h=(0,l.ir)(r).path;return(0,s.jsxs)(i.A,{groupId:"api-config-ex",children:[(0,s.jsxs)(c.A,{value:"preset",label:(0,o.T)({message:"Preset options"}),children:[(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"apiDocs.configTabs.presetOptions.description",values:{presetLink:(0,s.jsx)(a.A,{to:`${h}/using-plugins#docusauruspreset-classic`,children:(0,s.jsx)(o.A,{children:"preset options"})})},children:"If you use a preset, configure this plugin through the {presetLink}:"})}),(0,s.jsx)(u.A,{language:"js",title:"docusaurus.config.js",children:`module.exports = { 4 presets: [ 5 [ 6 '@docusaurus/preset-classic', 7 { 8 // highlight-start 9 ${n}: ${e.replace(/\n/g,"\n ")}, 10 // highlight-end 11 }, 12 ], 13 ], 14};`})]}),(0,s.jsxs)(c.A,{value:"plugin",label:(0,o.T)({message:"Plugin options"}),children:[(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{children:"If you are using a standalone plugin, provide options directly to the plugin:"})}),(0,s.jsx)(u.A,{language:"js",title:"docusaurus.config.js",children:`module.exports = { 15 plugins: [ 16 [ 17 '${t}', 18 // highlight-start 19 ${e.replace(/\n/g,"\n ")}, 20 // highlight-end 21 ], 22 ], 23};`})]})]})}n.d(t,{A:()=>d})},35168(e,t,n){"use strict";n.d(t,{A:()=>ee});var r={};n.r(r),n.d(r,{ButtonExample:()=>Y});var s=n(61058),a=n(13706),l=n(73749),o=n(23372),i=n(64196),c=n(2445),u=n(61357),d=n.n(u),h=n(11414);let g=/title=(?<quote>["'])(?<title>.*?)\1/,p=/\{(?<range>[\d,-]+)\}/,f={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},m={...f,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},x=Object.keys(f);function b(e,t){let n=e.map(e=>{let{start:n,end:r}=m[e];return`(?:${n}\\s*(${t.flatMap(e=>
23[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${n})\\s*$`)}let j=(0,a.createContext)(null);function v({metadata:e,wordWrap:t,children:n}){let r=(0,a.useMemo)(()=>({metadata:e,wordWrap:t}),[e,t]);return(0,s.jsx)(j,{value:r,children:n})}function y(){let e=(0,a.useContext)(j);if(null===e)throw new h.dV("CodeBlockContextProvider");return e}function A({as:e,...t}){let n,r,a=(n={color:"--prism-color",backgroundColor:"--prism-background-color"},r={},Object.entries((0,i.A)().plain).forEach(([e,t])=>{let s=n[e];s&&"string"==typeof t&&(r[s]=t)}),r);return(0,s.jsx)(e,{...t,style:a,className:(0,o.A)(t.className,"codeBlockContainer_jDV4",c.G.common.codeBlock)})}let k="codeBlockLines_FJaf";function w({children:e,className:t}){return(0,s.jsx)(A,{as:"pre",tabIndex:0,className:(0,o.A)("codeBlockStandalone_i_cY","thin-scrollbar",t),children:(0,s.jsx)("code",{className:k,children:e})})}var N=n(2844);let C={attributes:!0,characterData:!0,childList:!0,subtree:!0};function T({children:e}){return e}var I=n(52324);function B({line:e,token:t,...n}){return(0,s.jsx)("span",{...n})}function E(){return(0,s.jsx)("br",{})}function _({line:e,classNames:t,showLineNumbers:n,getLineProps:r,getTokenProps:a}){let l,i=(l=1===e.length&&"\n"===e[0].content?e[0]:void 0)?[{...l,content:""}]:e,c=r({line:i,className:(0,o.A)(t,n&&"codeLine_qRmp")}),u=i.map((e,t)=>{let n=a({token:e});return(0,s.jsx)(B,{...n,line:i,token:e,children:n.children},t)});return(0,s.jsxs)("div",{...c,children:[n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"codeLineNumber_dS_J"}),(0,s.jsx)("span",{className:"codeLineContent_XF5l",children:u})]}):u,(0,s.jsx)(E,{})]})}function L({className:e,ref:t,...n}){return(0,s.jsx)("pre",{ref:t,tabIndex:0,...n,className:(0,o.A)(e,"codeBlock_Gebt","thin-scrollbar")})}function S(e){let{metadata:t}=y();return(0,s.jsx)("code",{...e,className:(0,o.A)(e.className,k,void 0!==t.lineNumbersStart&&"codeBlockLinesWithNumbering_FU9Q"),style:{...e.style,counterReset:void 0===t.lineNumbersStart?void 0:`line-count ${t.lineNumbersStart-1}`}})}function $({className:e}){let{metadata:t,wordWrap:n}=y(),r=(0,i.A)(),{code:a,language:l,lineNumbersStart:c,lineClassNames:u}=t;return(0,s.jsx)(I.f4,{theme:r,code:a,language:l,children:({className:t,style:r,tokens:a,getLineProps:l,getTokenProps:i})=>(0,s.jsx)(L,{ref:n.codeBlockRef,className:(0,o.A)(e,t),style:r,children:(0,s.jsx)(S,{children:a.map((e,t)=>(0,s.jsx)(_,{line:e,getLineProps:l,getTokenProps:i,classNames:u[t],showLineNumbers:void 0!==c},t))})})})}var D=n(35648),M=n(57208);function P({className:e,...t}){return(0,s.jsx)("button",{type:"button",...t,className:(0,o.A)("clean-btn",e)})}function R(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function O(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}let G={copyButtonCopied:"copyButtonCopied_wDuR",copyButtonIcons:"copyButtonIcons_gMWc",copyButtonIcon:"copyButtonIcon_GXfb",copyButtonSuccessIcon:"copyButtonSuccessIcon_ktUX"};async function V(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);let{default:t}=await n.e(10272).then(n.bind(n,89347));return t(e)}function q({className:e}){let{copyCode:t,isCopied:n}=function(){let{metadata:{code:e}}=y(),[t,n]=(0,a.useState)(!1),r=(0,a.useRef)(void 0),s=(0,a.useCallback)(()=>{V(e).then(()=>{n(!0),r.current=window.setTimeout(()=>{n(!1)},1e3)})},[e]);return(0,a.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:s,isCopied:t}}();return(0,s.jsx)(P,{"aria-label":n?(0,M.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,M.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,M.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,o.A)(e,G.copyButton,n&&G.copyButtonCopied),onClick:t,children:(0,s.jsxs)("span",{className:G.copyButtonIcons,"aria-hidden":"true",children:[(0,s.jsx)(R,{className:G.copyButtonIcon}),(0,s.jsx)(O,{className:G.copyButtonSuccessIcon})]})})}function z(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}function H({className:e}){let{wordWrap:t}=y();if(!(t.isEnabled||t.isCodeScrollable))return!1;let n=(0,M.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,s.jsx)(P,{onClick:()=>
23t.toggle(),className:(0,o.A)(e,t.isEnabled&&"wordWrapButtonEnabled_nam_"),"aria-label":n,title:n,children:(0,s.jsx)(z,{className:"wordWrapButtonIcon___5r","aria-hidden":"true"})})}function F({className:e}){return(0,s.jsx)(D.A,{children:()=>(0,s.jsxs)("div",{className:(0,o.A)(e,"buttonGroup_KXnS"),children:[(0,s.jsx)(H,{}),(0,s.jsx)(q,{})]})})}function W({className:e}){let{metadata:t}=y();return(0,s.jsxs)(A,{as:"div",className:(0,o.A)(e,t.className),children:[t.title&&(0,s.jsx)("div",{className:"codeBlockTitle_U6Q0",children:(0,s.jsx)(T,{children:t.title})}),(0,s.jsxs)("div",{className:"codeBlockContent_cKMj",children:[(0,s.jsx)($,{}),(0,s.jsx)(F,{})]})]})}function X(e){let t=function(e){let{prism:t}=(0,N.p)();return function(e){var t,n,r,s,a;let l,i=(n=(t={language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}).language??function(e){if(!e)return;let t=e.split(" ").find(e=>e.startsWith("language-"));return t?.replace(/language-/,"")}(t.className)??t.defaultLanguage,n?.toLowerCase()??"text"),{lineClassNames:c,code:u}=(r=e.code,s={metastring:e.metastring,magicComments:e.magicComments,language:i},function(e,{metastring:t,magicComments:n}){if(t&&p.test(t)){let r=t.match(p).groups.range;if(0===n.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${t}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let s=n[0].className;return{lineClassNames:Object.fromEntries(d()(r).filter(e=>e>0).map(e=>[e-1,[s]])),code:e}}return null}(l=r.replace(/\r?\n$/,""),{...s})??function(e,t){let{language:n,magicComments:r}=t;if(void 0===n)return{lineClassNames:{},code:e};let s=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return b(["js","jsBlock"],t);case"jsx":case"tsx":return b(["js","jsBlock","jsx"],t);case"html":return b(["js","jsBlock","html"],t);case"python":case"py":case"bash":return b(["bash"],t);case"markdown":case"md":return b(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return b(["tex"],t);case"lua":case"haskell":return b(["lua"],t);case"sql":return b(["lua","jsBlock"],t);case"wasm":return b(["wasm"],t);case"vb":case"vba":case"visual-basic":return b(["vb","rem"],t);case"vbnet":return b(["vbnet","rem"],t);case"batch":return b(["rem"],t);case"basic":return b(["rem","f90"],t);case"fsharp":return b(["js","ml"],t);case"ocaml":case"sml":return b(["ml"],t);case"fortran":return b(["f90"],t);case"cobol":return b(["cobol"],t);default:return b(x,t)}}(n,r),a=e.split(/\r?\n/),l=Object.fromEntries(r.map(e=>[e.className,{start:0,range:""}])),o=Object.fromEntries(r.filter(e=>e.line).map(({className:e,line:t})=>[t,e])),i=Object.fromEntries(r.filter(e=>e.block).map(({className:e,block:t})=>[t.start,e])),c=Object.fromEntries(r.filter(e=>e.block).map(({className:e,block:t})=>[t.end,e]));for(let e=0;e<a.length;){let t=a[e].match(s);if(!t){e+=1;continue}let n=t.slice(1).find(e=>void 0!==e);o[n]?l[o[n]].range+=`${e},`:i[n]?l[i[n]].start=e:c[n]&&(l[c[n]].range+=`${l[c[n]].start}-${e-1},`),a.splice(e,1)}let u={};return Object.entries(l).forEach(([e,{range:t}])=>{d()(t).forEach(t=>{u[t]??=[],u[t].push(e)})}),{code:a.join("\n"),lineClassNames:u}}(l,{...s})),h=function({className:e,language:t}){return(0,o.A)(e,t&&!e?.includes(`language-${t}`)&&`language-${t}`)}({className:e.className,language:i}),f=(a=e.metastring,(a?.match(g)?.groups.title??"")||e.title),m=function({showLineNumbers:e,metastring:t}){if("boolean"==typeof e)return e?1:void 0;if("number"==typeof e)return e;let n=t?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(n)return n.startsWith("showLineNumbers=")?parseInt(n.replace("showLineNumbers=",""),10):1}({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:u,className:h,language:i,title:f,lineNumbersStart:m,lineClassNames:c}}({code:e.children,className:e.className,metastring:e.metastring,magicComments:t.magicComments,defaultLanguage:t.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),n=function(){let[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(!1),s=(0,a.useRef)(null),l=(0,a.useCallback)(()=>{let n=s.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t(e=>!e)},[s,e]),o=(0,a.useCallback)(()=>{let{scrollWidth:e,clientWidth:t}=s.current;r(e>t||s.current.querySelector("code").hasAttribute("style"))},[s]);return!function(e,t){let[n,r]=(0,a.useState)(),s=(0,a.useCallback)(()=>{r(e.current?.closest("[role=tabpanel][hidden]"))},[e,r]);(0,a.useEffect)(()=>{s()},[s]),function(e,t,n=C){let r=(0,h._q)(t),s=(0,h.Be)(n);(0,a.useEffect)(()=>{let t=new MutationObserver(r);return e&&t.observe(e,s),()=>t.disconnect()},[e,r,s])}(n,e=>
23{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),s())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}(s,o),(0,a.useEffect)(()=>{o()},[e,o]),(0,a.useEffect)(()=>(window.addEventListener("resize",o,{passive:!0}),()=>{window.removeEventListener("resize",o)}),[o]),{codeBlockRef:s,isEnabled:e,isCodeScrollable:n,toggle:l}}();return(0,s.jsx)(v,{metadata:t,wordWrap:n,children:(0,s.jsx)(W,{})})}function U({children:e,...t}){let n=(0,l.A)(),r=a.Children.toArray(e).some(e=>(0,a.isValidElement)(e))?e:Array.isArray(e)?e.join(""):e;return(0,s.jsx)("string"==typeof r?X:w,{...t,children:r},String(n))}var J=n(41376);function Y(e){return(0,s.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}let K={React:a,...a,...r};function Q(e){return(0,s.jsx)(J.A,{scope:K,...e})}function Z(e){return e.live&&(void 0===e.children||"string"==typeof e.children)?(0,s.jsx)(Q,{...e}):(0,s.jsx)(U,{...e})}function ee(e){return(0,s.jsx)(Z,{...e})}},24801(e,t,n){"use strict";var r=n(13706);let s={},a=r.createContext(s);function l(e){let t=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(a.Provider,{value:t},e.children)}n.d(t,{R:()=>l,x:()=>o})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.