docusaurus/assets/js/3716f59c.b373b43f.js
2025-05-30 17:26:10 +00:00

22 lines
No EOL
30 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["85936"],{16688:function(e,t,n){n.d(t,{Z:()=>r});let r={copyButtonCopied:"copyButtonCopied_wDuR",copyButtonIcons:"copyButtonIcons_gMWc",copyButtonIcon:"copyButtonIcon_GXfb",copyButtonSuccessIcon:"copyButtonSuccessIcon_ktUX"}},61475:function(e,t,n){n.d(t,{Z:()=>r});let r={wordWrapButtonIcon:"wordWrapButtonIcon___5r",wordWrapButtonEnabled:"wordWrapButtonEnabled_nam_"}},62081:function(e,t,n){n.d(t,{Z:()=>r});let r={buttonGroup:"buttonGroup_KXnS"}},58683:function(e,t,n){n.d(t,{Z:()=>r});let r={codeBlockContainer:"codeBlockContainer_jDV4"}},18314:function(e,t,n){n.d(t,{Z:()=>r});let r={codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q"}},13112:function(e,t,n){n.d(t,{Z:()=>r});let r={codeBlockContent:"codeBlockContent_cKMj",codeBlockTitle:"codeBlockTitle_U6Q0",codeBlock:"codeBlock_QST6"}},61562:function(e,t,n){n.d(t,{Z:()=>r});let r={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"}},55701:function(e,t,n){n.d(t,{Z:()=>r});let r={tabItem:"tabItem_pnkT"}},93195:function(e,t,n){n.d(t,{Z:()=>r});let r={tabList:"tabList_Qoir",tabItem:"tabItem_AQgk"}},43335:function(e,t,n){n.d(t,{Z:()=>r});let r={playgroundContainer:"playgroundContainer_TDLX"}},7512:function(e,t,n){n.d(t,{Z:()=>r});let r={playgroundEditor:"playgroundEditor_uqZ4"}},926:function(e,t,n){n.d(t,{Z:()=>r});let r={playgroundHeader:"playgroundHeader_h_Hu"}},25562:function(e,t,n){n.d(t,{Z:()=>r});let r={playgroundPreview:"playgroundPreview_u2xE"}},5759:function(e,t,n){n.d(t,{Z:()=>r});let r={apiTable:"apiTable_e8hp"}},1605:function(e,t,n){n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>d,default:()=>f,frontMatter:()=>u,metadata:()=>r,toc:()=>h});var r=n(50090),a=n(85893),o=n(80980),s=n(4575),l=n(54636),i=n(7450),c=n(66359);let u={sidebar_position:7,slug:"/api/plugins/@docusaurus/plugin-google-gtag"},d="\uD83D\uDCE6 plugin-google-gtag",g={},h=[{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,o.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"-plugin-google-gtag",children:"\uD83D\uDCE6 plugin-google-gtag"})}),"\n","\n",(0,a.jsxs)(t.p,{children:["The default ",(0,a.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,a.jsx)(t.admonition,{type:"tip",children:(0,a.jsxs)(t.p,{children:["You can use ",(0,a.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,a.jsx)(t.admonition,{title:"production only",type:"warning",children:(0,a.jsxs)(t.p,{children:["This plugin is always inactive in development and ",(0,a.jsx)(t.strong,{children:"only active in production"})," to avoid polluting the analytics statistics."]})}),"\n",(0,a.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,a.jsxs)(s.Z,{groupId:"npm2yarn",children:[(0,a.jsx)(l.Z,{value:"npm",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"npm install --save @docusaurus/plugin-google-gtag\n"})})}),(0,a.jsx)(l.Z,{value:"yarn",label:"Yarn",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"yarn add @docusaurus/plugin-google-gtag\n"})})}),(0,a.jsx)(l.Z,{value:"pnpm",label:"pnpm",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"pnpm add @docusaurus/plugin-google-gtag\n"})})}),(0,a.jsx)(l.Z,{value:"bun",label:"Bun",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"bun add @docusaurus/plugin-google-gtag\n"})})})]}),"\n",(0,a.jsxs)(t.admonition,{type:"tip",children:[(0,a.jsxs)(t.p,{children:["If you use the preset ",(0,a.jsx)(t.code,{children:"@docusaurus/preset-classic"}),", you don't need to install this plugin as a dependency."]}),(0,a.jsxs)(t.p,{children:["You can configure this plugin through the ",(0,a.jsx)(t.a,{href:"/docs/using-plugins#docusauruspreset-classic",children:"preset options"}),"."]})]}),"\n",(0,a.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,a.jsx)(t.p,{children:"Accepted fields:"}),"\n",(0,a.jsx)(i.Z,{children:(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{children:"Name"}),(0,a.jsx)(t.th,{children:"Type"}),(0,a.jsx)(t.th,{children:"Default"}),(0,a.jsx)(t.th,{children:"Description"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:(0,a.jsx)(t.code,{children:"trackingID"})}),(0,a.jsx)(t.td,{children:(0,a.jsx)("code",{children:"string | string[]"})}),(0,a.jsx)(t.td,{children:(0,a.jsx)(t.strong,{children:"Required"})}),(0,a.jsx)(t.td,{children:"The tracking ID of your gtag service. It is possible to provide multiple ids."})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:(0,a.jsx)(t.code,{children:"anonymizeIP"})}),(0,a.jsx)(t.td,{children:(0,a.jsx)(t.code,{children:"boolean"})}),(0,a.jsx)(t.td,{children:(0,a.jsx)(t.code,{children:"false"})}),(0,a.jsx)(t.td,{children:"Whether the IP should be anonymized when sending requests."})]})]})]})}),"\n",(0,a.jsx)(t.h3,{id:"ex-config",children:"Example configuration"}),"\n",(0,a.jsx)(t.p,{children:"You can configure this plugin through preset options or plugin options."}),"\n",(0,a.jsx)(t.admonition,{type:"tip",children:(0,a.jsx)(t.p,{children:"Most Docusaurus users configure this plugin through the preset options."})}),"\n","\n",(0,a.jsx)(c.Z,{pluginName:"@docusaurus/plugin-google-gtag",presetOptionName:"gtag",code:"{\n trackingID: 'G-999X9XX9XX',\n anonymizeIP: true,\n}"})]})}function f(e={}){let{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},5343:function(e,t,n){n.d(t,{Z:()=>o});var r=n(85893);n(67294);var a=n(90496);function o(e){let{className:t,...n}=e;return(0,r.jsx)("button",{type:"button",...n,className:(0,a.Z)("clean-btn",t)})}},2556:function(e,t,n){n.d(t,{Z:()=>h});var r=n(85893),a=n(67294),o=n(90496),s=n(44771),l=n(77827),i=n(88568),c=n(5343),u=n(31660),d=n(87545),g=n(16688);function h(e){let{className:t}=e,{copyCode:n,isCopied:h}=function(){let{metadata:{code:e}}=(0,i.LS)(),[t,n]=(0,a.useState)(!1),r=(0,a.useRef)(void 0),o=(0,a.useCallback)(()=>{(0,s.Z)(e),n(!0),r.current=window.setTimeout(()=>{n(!1)},1e3)},[e]);return(0,a.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:o,isCopied:t}}();return(0,r.jsx)(c.Z,{"aria-label":h?(0,l.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,l.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,l.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,o.Z)(t,g.Z.copyButton,h&&g.Z.copyButtonCopied),onClick:n,children:(0,r.jsxs)("span",{className:g.Z.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(u.Z,{className:g.Z.copyButtonIcon}),(0,r.jsx)(d.Z,{className:g.Z.copyButtonSuccessIcon})]})})}},93757:function(e,t,n){n.d(t,{Z:()=>u});var r=n(85893);n(67294);var a=n(90496),o=n(77827),s=n(88568),l=n(5343),i=n(67379),c=n(61475);function u(e){let{className:t}=e,{wordWrap:n}=(0,s.LS)();if(!(n.isEnabled||n.isCodeScrollable))return!1;let u=(0,o.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,r.jsx)(l.Z,{onClick:()=>n.toggle(),className:(0,a.Z)(t,n.isEnabled&&c.Z.wordWrapButtonEnabled),"aria-label":u,title:u,children:(0,r.jsx)(i.Z,{className:c.Z.wordWrapButtonIcon,"aria-hidden":"true"})})}},37457:function(e,t,n){n.d(t,{Z:()=>c});var r=n(85893);n(67294);var a=n(90496),o=n(56497),s=n(2556),l=n(93757),i=n(62081);function c(e){let{className:t}=e;return(0,r.jsx)(o.Z,{children:()=>(0,r.jsxs)("div",{className:(0,a.Z)(t,i.Z.buttonGroup),children:[(0,r.jsx)(l.Z,{}),(0,r.jsx)(s.Z,{})]})})}},62302:function(e,t,n){n.d(t,{Z:()=>c});var r=n(85893);n(67294);var a=n(90496),o=n(10099),s=n(55951),l=n(88568),i=n(58683);function c(e){let{as:t,...n}=e,c=(0,o.p)(),u=(0,l.QC)(c);return(0,r.jsx)(t,{...n,style:u,className:(0,a.Z)(n.className,i.Z.codeBlockContainer,s.k.common.codeBlock)})}},93002:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);n(67294);var a=n(90496),o=n(62302),s=n(18314);function l(e){let{children:t,className:n}=e;return(0,r.jsx)(o.Z,{as:"pre",tabIndex:0,className:(0,a.Z)(s.Z.codeBlockStandalone,"thin-scrollbar",n),children:(0,r.jsx)("code",{className:s.Z.codeBlockLines,children:t})})}},97061:function(e,t,n){n.d(t,{Z:()=>i});var r=n(85893);n(67294);var a=n(26378),o=n(88568),s=n(63461),l=n(65802);function i(e){let t=function(e){let{prism:t}=(0,a.L)();return(0,o.MA)({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=(0,s.F)();return(0,r.jsx)(o.EF,{metadata:t,wordWrap:n,children:(0,r.jsx)(l.Z,{})})}},26965:function(e,t,n){n.d(t,{Z:()=>h});var r=n(85893),a=n(67294),o=n(90496),s=n(88568),l=n(10099),i=n(7316),c=n(32028),u=n(18314);let d=a.forwardRef((e,t)=>(0,r.jsx)("pre",{ref:t,tabIndex:0,...e,className:(0,o.Z)(e.className,u.Z.codeBlock,"thin-scrollbar")}));function g(e){let{metadata:t}=(0,s.LS)();return(0,r.jsx)("code",{...e,className:(0,o.Z)(e.className,u.Z.codeBlockLines,void 0!==t.lineNumbersStart&&u.Z.codeBlockLinesWithNumbering),style:{...e.style,counterReset:void 0===t.lineNumbersStart?void 0:`line-count ${t.lineNumbersStart-1}`}})}function h(e){let{className:t}=e,{metadata:n,wordWrap:a}=(0,s.LS)(),u=(0,l.p)(),{code:h,language:p,lineNumbersStart:f,lineClassNames:m}=n;return(0,r.jsx)(i.y$,{theme:u,code:h,language:p,children:e=>{let{className:n,style:s,tokens:l,getLineProps:i,getTokenProps:u}=e;return(0,r.jsx)(d,{ref:a.codeBlockRef,className:(0,o.Z)(t,n),style:s,children:(0,r.jsx)(g,{children:l.map((e,t)=>(0,r.jsx)(c.Z,{line:e,getLineProps:i,getTokenProps:u,classNames:m[t],showLineNumbers:void 0!==f},t))})})}})}},65802:function(e,t,n){n.d(t,{Z:()=>d});var r=n(85893);n(67294);var a=n(90496),o=n(88568),s=n(62302),l=n(923),i=n(26965),c=n(37457),u=n(13112);function d(e){let{className:t}=e,{metadata:n}=(0,o.LS)();return(0,r.jsxs)(s.Z,{as:"div",className:(0,a.Z)(t,n.className),children:[n.title&&(0,r.jsx)("div",{className:u.Z.codeBlockTitle,children:(0,r.jsx)(l.Z,{children:n.title})}),(0,r.jsxs)("div",{className:u.Z.codeBlockContent,children:[(0,r.jsx)(i.Z,{}),(0,r.jsx)(c.Z,{})]})]})}},76458:function(e,t,n){n.d(t,{Z:()=>a});var r=n(85893);function a(e){let{line:t,token:n,...a}=e;return(0,r.jsx)("span",{...a})}n(67294)},32028:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);n(67294);var a=n(90496),o=n(76458),s=n(61562);function l(e){let{line:t,classNames:n,showLineNumbers:l,getLineProps:i,getTokenProps:c}=e,u=function(e){let t=1===e.length&&"\n"===e[0].content?e[0]:void 0;return t?[{...t,content:""}]:e}(t),d=i({line:u,className:(0,a.Z)(n,l&&s.Z.codeLine)}),g=u.map((e,t)=>{let n=c({token:e});return(0,r.jsx)(o.Z,{...n,line:u,token:e,children:n.children},t)});return(0,r.jsxs)("span",{...d,children:[l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:s.Z.codeLineNumber}),(0,r.jsx)("span",{className:s.Z.codeLineContent,children:g})]}):g,(0,r.jsx)("br",{})]})}},923:function(e,t,n){n.d(t,{Z:()=>r});function r(e){let{children:t}=e;return t}},8110:function(e,t,n){n.d(t,{Z:()=>i});var r=n(85893),a=n(67294),o=n(71607),s=n(93002),l=n(97061);function i(e){let{children:t,...n}=e,i=(0,o.Z)(),c=a.Children.toArray(t).some(e=>(0,a.isValidElement)(e))?t:Array.isArray(t)?t.join(""):t,u="string"==typeof c?l.Z:s.Z;return(0,r.jsx)(u,{...n,children:c},String(i))}},31660:function(e,t,n){n.d(t,{Z:()=>a});var r=n(85893);function a(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.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"})})}n(67294)},87545:function(e,t,n){n.d(t,{Z:()=>a});var r=n(85893);function a(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}n(67294)},67379:function(e,t,n){n.d(t,{Z:()=>a});var r=n(85893);function a(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.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"})})}n(67294)},54636:function(e,t,n){n.d(t,{Z:()=>s});var r=n(85893);n(67294);var a=n(90496),o=n(55701);function s(e){let{children:t,hidden:n,className:s}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.Z)(o.Z.tabItem,s),hidden:n,children:t})}},4575:function(e,t,n){n.d(t,{Z:()=>h});var r=n(85893),a=n(67294),o=n(90496),s=n(54947),l=n(30623),i=n(71607),c=n(93195);function u(e){let{className:t,block:n,selectedValue:a,selectValue:l,tabValues:i}=e,u=[],{blockElementScrollPositionUntilNextRender:d}=(0,s.o5)(),g=e=>{let t=e.currentTarget,n=i[u.indexOf(t)].value;n!==a&&(d(t),l(n))},h=e=>{let t=null;switch(e.key){case"Enter":g(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,o.Z)("tabs",{"tabs--block":n},t),children:i.map(e=>{let{value:t,label:n,attributes:s}=e;return(0,r.jsx)("li",{role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:e=>{u.push(e)},onKeyDown:h,onClick:g,...s,className:(0,o.Z)("tabs__item",c.Z.tabItem,s?.className,{"tabs__item--active":a===t}),children:n??t},t)})})}function d(e){let{lazy:t,children:n,selectedValue:s}=e,l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){let e=l.find(e=>e.props.value===s);return e?(0,a.cloneElement)(e,{className:(0,o.Z)("margin-top--md",e.props.className)}):null}return(0,r.jsx)("div",{className:"margin-top--md",children:l.map((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==s}))})}function g(e){let t=(0,l.Y)(e);return(0,r.jsxs)("div",{className:(0,o.Z)("tabs-container",c.Z.tabList),children:[(0,r.jsx)(u,{...t,...e}),(0,r.jsx)(d,{...t,...e})]})}function h(e){let t=(0,i.Z)();return(0,r.jsx)(g,{...e,children:(0,l.h)(e.children)},String(t))}},63461:function(e,t,n){n.d(t,{F:()=>o});var r=n(67294),a=n(9219);function o(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),s=(0,r.useRef)(null),l=(0,r.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]),i=(0,r.useCallback)(()=>{let{scrollWidth:e,clientWidth:t}=s.current;o(e>t||s.current.querySelector("code").hasAttribute("style"))},[s]),[c,u]=(0,r.useState)(),d=(0,r.useCallback)(()=>{u(s.current?.closest("[role=tabpanel][hidden]"))},[s,u]);return(0,r.useEffect)(()=>{d()},[d]),(0,a.I)(c,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(i(),d())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1}),(0,r.useEffect)(()=>{i()},[e,i]),(0,r.useEffect)(()=>(window.addEventListener("resize",i,{passive:!0}),()=>{window.removeEventListener("resize",i)}),[i]),{codeBlockRef:s,isEnabled:e,isCodeScrollable:n,toggle:l}}},9219:function(e,t,n){n.d(t,{I:()=>s});var r=n(67294),a=n(50923);let o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,s=(0,a.zX)(t),l=(0,a.Ql)(n);(0,r.useEffect)(()=>{let t=new MutationObserver(s);return e&&t.observe(e,l),()=>t.disconnect()},[e,s,l])}},10099:function(e,t,n){n.d(t,{p:()=>o});var r=n(45245),a=n(26378);function o(){let{prism:e}=(0,a.L)(),{colorMode:t}=(0,r.I)(),n=e.theme,o=e.darkTheme||n;return"dark"===t?o:n}},88568:function(e,t,n){n.d(t,{EF:()=>x,LS:()=>j,MA:()=>f,QC:()=>m});var r=n(85893),a=n(67294),o=n(90496),s=n(6324),l=n.n(s),i=n(50923);let c=/title=(?<quote>["'])(?<title>.*?)\1/,u=/\{(?<range>[\d,-]+)\}/,d={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},g={...d,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:""}},h=Object.keys(d);function p(e,t){let n=e.map(e=>{let{start:n,end:r}=g[e];return`(?:${n}\\s*(${t.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${n})\\s*$`)}function f(e){var t,n,r;let a=(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:s,code:i}=function(e,t){let n=e.replace(/\r?\n$/,"");return function(e,t){let{metastring:n,magicComments:r}=t;if(n&&u.test(n)){let t=n.match(u).groups.range;if(0===r.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${n}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let a=r[0].className;return{lineClassNames:Object.fromEntries(l()(t).filter(e=>e>0).map(e=>[e-1,[a]])),code:e}}return null}(n,{...t})??function(e,t){let{language:n,magicComments:r}=t;if(void 0===n)return{lineClassNames:{},code:e};let a=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return p(["js","jsBlock"],t);case"jsx":case"tsx":return p(["js","jsBlock","jsx"],t);case"html":return p(["js","jsBlock","html"],t);case"python":case"py":case"bash":return p(["bash"],t);case"markdown":case"md":return p(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return p(["tex"],t);case"lua":case"haskell":return p(["lua"],t);case"sql":return p(["lua","jsBlock"],t);case"wasm":return p(["wasm"],t);case"vb":case"vba":case"visual-basic":return p(["vb","rem"],t);case"vbnet":return p(["vbnet","rem"],t);case"batch":return p(["rem"],t);case"basic":return p(["rem","f90"],t);case"fsharp":return p(["js","ml"],t);case"ocaml":case"sml":return p(["ml"],t);case"fortran":return p(["f90"],t);case"cobol":return p(["cobol"],t);default:return p(h,t)}}(n,r),o=e.split(/\r?\n/),s=Object.fromEntries(r.map(e=>[e.className,{start:0,range:""}])),i=Object.fromEntries(r.filter(e=>e.line).map(e=>{let{className:t,line:n}=e;return[n,t]})),c=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:t,block:n}=e;return[n.start,t]})),u=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:t,block:n}=e;return[n.end,t]}));for(let e=0;e<o.length;){let t=o[e].match(a);if(!t){e+=1;continue}let n=t.slice(1).find(e=>void 0!==e);i[n]?s[i[n]].range+=`${e},`:c[n]?s[c[n]].start=e:u[n]&&(s[u[n]].range+=`${s[u[n]].start}-${e-1},`),o.splice(e,1)}let d={};return Object.entries(s).forEach(e=>{let[t,{range:n}]=e;l()(n).forEach(e=>{d[e]??=[],d[e].push(t)})}),{code:o.join("\n"),lineClassNames:d}}(n,{...t})}(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:a}),d=function(e){let{className:t,language:n}=e;return(0,o.Z)(t,n&&!t?.includes(`language-${n}`)&&`language-${n}`)}({className:e.className,language:a}),g=(r=e.metastring,(r?.match(c)?.groups.title??"")||e.title),f=function(e){let{showLineNumbers:t,metastring:n}=e;if("boolean"==typeof t)return t?1:void 0;if("number"==typeof t)return t;let r=n?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(r)return r.startsWith("showLineNumbers=")?parseInt(r.replace("showLineNumbers=",""),10):1}({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:i,className:d,language:a,title:g,lineNumbersStart:f,lineClassNames:s}}function m(e){let t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach(e=>{let[r,a]=e,o=t[r];o&&"string"==typeof a&&(n[o]=a)}),n}let b=(0,a.createContext)(null);function x(e){let{metadata:t,wordWrap:n,children:o}=e,s=(0,a.useMemo)(()=>({metadata:t,wordWrap:n}),[t,n]);return(0,r.jsx)(b.Provider,{value:s,children:o})}function j(){let e=(0,a.useContext)(b);if(null===e)throw new i.i6("CodeBlockContextProvider");return e}},30623:function(e,t,n){n.d(t,{Y:()=>d,h:()=>c});var r=n(67294),a=n(3620),o=n(844),s=n(97486),l=n(32263),i=n(16971);function c(e){return r.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){let{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function u(e){let{value:t,tabValues:n}=e;return n.some(e=>e.value===t)}function d(e){let{defaultValue:t,queryString:n=!1,groupId:d}=e,g=function(e){let{values:t,children:n}=e;return(0,r.useMemo)(()=>{let e=t??c(n).map(e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}),r=(0,l.lx)(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,p]=(0,r.useState)(()=>(function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!u({value:t,tabValues:n}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}let r=n.find(e=>e.default)??n[0];if(!r)throw Error("Unexpected error: 0 tabValues");return r.value})({defaultValue:t,tabValues:g})),[f,m]=function(e){let{queryString:t=!1,groupId:n}=e,o=(0,a.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)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 n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)(e=>{if(!l)return;let t=new URLSearchParams(o.location.search);t.set(l,e),o.replace({...o.location,search:t.toString()})},[l,o])]}({queryString:n,groupId:d}),[b,x]=function(e){let{groupId:t}=e,n=t?`docusaurus.tab.${t}`:null,[a,o]=(0,i.Nk)(n);return[a,(0,r.useCallback)(e=>{n&&o.set(e)},[n,o])]}({groupId:d}),j=(()=>{let e=f??b;return u({value:e,tabValues:g})?e:null})();return(0,o.Z)(()=>{j&&p(j)},[j]),{selectedValue:h,selectValue:(0,r.useCallback)(e=>{if(!u({value:e,tabValues:g}))throw Error(`Can't select invalid tab value=${e}`);p(e),m(e),x(e)},[m,x,g]),tabValues:g}}},5626:function(e,t,n){n.d(t,{Z:()=>s});var r=n(85893);n(67294);var a=n(8110),o=n(80483);function s(e){return e.live?(0,r.jsx)(o.Z,{...e}):(0,r.jsx)(a.Z,{...e})}},80483:function(e,t,n){n.d(t,{Z:()=>s});var r=n(85893);n(67294);var a=n(35010),o=n(62529);function s(e){return(0,r.jsx)(a.Z,{scope:o.Z,...e})}},57829:function(e,t,n){n.d(t,{Z:()=>o});var r=n(85893);n(67294);var a=n(43335);function o(e){let{children:t}=e;return(0,r.jsx)("div",{className:a.Z.playgroundContainer,children:t})}},49522:function(e,t,n){n.d(t,{Z:()=>c});var r=n(85893);n(67294);var a=n(62905),o=n(71607),s=n(77827),l=n(83372),i=n(7512);function c(){let e=(0,o.Z)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{children:(0,r.jsx)(s.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,r.jsx)(a.uz,{className:i.Z.playgroundEditor},String(e))]})}},83372:function(e,t,n){n.d(t,{Z:()=>s});var r=n(85893);n(67294);var a=n(90496),o=n(926);function s(e){let{children:t}=e;return(0,r.jsx)("div",{className:(0,a.Z)(o.Z.playgroundHeader),children:t})}},45188:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);n(67294);var a=n(26378),o=n(67191),s=n(49522);function l(){let{playgroundPosition:e}=(0,a.L)().liveCodeBlock;return(0,r.jsx)(r.Fragment,{children:"top"===e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{}),(0,r.jsx)(s.Z,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{}),(0,r.jsx)(o.Z,{})]})})}},67191:function(e,t,n){n.d(t,{Z:()=>h});var r=n(85893);n(67294);var a=n(62905),o=n(56497),s=n(12565),l=n(83176),i=n(77827),c=n(83372),u=n(25562);function d(){return(0,r.jsx)("div",{children:"Loading..."})}function g(){return(0,r.jsx)(o.Z,{fallback:(0,r.jsx)(d,{}),children:()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{fallback:e=>(0,r.jsx)(s.Ac,{...e}),children:(0,r.jsx)(a.i5,{})}),(0,r.jsx)(a.IF,{})]})})}function h(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{children:(0,r.jsx)(i.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,r.jsx)("div",{className:u.Z.playgroundPreview,children:(0,r.jsx)(g,{})})]})}},9002:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);n(67294);var a=n(62905),o=n(10099);let s=e=>`${e};`;function l(e){let{code:t,children:n,...l}=e,i=(0,o.p)(),c=l.metastring?.includes("noInline")??!1;return(0,r.jsx)(a.nu,{noInline:c,theme:i,...l,code:t?.replace(/\n$/,""),transformCode:l.transformCode??s,children:n})}},35010:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);n(67294);var a=n(9002),o=n(57829),s=n(45188);function l(e){let{children:t,transformCode:n,...l}=e;return(0,r.jsx)(o.Z,{children:(0,r.jsx)(a.Z,{code:t,...l,children:(0,r.jsx)(s.Z,{})})})}},56497:function(e,t,n){n.d(t,{Z:()=>o});var r=n(85893);n(67294);var a=n(71607);function o(e){let{children:t,fallback:n}=e;return(0,a.Z)()?(0,r.jsx)(r.Fragment,{children:t?.()}):n??null}},7450:function(e,t,n){n.d(t,{Z:()=>c});var r=n(85893),a=n(67294),o=n(30576),s=n(3620),l=n(5759);let i=a.forwardRef(function(e,t){let{name:n,children:l}=e,i=function(e){let t=e;for(;(0,a.isValidElement)(t);)[t]=a.Children.toArray(t.props.children);if("string"!=typeof t)throw Error(`Could not extract APITable row name from JSX tree:
${JSON.stringify(e,null,2)}`);return t}(l),c=n?`${n}-${i}`:i,u=`#${c}`,d=(0,s.k6)();return(0,o.Z)().collectAnchor(c),(0,r.jsx)("tr",{id:c,tabIndex:0,ref:d.location.hash===u?t: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:l.props.children})});function c(e){let{children:t,name:n}=e;if("table"!==t.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[o,s]=a.Children.toArray(t.props.children),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{c.current?.focus()},[c]);let u=a.Children.map(s.props.children,e=>(0,r.jsx)(i,{name:n,ref:c,children:e}));return(0,r.jsxs)("table",{className:l.Z.apiTable,children:[o,(0,r.jsx)("tbody",{children:u})]})}},66359:function(e,t,n){n.d(t,{Z:()=>d});var r=n(85893);n(67294);var a=n(35363),o=n(38514),s=n(77827),l=n(4575),i=n(54636),c=n(14547);let u=void 0;function d(e){let{code:t,pluginName:n,presetOptionName:d}=e,g=(0,o.zu)(u).path;return(0,r.jsxs)(l.Z,{groupId:"api-config-ex",children:[(0,r.jsxs)(i.Z,{value:"preset",label:(0,s.I)({message:"Preset options"}),children:[(0,r.jsx)("p",{children:(0,r.jsx)(s.Z,{id:"apiDocs.configTabs.presetOptions.description",values:{presetLink:(0,r.jsx)(a.Z,{to:`${g}/using-plugins#docusauruspreset-classic`,children:(0,r.jsx)(s.Z,{children:"preset options"})})},children:"If you use a preset, configure this plugin through the {presetLink}:"})}),(0,r.jsx)(c.Z,{language:"js",title:"docusaurus.config.js",children:`module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
// highlight-start
${d}: ${t.replace(/\n/g,"\n ")},
// highlight-end
},
],
],
};`})]}),(0,r.jsxs)(i.Z,{value:"plugin",label:(0,s.I)({message:"Plugin options"}),children:[(0,r.jsx)("p",{children:(0,r.jsx)(s.Z,{children:"If you are using a standalone plugin, provide options directly to the plugin:"})}),(0,r.jsx)(c.Z,{language:"js",title:"docusaurus.config.js",children:`module.exports = {
plugins: [
[
'${n}',
// highlight-start
${t.replace(/\n/g,"\n ")},
// highlight-end
],
],
};`})]})]})}},14547:function(e,t,n){n.d(t,{Z:()=>o});var r=n(85893);n(67294);var a=n(5626);function o(e){return(0,r.jsx)(a.Z,{...e})}},63627:function(e,t,n){n.r(t),n.d(t,{ButtonExample:()=>a});var r=n(85893);function a(e){return(0,r.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}n(67294)},62529:function(e,t,n){n.d(t,{Z:()=>o});var r=n(67294),a=n(63627);let o={React:r,...r,...a}},50090:function(e){e.exports=JSON.parse('{"id":"api/plugins/plugin-google-gtag","title":"\uD83D\uDCE6 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/docs/api/plugins/plugin-google-gtag.mdx","sourceDirName":"api/plugins","slug":"/api/plugins/@docusaurus/plugin-google-gtag","permalink":"/docs/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":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1748625776000,"sidebarPosition":7,"frontMatter":{"sidebar_position":7,"slug":"/api/plugins/@docusaurus/plugin-google-gtag"},"sidebar":"api","previous":{"title":"\uD83D\uDCE6 plugin-google-analytics","permalink":"/docs/api/plugins/@docusaurus/plugin-google-analytics"},"next":{"title":"\uD83D\uDCE6 plugin-rsdoctor","permalink":"/docs/api/plugins/@docusaurus/plugin-rsdoctor"}}')}}]);