mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
4 lines
No EOL
40 KiB
JavaScript
4 lines
No EOL
40 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["81438"],{5666:function(e,t,n){n.d(t,{CS:()=>x,iZ:()=>p,ci:()=>Z,Ne:()=>_,cH:()=>k,nO:()=>u,wj:()=>s,n4:()=>c});var r=n(85893),l=n(67294),a=n(50923),i=n(3564);function s(){let e=(0,i.Z)(),t=e?.data?.blogMetadata;if(!t)throw Error("useBlogMetadata() can't be called on the current route because the blog metadata could not be found in route context");return t}let o=l.createContext(null);function c(e){let{children:t,content:n,isBlogPostPage:a=!1}=e,i=function(e){let{content:t,isBlogPostPage:n}=e;return(0,l.useMemo)(()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,toc:t.toc,isBlogPostPage:n}),[t,n])}({content:n,isBlogPostPage:a});return(0,r.jsx)(o.Provider,{value:i,children:t})}function u(){let e=(0,l.useContext)(o);if(null===e)throw new a.i6("BlogPostProvider");return e}var d=n(83631),m=n(8156);let h=e=>new Date(e).toISOString();function f(e){let t=e.map(j);return{author:1===t.length?t[0]:t}}function g(e,t,n){return e?{image:function(e){let{imageUrl:t,caption:n}=e;return{"@type":"ImageObject","@id":t,url:t,contentUrl:t,caption:n}}({imageUrl:t(e,{absolute:!0}),caption:`title image for the blog post: ${n}`})}:{}}function x(e){let{siteConfig:t}=(0,m.Z)(),{withBaseUrl:n}=(0,d.Cg)(),{metadata:{blogDescription:r,blogTitle:l,permalink:a}}=e,i=`${t.url}${a}`;return{"@context":"https://schema.org","@type":"Blog","@id":i,mainEntityOfPage:i,headline:l,description:r,blogPost:e.items.map(e=>(function(e,t,n){let{assets:r,frontMatter:l,metadata:a}=e,{date:i,title:s,description:o,lastUpdatedAt:c}=a,u=r.image??l.image,d=l.keywords??[],m=`${t.url}${a.permalink}`,x=c?h(c):void 0;return{"@type":"BlogPosting","@id":m,mainEntityOfPage:m,url:m,headline:s,name:s,description:o,datePublished:i,...x?{dateModified:x}:{},...f(a.authors),...g(u,n,s),...d?{keywords:d}:{}}})(e.content,t,n))}}function p(){let e=s(),{assets:t,metadata:n}=u(),{siteConfig:r}=(0,m.Z)(),{withBaseUrl:l}=(0,d.Cg)(),{date:a,title:i,description:o,frontMatter:c,lastUpdatedAt:x}=n,p=t.image??c.image,j=c.keywords??[],v=x?h(x):void 0,b=`${r.url}${n.permalink}`;return{"@context":"https://schema.org","@type":"BlogPosting","@id":b,mainEntityOfPage:b,url:b,headline:i,name:i,description:o,datePublished:a,...v?{dateModified:v}:{},...f(n.authors),...g(p,l,i),...j?{keywords:j}:{},isPartOf:{"@type":"Blog","@id":`${r.url}${e.blogBasePath}`,name:e.blogTitle}}}function j(e){return{"@type":"Person",...e.name?{name:e.name}:{},...e.title?{description:e.title}:{},...e.url?{url:e.url}:{},...e.email?{email:e.email}:{},...e.imageURL?{image:e.imageURL}:{}}}var v=n(3620),b=n(35363),N=n(32263),y=n(71208);function k(e){let{pathname:t}=(0,v.TH)();return(0,l.useMemo)(()=>e.filter(e=>!e.unlisted||!!(0,y.Mg)(e.permalink,t)),[e,t])}function Z(e){let t=Object.entries((0,N.vM)(e,e=>`${new Date(e.date).getFullYear()}`));return t.reverse(),t}function _(e){let{items:t,ulClassName:n,liClassName:l,linkClassName:a,linkActiveClassName:i}=e;return(0,r.jsx)("ul",{className:n,children:t.map(e=>(0,r.jsx)("li",{className:l,children:(0,r.jsx)(b.Z,{isNavLink:!0,to:e.permalink,className:a,activeClassName:i,children:e.title})},e.permalink))})}},37796:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);function l(e){return(0,r.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}n(67294)},49356:function(e,t,n){n.d(t,{Z:()=>w});var r=n(85893),l=n(67294),a=n(90496),i=n(77827),s=n(55951);let o={admonition:"admonition_o5H7",admonitionHeading:"admonitionHeading_FzoX",admonitionIcon:"admonitionIcon_rXq6",admonitionContent:"admonitionContent_Knsx"};function c(e){let{type:t,className:n,children:l}=e;return(0,r.jsx)("div",{className:(0,a.Z)(s.k.common.admonition,s.k.common.admonitionType(t),o.admonition,n),children:l})}function u(e){let{icon:t,title:n}=e;return(0,r.jsxs)("div",{className:o.admonitionHeading,children:[(0,r.jsx)("span",{className:o.admonitionIcon,children:t}),n]})}function d(e){let{children:t}=e;return t?(0,r.jsx)("div",{className:o.admonitionContent,children:t}):null}function m(e){let{type:t,icon:n,title:l,children:a,className:i}=e;return(0,r.jsxs)(c,{type:t,className:i,children:[l||n?(0,r.jsx)(u,{title:l,icon:n}):null,(0,r.jsx)(d,{children:a})]})}let h={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})},{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function f(e){return(0,r.jsx)(m,{...h,...e,className:(0,a.Z)("alert alert--secondary",e.className),children:e.children})}let g={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})},{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function x(e){return(0,r.jsx)(m,{...g,...e,className:(0,a.Z)("alert alert--success",e.className),children:e.children})}var p=n(37796);let j={icon:(0,r.jsx)(p.Z,{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function v(e){return(0,r.jsx)(m,{...j,...e,className:(0,a.Z)("alert alert--info",e.className),children:e.children})}function b(e){return(0,r.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}let N={icon:(0,r.jsx)(b,{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})},y={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})},{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})},k={icon:(0,r.jsx)(b,{}),title:(0,r.jsx)(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var Z=n(57922);let _={note:f,tip:x,info:v,warning:function(e){return(0,r.jsx)(m,{...N,...e,className:(0,a.Z)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,r.jsx)(m,{...y,...e,className:(0,a.Z)("alert alert--danger",e.className),children:e.children})},secondary:e=>(0,r.jsx)(f,{title:"secondary",...e}),important:e=>(0,r.jsx)(v,{title:"important",...e}),success:e=>(0,r.jsx)(x,{title:"success",...e}),caution:function(e){return(0,r.jsx)(m,{...k,...e,className:(0,a.Z)("alert alert--warning",e.className),children:e.children})},"my-custom-admonition":function(e){return(0,r.jsxs)("div",{style:{border:"solid red",padding:10},children:[(0,r.jsx)(Z.Z,{as:"h5",style:{color:"blue",fontSize:30},children:e.title}),(0,r.jsx)("div",{children:e.children})]})}};function w(e){let t=function(e){let{mdxAdmonitionTitle:t,rest:n}=function(e){let t=l.Children.toArray(e),n=t.find(e=>l.isValidElement(e)&&"mdxAdmonitionTitle"===e.type),a=t.filter(e=>e!==n);return{mdxAdmonitionTitle:n?.props.children,rest:a.length>0?(0,r.jsx)(r.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}(e),n=function(e){let t=_[e];return t||(console.warn(`No admonition component found for admonition type "${e}". Using Info as fallback.`),_.info)}(t.type);return(0,r.jsx)(n,{...t})}},9942:function(e,t,n){n.d(t,{Z:()=>N});var r=n(85893),l=n(67294),a=n(90496),i=n(23944),s=n(28115),o=n(77827),c=n(5666),u=n(26378),d=n(57922);function m(e){let{year:t,yearGroupHeadingClassName:n,children:l}=e;return(0,r.jsxs)("div",{role:"group",children:[(0,r.jsx)(d.Z,{as:"h3",className:n,children:t}),l]})}let h=(0,l.memo)(function(e){let{items:t,yearGroupHeadingClassName:n,ListComponent:l}=e;if(!(0,u.L)().blog.sidebar.groupByYear)return(0,r.jsx)(l,{items:t});{let e=(0,c.ci)(t);return(0,r.jsx)(r.Fragment,{children:e.map(e=>{let[t,a]=e;return(0,r.jsx)(m,{year:t,yearGroupHeadingClassName:n,children:(0,r.jsx)(l,{items:a})},t)})})}}),f=e=>{let{items:t}=e;return(0,r.jsx)(c.Ne,{items:t,ulClassName:(0,a.Z)("sidebarItemList_OSkG","clean-list"),liClassName:"sidebarItem_WJ0y",linkClassName:"sidebarItemLink_Qrfg",linkActiveClassName:"sidebarItemLinkActive_nUeK"})},g=(0,l.memo)(function(e){let{sidebar:t}=e,n=(0,c.cH)(t.items);return(0,r.jsx)("aside",{className:"col col--3",children:(0,r.jsxs)("nav",{className:(0,a.Z)("sidebar_P3nc","thin-scrollbar"),"aria-label":(0,o.I)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"}),children:[(0,r.jsx)("div",{className:(0,a.Z)("sidebarItemTitle_VrjY","margin-bottom--md"),children:t.title}),(0,r.jsx)(h,{items:n,ListComponent:f,yearGroupHeadingClassName:"yearGroupHeading_lECJ"})]})})});var x=n(44160);let p=e=>{let{items:t}=e;return(0,r.jsx)(c.Ne,{items:t,ulClassName:"menu__list",liClassName:"menu__list-item",linkClassName:"menu__link",linkActiveClassName:"menu__link--active"})};function j(e){let{sidebar:t}=e,n=(0,c.cH)(t.items);return(0,r.jsx)(h,{items:n,ListComponent:p,yearGroupHeadingClassName:"yearGroupHeading_Ruz9"})}let v=(0,l.memo)(function(e){return(0,r.jsx)(x.Zo,{component:j,props:e})});function b(e){let{sidebar:t}=e,n=(0,s.i)();return t?.items.length?"mobile"===n?(0,r.jsx)(v,{sidebar:t}):(0,r.jsx)(g,{sidebar:t}):null}function N(e){let{sidebar:t,toc:n,children:l,...s}=e,o=t&&t.items.length>0;return(0,r.jsx)(i.Z,{...s,children:(0,r.jsx)("div",{className:"container margin-vert--lg",children:(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)(b,{sidebar:t}),(0,r.jsx)("main",{className:(0,a.Z)("col",{"col--7":o,"col--9 col--offset-1":!o}),children:l}),n&&(0,r.jsx)("div",{className:"col col--2",children:n})]})})})}},76460:function(e,t,n){n.d(t,{Z:()=>l});var r=n(85893);function l(e){let{children:t,className:n}=e;return(0,r.jsx)("article",{className:n,children:t})}n(67294)},90437:function(e,t,n){n.d(t,{Z:()=>o});var r=n(85893);n(67294);var l=n(90496),a=n(59699),i=n(5666),s=n(84015);function o(e){let{children:t,className:n}=e,{isBlogPostPage:o}=(0,i.nO)();return(0,r.jsx)("div",{id:o?a.blogPostContainerID:void 0,className:(0,l.Z)("markdown",n),children:(0,r.jsx)(s.Z,{children:t})})}},54505:function(e,t,n){n.d(t,{Z:()=>m});var r=n(85893);n(67294);var l=n(90496),a=n(77827),i=n(11660),s=n(90177),o=n(5666);function c(e){let{readingTime:t}=e,n=function(){let{selectMessage:e}=(0,i.c)();return t=>{let n=Math.ceil(t);return e(n,(0,a.I)({id:"theme.blog.post.readingTime.plurals",description:'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One min read|{readingTime} min read"},{readingTime:n}))}}();return(0,r.jsx)(r.Fragment,{children:n(t)})}function u(e){let{date:t,formattedDate:n}=e;return(0,r.jsx)("time",{dateTime:t,children:n})}function d(){return(0,r.jsx)(r.Fragment,{children:" \xb7 "})}function m(e){let{className:t}=e,{metadata:n}=(0,o.nO)(),{date:a,readingTime:i}=n,m=(0,s.P)({day:"numeric",month:"long",year:"numeric",timeZone:"UTC"});return(0,r.jsxs)("div",{className:(0,l.Z)("container_x5Un","margin-vert--md",t),children:[(0,r.jsx)(u,{date:a,formattedDate:m.format(new Date(a))}),void 0!==i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{}),(0,r.jsx)(c,{readingTime:i})]})]})}},37147:function(e,t,n){n.d(t,{Z:()=>s});var r=n(85893);n(67294);var l=n(90496),a=n(35363),i=n(5666);function s(e){let{className:t}=e,{metadata:n,isBlogPostPage:s}=(0,i.nO)(),{permalink:o,title:c}=n;return(0,r.jsx)(s?"h1":"h2",{className:(0,l.Z)("title_UBNu",t),children:s?c:(0,r.jsx)(a.Z,{to:o,children:c})})}},81061:function(e,t,n){n.d(t,{Z:()=>i});var r=n(85893);n(67294);var l=n(57335),a=n(5666);function i(){let{assets:e,metadata:t}=(0,a.nO)(),{title:n,description:i,date:s,tags:o,authors:c,frontMatter:u}=t,{keywords:d}=u,m=e.image??u.image;return(0,r.jsxs)(l.d,{title:u.title_meta??n,description:i,keywords:d,image:m,children:[(0,r.jsx)("meta",{property:"og:type",content:"article"}),(0,r.jsx)("meta",{property:"article:published_time",content:s}),c.some(e=>e.url)&&(0,r.jsx)("meta",{property:"article:author",content:c.map(e=>e.url).filter(Boolean).join(",")}),o.length>0&&(0,r.jsx)("meta",{property:"article:tag",content:o.map(e=>e.label).join(",")})]})}},2769:function(e,t,n){n.d(t,{Z:()=>m});var r=n(85893),l=n(67294),a=n(90496),i=n(96700),s=n(71607),o=n(97812);let c={details:"details_Nokh",isBrowser:"isBrowser_QrB5",collapsibleContent:"collapsibleContent_EoA1"};function u(e){return!!e&&("SUMMARY"===e.tagName||u(e.parentElement))}function d(e){let{summary:t,children:n,...d}=e;(0,i.Z)().collectAnchor(d.id);let m=(0,s.Z)(),h=(0,l.useRef)(null),{collapsed:f,setCollapsed:g}=(0,o.u)({initialState:!d.open}),[x,p]=(0,l.useState)(d.open),j=l.isValidElement(t)?t:(0,r.jsx)("summary",{children:t??"Details"});return(0,r.jsxs)("details",{...d,ref:h,open:x,"data-collapsed":f,className:(0,a.Z)(c.details,m&&c.isBrowser,d.className),onMouseDown:e=>{u(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();let t=e.target;u(t)&&function e(t,n){return!!t&&(t===n||e(t.parentElement,n))}(t,h.current)&&(e.preventDefault(),f?(g(!1),p(!0)):g(!0))},children:[j,(0,r.jsx)(o.z,{lazy:!1,collapsed:f,onCollapseTransitionEnd:e=>{g(e),p(!e)},children:(0,r.jsx)("div",{className:c.collapsibleContent,children:n})})]})}function m(e){let{...t}=e;return(0,r.jsx)(d,{...t,className:(0,a.Z)("alert alert--info","details_Cn_P",t.className)})}},84015:function(e,t,n){n.d(t,{Z:()=>B});var r=n(85893),l=n(67294),a=n(80980),i=n(53327),s=n(95998);function o(e){return(0,r.jsx)("code",{...e})}function c(e){return void 0!==e.children&&l.Children.toArray(e.children).every(e=>"string"==typeof e&&!e.includes("\n"))?(0,r.jsx)(o,{...e}):(0,r.jsx)(s.Z,{...e})}var u=n(35363),d=n(2769);function m(e){let t=l.Children.toArray(e.children),n=t.find(e=>l.isValidElement(e)&&"summary"===e.type),a=(0,r.jsx)(r.Fragment,{children:t.filter(e=>e!==n)});return(0,r.jsx)(d.Z,{...e,summary:n,children:a})}var h=n(57922);function f(e){return(0,r.jsx)(h.Z,{...e})}var g=n(90496);let x={containsTaskList:"containsTaskList_k9gM"};var p=n(96700),j=n(49356),v=n(67490),b=n(85108),N=n(26378),y=n(45245),k=n(57396);async function Z(e){let{id:t,text:n,config:r}=e;k.Z.mermaidAPI.initialize(r);try{return await k.Z.render(t,n)}catch(e){throw document.querySelector(`#d${t}`)?.remove(),e}}function _(e){let{renderResult:t}=e,n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=n.current;t.bindFunctions?.(e)},[t]),(0,r.jsx)("div",{ref:n,className:"docusaurus-mermaid-container container_RUsj",dangerouslySetInnerHTML:{__html:t.svg}})}function w(e){let{value:t}=e,n=function(e){let{text:t,config:n}=e,[r,a]=(0,l.useState)(null),i=(0,l.useState)(`mermaid-svg-${Math.round(1e7*Math.random())}`)[0],s=function(){let{colorMode:e}=(0,y.I)(),t=(0,N.L)().mermaid,n=t.theme[e],{options:r}=t;return(0,l.useMemo)(()=>({startOnLoad:!1,...r,theme:n}),[n,r])}(),o=n??s;return(0,l.useEffect)(()=>{Z({id:i,text:t,config:o}).then(a).catch(e=>{a(()=>{throw e})})},[i,t,o]),r}({text:t});return null===n?null:(0,r.jsx)(_,{renderResult:n})}let C={...{Head:i.Z,details:m,Details:m,code:c,a:function(e){return(0,r.jsx)(u.Z,{...e})},pre:function(e){return(0,r.jsx)(r.Fragment,{children:e.children})},ul:function(e){return(0,r.jsx)("ul",{...e,className:function(e){if(void 0!==e)return(0,g.Z)(e,e?.includes("contains-task-list")&&x.containsTaskList)}(e.className)})},li:function(e){return(0,p.Z)().collectAnchor(e.id),(0,r.jsx)("li",{...e})},img:function(e){var t;return(0,r.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,g.Z)(t,"img_vXGZ"))})},h1:e=>(0,r.jsx)(f,{as:"h1",...e}),h2:e=>(0,r.jsx)(f,{as:"h2",...e}),h3:e=>(0,r.jsx)(f,{as:"h3",...e}),h4:e=>(0,r.jsx)(f,{as:"h4",...e}),h5:e=>(0,r.jsx)(f,{as:"h5",...e}),h6:e=>(0,r.jsx)(f,{as:"h6",...e}),admonition:j.Z,mermaid:function(e){return(0,r.jsx)(v.Z,{fallback:e=>(0,r.jsx)(b.Ac,{...e}),children:(0,r.jsx)(w,{...e})})}},Code:c,Highlight:function(e){let{children:t,color:n}=e;return(0,r.jsx)("span",{style:{backgroundColor:n,borderRadius:"2px",color:"#fff",padding:"0.2rem"},children:t})},TweetQuote:function(e){let{url:t,handle:n,name:l,job:a,children:i}=e,s=`https://unavatar.io/x/${n}`,o=`https://x.com/${n}`;return(0,r.jsxs)("figure",{className:"tweetQuote_h8Rz",children:[(0,r.jsx)("blockquote",{children:(0,r.jsx)(u.Z,{to:t,children:i})}),(0,r.jsx)("figcaption",{children:(0,r.jsx)(u.Z,{to:o,rel:"nofollow",children:(0,r.jsxs)("div",{className:"avatar",children:[(0,r.jsx)("img",{alt:l,className:(0,g.Z)("avatar__photo","avatarImg_b51M"),src:s}),(0,r.jsxs)("div",{className:(0,g.Z)("avatar__intro"),children:[(0,r.jsx)("strong",{className:"avatar__name",children:(0,r.jsx)("cite",{children:l})}),(0,r.jsx)("small",{className:"avatar__subtitle",itemProp:"description",children:a})]})]})})})]})}};function B(e){let{children:t}=e;return(0,r.jsx)(a.Z,{components:C,children:t})}},65773:function(e,t,n){n.d(t,{Z:()=>i});var r=n(85893);n(67294);var l=n(90496),a=n(35363);function i(e){let{permalink:t,title:n,subLabel:i,isNext:s}=e;return(0,r.jsxs)(a.Z,{className:(0,l.Z)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[i&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:i}),(0,r.jsx)("div",{className:"pagination-nav__label",children:n})]})}},4458:function(e,t,n){n.d(t,{Z:()=>i});var r=n(85893);n(67294);var l=n(90496),a=n(89477);function i(e){let{className:t,...n}=e;return(0,r.jsx)("div",{className:(0,l.Z)("tableOfContents_RLlU","thin-scrollbar",t),children:(0,r.jsx)(a.Z,{...n,linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})})}},89477:function(e,t,n){n.d(t,{Z:()=>c});var r=n(85893),l=n(67294),a=n(26378);function i(e){let t=e.getBoundingClientRect();return t.top===t.bottom?i(e.parentNode):t}var s=n(35363);let o=l.memo(function e(t){let{toc:n,className:l,linkClassName:a,isChild:i}=t;return n.length?(0,r.jsx)("ul",{className:i?void 0:l,children:n.map(t=>(0,r.jsxs)("li",{children:[(0,r.jsx)(s.Z,{to:`#${t.id}`,className:a??void 0,dangerouslySetInnerHTML:{__html:t.value}}),(0,r.jsx)(e,{isChild:!0,toc:t.children,className:l,linkClassName:a})]},t.id))}):null});function c(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:s="table-of-contents__link",linkActiveClassName:c,minHeadingLevel:u,maxHeadingLevel:d,...m}=e,h=(0,a.L)(),f=u??h.tableOfContents.minHeadingLevel,g=d??h.tableOfContents.maxHeadingLevel,x=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:r}=e;return(0,l.useMemo)(()=>(function e(t){let{toc:n,minHeadingLevel:r,maxHeadingLevel:l}=t;return n.flatMap(t=>{let n=e({toc:t.children,minHeadingLevel:r,maxHeadingLevel:l});return t.level>=r&&t.level<=l?[{...t,children:n}]:n})})({toc:function(e){let t=e.map(e=>({...e,parentIndex:-1,children:[]})),n=Array(7).fill(-1);t.forEach((e,t)=>{let r=n.slice(2,e.level);e.parentIndex=Math.max(...r),n[e.level]=t});let r=[];return t.forEach(e=>{let{parentIndex:n,...l}=e;n>=0?t[n].children.push(l):r.push(l)}),r}(t),minHeadingLevel:n,maxHeadingLevel:r}),[t,n,r])}({toc:t,minHeadingLevel:f,maxHeadingLevel:g});var p=(0,l.useMemo)(()=>{if(s&&c)return{linkClassName:s,linkActiveClassName:c,minHeadingLevel:f,maxHeadingLevel:g}},[s,c,f,g]);let j=(0,l.useRef)(void 0),v=function(){let e=(0,l.useRef)(0),{navbar:{hideOnScroll:t}}=(0,a.L)();return(0,l.useEffect)(()=>{e.current=t?0:document.querySelector(".navbar").clientHeight},[t]),e}();return(0,l.useEffect)(()=>{if(!p)return()=>{};let{linkClassName:e,linkActiveClassName:t,minHeadingLevel:n,maxHeadingLevel:r}=p;function l(){let l=Array.from(document.getElementsByClassName(e)),a=function(e,t){let{anchorTopOffset:n}=t,r=e.find(e=>i(e).top>=n);if(r){var l;return(l=i(r)).top>0&&l.bottom<window.innerHeight/2?r:e[e.indexOf(r)-1]??null}return e[e.length-1]??null}(function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e,r=[];for(let e=t;e<=n;e+=1)r.push(`h${e}.anchor`);return Array.from(document.querySelectorAll(r.join()))}({minHeadingLevel:n,maxHeadingLevel:r}),{anchorTopOffset:v.current}),s=l.find(e=>a&&a.id===decodeURIComponent(e.href.substring(e.href.indexOf("#")+1)));l.forEach(e=>{e===s?(j.current&&j.current!==e&&j.current.classList.remove(t),e.classList.add(t),j.current=e):e.classList.remove(t)})}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}},[p,v]),(0,r.jsx)(o,{toc:x,className:n,linkClassName:s,...m})}},90177:function(e,t,n){n.d(t,{P:()=>l});var r=n(8156);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{i18n:{currentLocale:t}}=(0,r.Z)(),n=function(){let{i18n:{currentLocale:e,localeConfigs:t}}=(0,r.Z)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}},11660:function(e,t,n){n.d(t,{c:()=>o});var r=n(67294),l=n(8156);let a=["zero","one","two","few","many","other"];function i(e){return a.filter(t=>e.includes(t))}let s={locale:"en",pluralForms:i(["one","other"]),select:e=>1===e?"one":"other"};function o(){let e=function(){let{i18n:{currentLocale:e}}=(0,l.Z)();return(0,r.useMemo)(()=>{try{let t=new Intl.PluralRules(e);return{locale:e,pluralForms:i(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".
|
|
Docusaurus will fallback to the default (English) implementation.
|
|
Error: ${t.message}
|
|
`),s}},[e])}();return{selectMessage:(t,n)=>(function(e,t,n){let r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);let l=n.select(t);return r[Math.min(n.pluralForms.indexOf(l),r.length-1)]})(n,t,e)}}},56497:function(e,t,n){n.d(t,{Z:()=>a});var r=n(85893);n(67294);var l=n(71607);function a(e){let{children:t,fallback:n}=e;return(0,l.Z)()?(0,r.jsx)(r.Fragment,{children:t?.()}):n??null}},61420:function(e,t,n){n.d(t,{Z:()=>b});var r=n(85893),l=n(67294),a=n(5666),i=n(37147),s=n(54505),o=n(90496),c=n(35363);let u={image:"image_oRbT"};function d(e){let{author:t,className:n}=e,{name:l,url:a,imageURL:i}=t;return(0,r.jsx)("div",{className:(0,o.Z)("avatar margin-bottom--sm",n),children:i&&(0,r.jsx)(c.Z,{className:"avatar__photo-link avatar__photo",href:a,children:(0,r.jsx)("img",{className:u.image,src:i,alt:l,onError:e=>{e.currentTarget.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600" fill="none" stroke="%2325c2a0" stroke-width="30" version="1.1"><circle cx="300" cy="230" r="115"/><path stroke-linecap="butt" d="M106.81863443903,481.4 a205,205 1 0,1 386.36273112194,0"/></svg>'}})})})}function m(e){let{expanded:t,...n}=e;return t?(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",width:"20",height:"20",fill:"currentColor",...n,children:(0,r.jsx)("path",{d:"M783.915092 1009.031953l-271.898251-277.615587-271.930737 277.550617a49.214558 49.214558 0 0 1-70.752018 0 51.780862 51.780862 0 0 1 0-72.246322l307.274261-313.706262a49.279528 49.279528 0 0 1 70.784503 0l307.33923 313.706262a51.975771 51.975771 0 0 1 0 72.311292 49.409467 49.409467 0 0 1-70.816988 0z m-307.306745-608.05155L169.269117 87.274141A51.975771 51.975771 0 0 1 169.269117 14.96285a49.409467 49.409467 0 0 1 70.816987 0l271.930737 277.615586L783.850122 14.96285a49.409467 49.409467 0 0 1 70.816988 0 51.975771 51.975771 0 0 1 0 72.311291l-307.33923 313.706262a49.376982 49.376982 0 0 1-70.719533 0z"})}):(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",width:"20",height:"20",fill:"currentColor",...n,children:(0,r.jsx)("path",{d:"M476.612887 1009.12034L169.240699 695.380437a51.981345 51.981345 0 0 1 0-72.319045 49.382277 49.382277 0 0 1 70.824582 0l271.959897 277.645356 271.862433-277.645356a49.382277 49.382277 0 0 1 70.824582 0 51.981345 51.981345 0 0 1 0 72.319045l-307.307212 313.739903a49.447254 49.447254 0 0 1-70.792094 0z m307.274724-608.116755L511.99269 123.455693l-271.959897 277.645357a49.382277 49.382277 0 0 1-70.824582 0 51.981345 51.981345 0 0 1 0-72.319045L476.580399 15.042102a49.382277 49.382277 0 0 1 70.727117 0l307.372188 313.739903a51.981345 51.981345 0 0 1 0 72.319045 49.414766 49.414766 0 0 1-70.824582 0z"})})}let h={imageOnlyAuthorRow:"imageOnlyAuthorRow_WiD6",imageOnlyAuthorCol:"imageOnlyAuthorCol_uiac",toggleButton:"toggleButton_WvRg"};function f(e){let{className:t}=e,{metadata:{authors:n},assets:i}=(0,a.nO)(),[s,c]=(0,l.useState)(!1);if(0===n.length)return null;let u=n.slice(0,s?n.length:10);return(0,r.jsxs)("div",{className:(0,o.Z)("margin-top--md margin-bottom--sm",h.imageOnlyAuthorRow,t),children:[u.map((e,t)=>(0,r.jsx)("div",{className:h.imageOnlyAuthorCol,children:(0,r.jsx)(d,{author:{...e,imageURL:i.authorsImageUrls[t]??e.imageURL}})},t)),n.length>10&&(0,r.jsx)("button",{className:(0,o.Z)("clean-btn",h.toggleButton),type:"button",onClick:()=>c(e=>!e),"aria-label":"expand",children:(0,r.jsx)(m,{expanded:s})})]})}let g={changelogItemTitleList:"changelogItemTitleList_sueG"};function x(){let{isBlogPostPage:e}=(0,a.nO)();return(0,r.jsx)(i.Z,{className:e?void 0:g.changelogItemTitleList})}function p(){return(0,r.jsxs)("header",{children:[(0,r.jsx)(x,{}),(0,r.jsx)(s.Z,{}),(0,r.jsx)(f,{})]})}var j=n(76460),v=n(90437);function b(e){let{children:t}=e;return(0,r.jsxs)(j.Z,{className:"changelogItemContainer_jeDt",children:[(0,r.jsx)(p,{}),(0,r.jsx)(v.Z,{children:t})]})}},70944:function(e,t,n){n.r(t),n.d(t,{default:()=>j});var r=n(85893);n(67294);var l=n(90496),a=n(77827),i=n(35363),s=n(57335),o=n(55951),c=n(5666),u=n(81061),d=n(9942),m=n(61420),h=n(65773);function f(e){let{nextItem:t,prevItem:n}=e;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,a.I)({id:"theme.changelog.post.paginator.navAriaLabel",message:"Changelog item navigation",description:"The ARIA label for the changelog pagination"}),children:[n&&(0,r.jsx)(h.Z,{...n,subLabel:(0,r.jsx)(a.Z,{id:"theme.changelog.post.paginator.newerRelease",description:"The changelog button label to navigate to the newer release",children:"Newer release"})}),t&&(0,r.jsx)(h.Z,{...t,subLabel:(0,r.jsx)(a.Z,{id:"theme.changelog.post.paginator.olderRelease",description:"The changelog button label to navigate to the older release",children:"Older release"}),isNext:!0})]})}var g=n(4458);function x(){let{metadata:e}=(0,c.nO)(),{listPageLink:t}=e;return(0,r.jsx)(i.Z,{to:t,children:(0,r.jsx)(a.Z,{id:"changelog.backLink",children:"\u2190 Back to index page"})})}function p(e){let{sidebar:t,children:n}=e,{metadata:l,toc:a}=(0,c.nO)(),{nextItem:i,prevItem:s,frontMatter:o}=l,{hide_table_of_contents:u,toc_min_heading_level:h,toc_max_heading_level:p}=o;return(0,r.jsxs)(d.Z,{sidebar:t,toc:!u&&a.length>0?(0,r.jsx)(g.Z,{toc:a,minHeadingLevel:h,maxHeadingLevel:p}):void 0,children:[(0,r.jsx)(x,{}),(0,r.jsx)(m.Z,{children:n}),(i||s)&&(0,r.jsx)(f,{nextItem:i,prevItem:s})]})}function j(e){let t=e.content;return(0,r.jsx)(c.n4,{content:e.content,isBlogPostPage:!0,children:(0,r.jsxs)(s.FG,{className:(0,l.Z)(o.k.wrapper.blogPages,o.k.page.blogPostPage),children:[(0,r.jsx)(u.Z,{}),(0,r.jsx)(p,{sidebar:e.sidebar,children:(0,r.jsx)(t,{})})]})})}},95998:function(e,t,n){n.d(t,{Z:()=>et});var r,l={};n.r(l),n.d(l,{ButtonExample:()=>w});var a=n(85893),i=n(67294),s=n(90496),o=n(71607),c=n(10075),u=n(77827),d=n(8156),m=n(56497),h=n(85108),f=n(45245),g=n(26378);function x(){let{prism:e}=(0,g.L)(),{colorMode:t}=(0,f.I)(),n=e.theme,r=e.darkTheme||n;return"dark"===t?r:n}var p=n(67490);function j(e){let{children:t}=e;return(0,a.jsx)("div",{className:(0,s.Z)("playgroundHeader_Tvsk"),children:t})}function v(){return(0,a.jsx)("div",{children:"Loading..."})}function b(){return(0,a.jsx)(m.Z,{fallback:(0,a.jsx)(v,{}),children:()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z,{fallback:e=>(0,a.jsx)(h.Ac,{...e}),children:(0,a.jsx)(c.i5,{})}),(0,a.jsx)(c.IF,{})]})})}function N(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{children:(0,a.jsx)(u.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,a.jsx)("div",{className:"playgroundPreview_mApW",children:(0,a.jsx)(b,{})})]})}function y(){let e=(0,o.Z)();return(0,a.jsx)(c.uz,{className:"playgroundEditor_TySg"},String(e))}function k(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{children:(0,a.jsx)(u.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,a.jsx)(y,{})]})}let Z=e=>`${e};`;function _(e){let{children:t,transformCode:n,...r}=e,{siteConfig:{themeConfig:l}}=(0,d.Z)(),{liveCodeBlock:{playgroundPosition:i}}=l,s=x(),o=r.metastring?.includes("noInline")??!1;return(0,a.jsx)("div",{className:"playgroundContainer_6Ior",children:(0,a.jsx)(c.nu,{code:t?.replace(/\n$/,""),noInline:o,transformCode:n??Z,theme:s,...r,children:"top"===i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N,{}),(0,a.jsx)(k,{})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{}),(0,a.jsx)(N,{})]})})})}function w(e){return(0,a.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}let C={React:i,...i,...l};var B=n(55951),L=n(6324),I=n.n(L);let E=/title=(?<quote>["'])(?<title>.*?)\1/,T=/\{(?<range>[\d,-]+)\}/,A={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},M={...A,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:""}},O=Object.keys(A);function H(e,t){let n=e.map(e=>{let{start:n,end:r}=M[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 R(e){let{as:t,...n}=e,r=function(e){let t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach(e=>{let[r,l]=e,a=t[r];a&&"string"==typeof l&&(n[a]=l)}),n}(x());return(0,a.jsx)(t,{...n,style:r,className:(0,s.Z)(n.className,"codeBlockContainer_jDV4",B.k.common.codeBlock)})}let $={codeBlockContent:"codeBlockContent_vx7S",codeBlockTitle:"codeBlockTitle_bdru",codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q",buttonGroup:"buttonGroup_cUGO"};function z(e){let{children:t,className:n}=e;return(0,a.jsx)(R,{as:"pre",tabIndex:0,className:(0,s.Z)($.codeBlockStandalone,"thin-scrollbar",n),children:(0,a.jsx)("code",{className:$.codeBlockLines,children:t})})}var P=n(50923);let S={attributes:!0,characterData:!0,childList:!0,subtree:!0};var F=n(7316);let D={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"};function U(e){let{line:t,classNames:n,showLineNumbers:r,getLineProps:l,getTokenProps:i}=e,o=function(e){let t=1===e.length&&"\n"===e[0].content?e[0]:void 0;return t?[{...t,content:""}]:e}(t),c=l({line:o,className:(0,s.Z)(n,r&&D.codeLine)}),u=o.map((e,t)=>(0,a.jsx)("span",{...i({token:e})},t));return(0,a.jsxs)("span",{...c,children:[r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:D.codeLineNumber}),(0,a.jsx)("span",{className:D.codeLineContent,children:u})]}):u,(0,a.jsx)("br",{})]})}var W=n(44771);function V(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,a.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 G(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}let q={copyButtonCopied:"copyButtonCopied_OkN_",copyButtonIcons:"copyButtonIcons_OqsO",copyButtonIcon:"copyButtonIcon_PgCn",copyButtonSuccessIcon:"copyButtonSuccessIcon_bsQG"};function Q(e){let{code:t,className:n}=e,[r,l]=(0,i.useState)(!1),o=(0,i.useRef)(void 0),c=(0,i.useCallback)(()=>{(0,W.Z)(t),l(!0),o.current=window.setTimeout(()=>{l(!1)},1e3)},[t]);return(0,i.useEffect)(()=>()=>window.clearTimeout(o.current),[]),(0,a.jsx)("button",{type:"button","aria-label":r?(0,u.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,u.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,u.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,s.Z)("clean-btn",n,q.copyButton,r&&q.copyButtonCopied),onClick:c,children:(0,a.jsxs)("span",{className:q.copyButtonIcons,"aria-hidden":"true",children:[(0,a.jsx)(V,{className:q.copyButtonIcon}),(0,a.jsx)(G,{className:q.copyButtonSuccessIcon})]})})}function X(e){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,a.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"})})}let Y={wordWrapButtonIcon:"wordWrapButtonIcon_MQXS",wordWrapButtonEnabled:"wordWrapButtonEnabled_TBIH"};function J(e){let{className:t,onClick:n,isEnabled:r}=e,l=(0,u.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,a.jsx)("button",{type:"button",onClick:n,className:(0,s.Z)("clean-btn",t,r&&Y.wordWrapButtonEnabled),"aria-label":l,title:l,children:(0,a.jsx)(X,{className:Y.wordWrapButtonIcon,"aria-hidden":"true"})})}function K(e){var t;let{children:n,className:r="",metastring:l,title:c,showLineNumbers:u,language:d}=e,{prism:{defaultLanguage:m,magicComments:h}}=(0,g.L)(),f=(t=d??function(e){let t=e.split(" ").find(e=>e.startsWith("language-"));return t?.replace(/language-/,"")}(r)??m,t?.toLowerCase()),p=x(),j=function(){let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),l=(0,i.useRef)(null),a=(0,i.useCallback)(()=>{let n=l.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t(e=>!e)},[l,e]),s=(0,i.useCallback)(()=>{let{scrollWidth:e,clientWidth:t}=l.current;r(e>t||l.current.querySelector("code").hasAttribute("style"))},[l]),[o,c]=(0,i.useState)(),u=(0,i.useCallback)(()=>{c(l.current?.closest("[role=tabpanel][hidden]"))},[l,c]);return(0,i.useEffect)(()=>{u()},[u]),!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S,r=(0,P.zX)(t),l=(0,P.Ql)(n);(0,i.useEffect)(()=>{let t=new MutationObserver(r);return e&&t.observe(e,l),()=>t.disconnect()},[e,r,l])}(o,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(s(),u())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1}),(0,i.useEffect)(()=>{s()},[e,s]),(0,i.useEffect)(()=>(window.addEventListener("resize",s,{passive:!0}),()=>{window.removeEventListener("resize",s)}),[s]),{codeBlockRef:l,isEnabled:e,isCodeScrollable:n,toggle:a}}(),v=(0,o.Z)(),b=(l?.match(E)?.groups.title??"")||c,{lineClassNames:N,code:y}=function(e,t){let n=e.replace(/\r?\n$/,"");return function(e,t){let{metastring:n,magicComments:r}=t;if(n&&T.test(n)){let t=n.match(T).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 l=r[0].className;return{lineClassNames:Object.fromEntries(I()(t).filter(e=>e>0).map(e=>[e-1,[l]])),code:e}}return null}(n,{...t})??function(e,t){let{language:n,magicComments:r}=t;if(void 0===n)return{lineClassNames:{},code:e};let l=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return H(["js","jsBlock"],t);case"jsx":case"tsx":return H(["js","jsBlock","jsx"],t);case"html":return H(["js","jsBlock","html"],t);case"python":case"py":case"bash":return H(["bash"],t);case"markdown":case"md":return H(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return H(["tex"],t);case"lua":case"haskell":return H(["lua"],t);case"sql":return H(["lua","jsBlock"],t);case"wasm":return H(["wasm"],t);case"vb":case"vba":case"visual-basic":return H(["vb","rem"],t);case"vbnet":return H(["vbnet","rem"],t);case"batch":return H(["rem"],t);case"basic":return H(["rem","f90"],t);case"fsharp":return H(["js","ml"],t);case"ocaml":case"sml":return H(["ml"],t);case"fortran":return H(["f90"],t);case"cobol":return H(["cobol"],t);default:return H(O,t)}}(n,r),a=e.split(/\r?\n/),i=Object.fromEntries(r.map(e=>[e.className,{start:0,range:""}])),s=Object.fromEntries(r.filter(e=>e.line).map(e=>{let{className:t,line:n}=e;return[n,t]})),o=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:t,block:n}=e;return[n.start,t]})),c=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:t,block:n}=e;return[n.end,t]}));for(let e=0;e<a.length;){let t=a[e].match(l);if(!t){e+=1;continue}let n=t.slice(1).find(e=>void 0!==e);s[n]?i[s[n]].range+=`${e},`:o[n]?i[o[n]].start=e:c[n]&&(i[c[n]].range+=`${i[c[n]].start}-${e-1},`),a.splice(e,1)}let u={};return Object.entries(i).forEach(e=>{let[t,{range:n}]=e;I()(n).forEach(e=>{u[e]??=[],u[e].push(t)})}),{code:a.join("\n"),lineClassNames:u}}(n,{...t})}(n,{metastring:l,language:f,magicComments:h}),k=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:u,metastring:l});return(0,a.jsxs)(R,{as:"div",className:(0,s.Z)(r,f&&!r.includes(`language-${f}`)&&`language-${f}`),children:[b&&(0,a.jsx)("div",{className:$.codeBlockTitle,children:b}),(0,a.jsxs)("div",{className:$.codeBlockContent,children:[(0,a.jsx)(F.y$,{theme:p,code:y,language:f??"text",children:e=>{let{className:t,style:n,tokens:r,getLineProps:l,getTokenProps:i}=e;return(0,a.jsx)("pre",{tabIndex:0,ref:j.codeBlockRef,className:(0,s.Z)(t,$.codeBlock,"thin-scrollbar"),style:n,children:(0,a.jsx)("code",{className:(0,s.Z)($.codeBlockLines,void 0!==k&&$.codeBlockLinesWithNumbering),style:void 0===k?void 0:{counterReset:`line-count ${k-1}`},children:r.map((e,t)=>(0,a.jsx)(U,{line:e,getLineProps:l,getTokenProps:i,classNames:N[t],showLineNumbers:void 0!==k},t))})})}}),v?(0,a.jsxs)("div",{className:$.buttonGroup,children:[(j.isEnabled||j.isCodeScrollable)&&(0,a.jsx)(J,{className:$.codeButton,onClick:()=>j.toggle(),isEnabled:j.isEnabled}),(0,a.jsx)(Q,{className:$.codeButton,code:y})]}):null]})]})}let ee=(r=function(e){let{children:t,...n}=e,r=(0,o.Z)(),l=i.Children.toArray(t).some(e=>(0,i.isValidElement)(e))?t:Array.isArray(t)?t.join(""):t;return(0,a.jsx)("string"==typeof l?K:z,{...n,children:l},String(r))},function(e){return e.live?(0,a.jsx)(_,{scope:C,...e}):(0,a.jsx)(r,{...e})});function et(e){return(0,a.jsx)(ee,{...e})}}}]); |