docusaurus/assets/js/62b37705.0cec2813.js
2024-10-18 16:50:31 +00:00

1 line
No EOL
42 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["80220"],{77409:function(e,r,t){t.r(r),t.d(r,{metadata:()=>n,contentTitle:()=>u,default:()=>b,assets:()=>d,toc:()=>f,frontMatter:()=>l});var n=JSON.parse('{"id":"canary","title":"Canary releases","description":"Docusaurus has a canary releases system.","source":"@site/community/4-canary.mdx","sourceDirName":".","slug":"/canary","permalink":"/community/canary","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/community/4-canary.mdx","tags":[],"version":"current","lastUpdatedBy":"moonrailgun","lastUpdatedAt":1729270082000,"sidebarPosition":4,"frontMatter":{},"sidebar":"community","previous":{"title":"Contributing","permalink":"/community/contributing"},"next":{"title":"Release process","permalink":"/community/release-process"}}'),o=t("24246"),a=t("80980"),c=t("15398"),i=t("58636"),s=t("21143");let l={},u="Canary releases",d={},f=[{value:"Canary npm dist tag",id:"canary-npm-dist-tag",level:2},{value:"Using a canary release",id:"using-a-canary-release",level:2}];function p(e){let r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"canary-releases",children:"Canary releases"})}),"\n","\n",(0,o.jsxs)(s.mC,{children:[(0,o.jsx)(r.p,{children:"Docusaurus has a canary releases system."}),(0,o.jsxs)(r.p,{children:["It permits you to ",(0,o.jsx)(r.strong,{children:"test new unreleased features"})," as soon as the pull requests are merged on the ",(0,o.jsx)(r.a,{href:"/community/release-process#next-version",children:"next version"})," of Docusaurus."]}),(0,o.jsxs)(r.p,{children:["It is a good way to ",(0,o.jsx)(r.strong,{children:"give feedback to maintainers"}),", ensuring the newly implemented feature works as intended."]}),(0,o.jsxs)(r.admonition,{type:"note",children:[(0,o.jsx)(r.p,{children:"Using a canary release in production might seem risky, but in practice, it's not."}),(0,o.jsx)(r.p,{children:"A canary release passes all automated tests and is used in production by the Docusaurus site itself."})]}),(0,o.jsx)(s.UM,{children:(0,o.jsx)(r.admonition,{type:"warning",children:(0,o.jsxs)(r.p,{children:["The canary version shown below ",(0,o.jsx)(r.strong,{children:"may not be up-to-date"}),". Please go to the ",(0,o.jsx)(r.a,{href:"https://www.npmjs.com/package/@docusaurus/core?activeTab=versions",children:"npm page"})," to find the actual version name."]})})}),(0,o.jsx)(s.FS,{children:(0,o.jsx)(r.admonition,{type:"tip",children:(0,o.jsxs)(r.p,{children:["The canary version shown below is directly fetched from npm and ",(0,o.jsx)(r.strong,{children:"is up-to-date"}),". You can directly use these numbers in your package.json."]})})}),(0,o.jsx)(r.h2,{id:"canary-npm-dist-tag",children:"Canary npm dist tag"}),(0,o.jsxs)(r.p,{children:["For any code-related commit on ",(0,o.jsx)(r.code,{children:"main"}),", the continuous integration will publish a canary release under the ",(0,o.jsx)(r.code,{children:"@canary"})," npm dist tag. It generally takes up to 10 minutes."]}),(0,o.jsxs)(r.p,{children:["You can see on ",(0,o.jsx)(r.a,{href:"https://www.npmjs.com/package/@docusaurus/core?activeTab=versions",children:"npm"})," the current dist tags:"]}),(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsxs)(r.li,{children:[(0,o.jsx)(r.code,{children:"latest"}),": stable releases (Current: ",(0,o.jsx)(s.SR,{}),")"]}),"\n",(0,o.jsxs)(r.li,{children:[(0,o.jsx)(r.code,{children:"canary"}),": canary releases (",(0,o.jsx)(s.I1,{}),")"]}),"\n"]}),(0,o.jsx)(r.admonition,{type:"tip",children:(0,o.jsxs)(r.p,{children:["Make sure to use the latest canary release and check the publication date (sometimes the publish process fails). ",(0,o.jsx)(s.rv,{})]})}),(0,o.jsx)(r.admonition,{type:"note",children:(0,o.jsxs)(r.p,{children:["Canary versions follow the naming convention ",(0,o.jsx)(r.code,{children:"0.0.0-commitNumber"}),"."]})}),(0,o.jsx)(r.h2,{id:"using-a-canary-release",children:"Using a canary release"}),(0,o.jsxs)(r.p,{children:["Take the latest version published under the ",(0,o.jsx)(r.a,{href:"https://www.npmjs.com/package/@docusaurus/core?activeTab=versions",children:"canary npm dist tag"})," (",(0,o.jsx)(s.I1,{}),")."]}),(0,o.jsxs)(r.p,{children:["Use it for all the ",(0,o.jsx)(r.code,{children:"@docusaurus/*"})," dependencies in your ",(0,o.jsx)(r.code,{children:"package.json"}),":"]}),(0,o.jsx)(s.Hc,{}),(0,o.jsx)(r.p,{children:"Then, install the dependencies again and start your site:"}),(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(i.Z,{value:"npm",children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"npm install\nnpm start\n"})})}),(0,o.jsx)(i.Z,{value:"yarn",label:"Yarn",children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"yarn install\nyarn start\n"})})}),(0,o.jsx)(i.Z,{value:"pnpm",label:"pnpm",children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"pnpm install\npnpm start\n"})})})]}),(0,o.jsxs)(r.p,{children:["You can also upgrade the ",(0,o.jsx)(r.code,{children:"@docusaurus/*"})," packages with command line:"]}),(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(i.Z,{value:"npm",children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"npm install --save-exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})}),(0,o.jsx)(i.Z,{value:"yarn",label:"Yarn",children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"yarn add --exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})}),(0,o.jsx)(i.Z,{value:"pnpm",label:"pnpm",children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"pnpm add --save-exact @docusaurus/core@canary @docusaurus/preset-classic@canary\n"})})})]}),(0,o.jsxs)(r.admonition,{type:"warning",children:[(0,o.jsxs)(r.p,{children:["Make sure to include all the ",(0,o.jsx)(r.code,{children:"@docusaurus/*"})," packages."]}),(0,o.jsxs)(r.p,{children:["For canary releases, prefer using an exact version instead of a semver range (avoid the ",(0,o.jsx)(r.code,{children:"^"})," prefix)."]})]})]})]})}function b(e={}){let{wrapper:r}={...(0,a.a)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},58636:function(e,r,t){t.d(r,{Z:()=>c});var n=t("24246");t("27378");var o=t("90496");let a="tabItem_pnkT";function c(e){var r=e.children,t=e.hidden,c=e.className;return(0,n.jsx)("div",{role:"tabpanel",className:(0,o.Z)(a,c),hidden:t,children:r})}},15398:function(e,r,t){t.d(r,{Z:()=>P});var n=t("24246"),o=t("27378"),a=t("90496"),c=t("54947"),i=t("3620"),s=t("844"),l=t("97486"),u=t("32263"),d=t("16971");function f(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function p(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);c=!0);}catch(e){i=!0,n=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(i)throw n}}return a}}(e,r)||function(e,r){if(e){if("string"==typeof e)return f(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,r)}}(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){var r,t;return null!==(t=null===(r=o.Children.toArray(e).filter(function(e){return"\n"!==e}).map(function(e){var r,t;if(!e||(0,o.isValidElement)(e)&&(r=e.props)&&(void 0===r?"undefined":(t=r)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"&&"value"in r)return e;throw Error("Docusaurus error: Bad <Tabs> child <".concat("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.'))}))||void 0===r?void 0:r.filter(Boolean))&&void 0!==t?t:[]}function y(e){var r=e.value;return e.tabValues.some(function(e){return e.value===r})}var m=t("71607");let h="tabList_Qoir",j="tabItem_AQgk";function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}function g(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}function O(e){var r=e.className,t=e.block,o=e.selectedValue,i=e.selectValue,s=e.tabValues,l=[],u=(0,c.o5)().blockElementScrollPositionUntilNextRender,d=function(e){var r=e.currentTarget,t=s[l.indexOf(r)].value;t!==o&&(u(r),i(t))},f=function(e){var r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var t,n=l.indexOf(e.currentTarget)+1;r=null!==(t=l[n])&&void 0!==t?t:l[0];break;case"ArrowLeft":var o,a=l.indexOf(e.currentTarget)-1;r=null!==(o=l[a])&&void 0!==o?o:l[l.length-1]}null==r||r.focus()};return(0,n.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":t},r),children:s.map(function(e){var r=e.value,t=e.label,c=e.attributes;return(0,n.jsx)("li",g(v({role:"tab",tabIndex:o===r?0:-1,"aria-selected":o===r,ref:function(e){return l.push(e)},onKeyDown:f,onClick:d},c),{className:(0,a.Z)("tabs__item",j,null==c?void 0:c.className,{"tabs__item--active":o===r}),children:null!=t?t:r}),r)})})}function x(e){var r=e.lazy,t=e.children,c=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){var s=i.find(function(e){return e.props.value===c});return s?(0,o.cloneElement)(s,{className:(0,a.Z)("margin-top--md",s.props.className)}):null}return(0,n.jsx)("div",{className:"margin-top--md",children:i.map(function(e,r){return(0,o.cloneElement)(e,{key:r,hidden:e.props.value!==c})})})}function w(e){var r=function(e){var r,t,n,a,c,f,m,h,j,v,g,O,x,w,P=e.defaultValue,k=e.queryString,S=e.groupId;var E=(t=(r=e).values,n=r.children,(0,o.useMemo)(function(){var e=null!=t?t:b(n).map(function(e){var r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}});return!function(e){var r=(0,u.lx)(e,function(e,r){return e.value===r.value});if(r.length>0)throw Error('Docusaurus error: Duplicate values "'.concat(r.map(function(e){return e.value}).join(", "),'" found in <Tabs>. Every value needs to be unique.'))}(e),e},[t,n])),C=p((0,o.useState)(function(){return function(e){var r,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!y({value:t,tabValues:n}))throw Error('Docusaurus error: The <Tabs> has a defaultValue "'.concat(t,'" but none of its children has the corresponding value. Available values are: ').concat(n.map(function(e){return e.value}).join(", "),". If you intend to show no default tab, use defaultValue={null} instead."));return t}var o=null!==(r=n.find(function(e){return e.default}))&&void 0!==r?r:n[0];if(!o)throw Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:P,tabValues:E})}),2),N=C[0],B=C[1];var D=p((c=(a={queryString:void 0!==k&&k,groupId:S}).queryString,f=a.groupId,m=(0,i.k6)(),h=function(e){var r=e.queryString,t=void 0!==r&&r,n=e.groupId;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 null!=n?n:null}({queryString:void 0!==c&&c,groupId:f}),[(0,l._X)(h),(0,o.useCallback)(function(e){if(!!h){var r,t,n=new URLSearchParams(m.location.search);n.set(h,e),m.replace((r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},m.location),t=(t={search:n.toString()},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))}},[h,m])]),2),I=D[0],A=D[1];var T=p((v=(j=({groupId:S}).groupId)?"docusaurus.tab.".concat(j):null,O=(g=p((0,d.Nk)(v),2))[0],x=g[1],[O,(0,o.useCallback)(function(e){if(!!v)x.set(e)},[v,x])]),2),Z=T[0],L=T[1];var V=y({value:w=null!=I?I:Z,tabValues:E})?w:null;return(0,s.Z)(function(){V&&B(V)},[V]),{selectedValue:N,selectValue:(0,o.useCallback)(function(e){if(!y({value:e,tabValues:E}))throw Error("Can't select invalid tab value=".concat(e));B(e),A(e),L(e)},[A,L,E]),tabValues:E}}(e);return(0,n.jsxs)("div",{className:(0,a.Z)("tabs-container",h),children:[(0,n.jsx)(O,v({},r,e)),(0,n.jsx)(x,v({},r,e))]})}function P(e){var r=(0,m.Z)();return(0,n.jsx)(w,g(v({},e),{children:b(e.children)}),String(r))}},56497:function(e,r,t){t.d(r,{Z:function(){return a}});var n=t(24246);t(27378);var o=t(71607);function a(e){var r=e.children,t=e.fallback;return(0,o.Z)()?(0,n.jsx)(n.Fragment,{children:null==r?void 0:r()}):null!=t?t:null}},21143:function(e,r,t){t.d(r,{CW:function(){return j},FS:function(){return P},Fr:function(){return v},Hc:function(){return k},I1:function(){return b},SR:function(){return y},UM:function(){return w},Zl:function(){return O},mC:function(){return f},mq:function(){return x},rv:function(){return S}});var n=t(24246),o=t(27378),a=t(99887),c=t(90158),i=t(77827),s=t(35363),l=t(95998);function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}var d=o.createContext(null);function f(e){var r,t,a=e.children;var c=(r=(0,o.useState)(null),t=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);c=!0);}catch(e){i=!0,n=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(i)throw n}}return a}}(r,2)||function(e,r){if(e){if("string"==typeof e)return u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,r)}}(r,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=c[0],s=c[1],l=(0,o.useRef)(!0);return(0,o.useEffect)(function(){return l.current=!0,function(){l.current=!1}},[]),(0,o.useEffect)(function(){fetch("https://registry.npmjs.org/@docusaurus/core").then(function(e){return e.json()}).then(function(e){if(!!l.current){var r=Object.keys(e.versions).at(-1),t=e.time[r];s({name:r,time:t})}})},[]),(0,n.jsx)(d.Provider,{value:i,children:a})}function p(){var e,r,t=null===(e=(0,a.J)("default").preferredVersion)||void 0===e?void 0:e.name,n=(0,c.useVersions)("default"),o=(null!==(r=n.find(function(e){return"current"!==e.name}))&&void 0!==r?r:n[0]).name;return t&&"current"!==t?t:o}function b(){var e=(0,o.useContext)(d);return e?(0,n.jsx)("span",{children:(0,n.jsx)(i.Z,{description:"The hint text for the current canary version tag.",values:{canaryVersionName:(0,n.jsx)("b",{children:e.name})},children:"Current: {canaryVersionName}"})}):(0,n.jsx)("span",{children:(0,n.jsx)(i.Z,{description:"An example canary version tag when the actual version can't be fetched.",children:"Example: 0.0.0-4922"})})}function y(){var e=p();return(0,n.jsx)("span",{children:e})}function m(){return 3}function h(){return 2}function j(){return(0,n.jsx)("span",{children:3})}function v(){return(0,n.jsx)("span",{children:2})}function g(e){var r=e.branch;return(0,n.jsx)(s.Z,{to:"https://github.com/facebook/docusaurus/tree/".concat(r),children:(0,n.jsx)("code",{children:r})})}function O(){return(0,n.jsx)(g,{branch:"docusaurus-v".concat(2)})}function x(){return(0,n.jsx)(g,{branch:"main"})}function w(e){var r=e.children;return(0,o.useContext)(d)?null:r}function P(e){var r=e.children;return(0,o.useContext)(d)?r:null}function k(){var e,r,t=null!==(r=null===(e=(0,o.useContext)(d))||void 0===e?void 0:e.name)&&void 0!==r?r:"0.0.0-4922",a=p();return(0,n.jsx)(l.Z,{language:"diff",children:'- "@docusaurus/core": "^'.concat(a,'",\n- "@docusaurus/preset-classic": "^').concat(a,'",\n+ "@docusaurus/core": "').concat(t,'",\n+ "@docusaurus/preset-classic": "').concat(t,'",\n')})}function S(){var e,r=null===(e=(0,o.useContext)(d))||void 0===e?void 0:e.time;return r?(0,n.jsx)(i.Z,{values:{time:(0,n.jsx)("b",{children:new Date(r).toLocaleString()})},children:"The latest canary version that's available on npm is published at {time}."}):null}},95998:function(e,r,t){t.d(r,{Z:()=>eh});var n,o,a,c={};t.r(c),t.d(c,{ButtonExample:()=>T});var i=t("24246"),s=t("27378"),l=t("90496"),u=t("71607"),d=t("10075"),f=t("77827"),p=t("8156"),b=t("56497"),y=t("85108"),m=t("45245"),h=t("26378");function j(){var e=(0,h.L)().prism,r=(0,m.I)().colorMode,t=e.theme,n=e.darkTheme||t;return"dark"===r?n:t}var v=t("67490");let g="playgroundContainer_6Ior",O="playgroundHeader_Tvsk",x="playgroundEditor_TySg",w="playgroundPreview_mApW";function P(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}function k(e){var r=e.children;return(0,i.jsx)("div",{className:(0,l.Z)(O),children:r})}function S(){return(0,i.jsx)("div",{children:"Loading..."})}function E(){return(0,i.jsx)(b.Z,{fallback:(0,i.jsx)(S,{}),children:function(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v.Z,{fallback:function(e){return(0,i.jsx)(y.Ac,P({},e))},children:(0,i.jsx)(d.i5,{})}),(0,i.jsx)(d.IF,{})]})}})}function C(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k,{children:(0,i.jsx)(f.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,i.jsx)("div",{className:w,children:(0,i.jsx)(E,{})})]})}function N(){var e=(0,u.Z)();return(0,i.jsx)(d.uz,{className:x},String(e))}function B(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k,{children:(0,i.jsx)(f.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,i.jsx)(N,{})]})}var D=function(e){return"".concat(e,";")};function I(e){var r,t,n,o,a=e.children,c=e.transformCode,s=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++){if(t=a[n],!(r.indexOf(t)>=0))Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}}return o}(e,["children","transformCode"]),l=(0,p.Z)().siteConfig.themeConfig.liveCodeBlock.playgroundPosition,u=j(),f=null!==(o=null===(n=s.metastring)||void 0===n?void 0:n.includes("noInline"))&&void 0!==o&&o;return(0,i.jsx)("div",{className:g,children:(0,i.jsx)(d.nu,(r=P({code:null==a?void 0:a.replace(/\n$/,""),noInline:f,transformCode:null!=c?c:D,theme:u},s),t=(t={children:"top"===l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C,{}),(0,i.jsx)(B,{})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B,{}),(0,i.jsx)(C,{})]})},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))})}function A(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}function T(e){var r,t;return(0,i.jsx)("button",(r=A({type:"button"},e),t=(t={style:A({backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer"},e.style)},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))}let Z=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({React:s},s,c);var L=t("55951"),V=t("6324"),_=t.n(V);function M(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function R(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);c=!0);}catch(e){i=!0,n=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(i)throw n}}return a}}(e,r)||function(e,r){if(e){if("string"==typeof e)return M(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,r)}}(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var q=RegExp("title=(?<quote>[\"'])(?<title>.*?)\\1"),U=RegExp("\\{(?<range>[\\d,-]+)\\}"),F={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};var W=(n=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},F),o=(o={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.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n),H=Object.keys(F);function z(e,r){var t=e.map(function(e){var t=W[e],n=t.start,o=t.end;return"(?:".concat(n,"\\s*(").concat(r.flatMap(function(e){var r,t;return[e.line,null===(r=e.block)||void 0===r?void 0:r.start,null===(t=e.block)||void 0===t?void 0:t.end].filter(Boolean)}).join("|"),")\\s*").concat(o,")")}).join("|");return new RegExp("^\\s*(?:".concat(t,")\\s*$"))}let $="codeBlockContainer_jDV4";function Y(e){var r,t,n,o,a=e.as,c=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++){if(t=a[n],!(r.indexOf(t)>=0))Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}}return o}(e,["as"]);var s=(r={color:"--prism-color",backgroundColor:"--prism-background-color"},t={},Object.entries(j().plain).forEach(function(e){var n=R(e,2),o=n[0],a=n[1],c=r[o];c&&"string"==typeof a&&(t[c]=a)}),t);return(0,i.jsx)(a,(n=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},c),o=(o={style:s,className:(0,l.Z)(c.className,$,L.k.common.codeBlock)},o),Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))}let G={codeBlockContent:"codeBlockContent_vx7S",codeBlockTitle:"codeBlockTitle_bdru",codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q",buttonGroup:"buttonGroup_cUGO"};function Q(e){var r=e.children,t=e.className;return(0,i.jsx)(Y,{as:"pre",tabIndex:0,className:(0,l.Z)(G.codeBlockStandalone,"thin-scrollbar",t),children:(0,i.jsx)("code",{className:G.codeBlockLines,children:r})})}var J=t("50923"),X={attributes:!0,characterData:!0,childList:!0,subtree:!0};function K(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function ee(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);c=!0);}catch(e){i=!0,n=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(i)throw n}}return a}}(e,r)||function(e,r){if(e){if("string"==typeof e)return K(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return K(e,r)}}(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var er=t("7316");let et={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"};function en(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}function eo(e){var r,t,n=e.line,o=e.classNames,a=e.showLineNumbers,c=e.getLineProps,s=e.getTokenProps;1===n.length&&"\n"===n[0].content&&(n[0].content="");var u=c({line:n,className:(0,l.Z)(o,a&&et.codeLine)}),d=n.map(function(e,r){return(0,i.jsx)("span",en({},s({token:e})),r)});return(0,i.jsxs)("span",(r=en({},u),t=(t={children:[a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:et.codeLineNumber}),(0,i.jsx)("span",{className:et.codeLineContent,children:d})]}):d,(0,i.jsx)("br",{})]},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))}var ea=t("44771");function ec(e){var r,t;return(0,i.jsx)("svg",(r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({viewBox:"0 0 24 24"},e),t=(t={children:(0,i.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"})},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))}function ei(e){var r,t;return(0,i.jsx)("svg",(r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({viewBox:"0 0 24 24"},e),t=(t={children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))}let es={copyButtonCopied:"copyButtonCopied_OkN_",copyButtonIcons:"copyButtonIcons_OqsO",copyButtonIcon:"copyButtonIcon_PgCn",copyButtonSuccessIcon:"copyButtonSuccessIcon_bsQG"};function el(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function eu(e){var r,t,n=e.code,o=e.className;var a=(r=(0,s.useState)(!1),t=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);c=!0);}catch(e){i=!0,n=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(i)throw n}}return a}}(r,2)||function(e,r){if(e){if("string"==typeof e)return el(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return el(e,r)}}(r,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=a[0],u=a[1],d=(0,s.useRef)(void 0),p=(0,s.useCallback)(function(){(0,ea.Z)(n),u(!0),d.current=window.setTimeout(function(){u(!1)},1e3)},[n]);return(0,s.useEffect)(function(){return function(){return window.clearTimeout(d.current)}},[]),(0,i.jsx)("button",{type:"button","aria-label":c?(0,f.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,f.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,f.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,l.Z)("clean-btn",o,es.copyButton,c&&es.copyButtonCopied),onClick:p,children:(0,i.jsxs)("span",{className:es.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(ec,{className:es.copyButtonIcon}),(0,i.jsx)(ei,{className:es.copyButtonSuccessIcon})]})})}function ed(e){var r,t;return(0,i.jsx)("svg",(r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({viewBox:"0 0 24 24"},e),t=(t={children:(0,i.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"})},t),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))}let ef={wordWrapButtonIcon:"wordWrapButtonIcon_MQXS",wordWrapButtonEnabled:"wordWrapButtonEnabled_TBIH"};function ep(e){var r=e.className,t=e.onClick,n=e.isEnabled,o=(0,f.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:t,className:(0,l.Z)("clean-btn",r,n&&ef.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,i.jsx)(ed,{className:ef.wordWrapButtonIcon,"aria-hidden":"true"})})}function eb(e){var r,t,n,o,a,c,u,d,f,p,b,y,m,v,g,O,x,w,P,k,S,E,C=e.children,N=e.className,B=void 0===N?"":N,D=e.metastring,I=e.title,A=e.showLineNumbers,T=e.language,Z=(0,h.L)().prism,L=Z.defaultLanguage,V=Z.magicComments;var M=null==(t=null!==(E=null!=T?T:null==(r=B.split(" ").find(function(e){return e.startsWith("language-")}))?void 0:r.replace(/language-/,""))&&void 0!==E?E:L)?void 0:t.toLowerCase(),F=j();var W=(o=(n=ee((0,s.useState)(!1),2))[0],a=n[1],u=(c=ee((0,s.useState)(!1),2))[0],d=c[1],f=(0,s.useRef)(null),p=(0,s.useCallback)(function(){var e=f.current.querySelector("code");o?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),a(function(e){return!e})},[f,o]),b=(0,s.useCallback)(function(){var e=f.current;d(e.scrollWidth>e.clientWidth||f.current.querySelector("code").hasAttribute("style"))},[f]),y=f,m=b,g=(v=ee((0,s.useState)(),2))[0],O=v[1],x=(0,s.useCallback)(function(){var e;O(null===(e=y.current)||void 0===e?void 0:e.closest("[role=tabpanel][hidden]"))},[y,O]),(0,s.useEffect)(function(){x()},[x]),function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X,n=(0,J.zX)(r),o=(0,J.Ql)(t);(0,s.useEffect)(function(){var r=new MutationObserver(n);return e&&r.observe(e,o),function(){return r.disconnect()}},[e,n,o])}(g,function(e){e.forEach(function(e){"attributes"===e.type&&"hidden"===e.attributeName&&(m(),x())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1}),(0,s.useEffect)(function(){b()},[o,b]),(0,s.useEffect)(function(){return window.addEventListener("resize",b,{passive:!0}),function(){window.removeEventListener("resize",b)}},[b]),{codeBlockRef:f,isEnabled:o,isCodeScrollable:u,toggle:p});var $=(null!==(k=null==(w=D)?void 0:null===(P=w.match(q))||void 0===P?void 0:P.groups.title)&&void 0!==k?k:"")||I,Q=function(e,r){var t=e.replace(/\n$/,""),n=r.language,o=r.magicComments,a=r.metastring;if(a&&U.test(a)){var c=a.match(U).groups.range;if(0===o.length)throw Error("A highlight range has been given in code block's metastring (``` ".concat(a,"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges."));var i=o[0].className;return{lineClassNames:Object.fromEntries(_()(c).filter(function(e){return e>0}).map(function(e){return[e-1,[i]]})),code:t}}if(void 0===n)return{lineClassNames:{},code:t};for(var s=function(e,r){switch(e){case"js":case"javascript":case"ts":case"typescript":return z(["js","jsBlock"],r);case"jsx":case"tsx":return z(["js","jsBlock","jsx"],r);case"html":return z(["js","jsBlock","html"],r);case"python":case"py":case"bash":return z(["bash"],r);case"markdown":case"md":return z(["html","jsx","bash"],r);case"tex":case"latex":case"matlab":return z(["tex"],r);case"lua":case"haskell":case"sql":return z(["lua"],r);case"wasm":return z(["wasm"],r);case"vb":case"vba":case"visual-basic":return z(["vb","rem"],r);case"vbnet":return z(["vbnet","rem"],r);case"batch":return z(["rem"],r);case"basic":return z(["rem","f90"],r);case"fsharp":return z(["js","ml"],r);case"ocaml":case"sml":return z(["ml"],r);case"fortran":return z(["f90"],r);case"cobol":return z(["cobol"],r);default:return z(H,r)}}(n,o),l=t.split("\n"),u=Object.fromEntries(o.map(function(e){return[e.className,{start:0,range:""}]})),d=Object.fromEntries(o.filter(function(e){return e.line}).map(function(e){var r=e.className;return[e.line,r]})),f=Object.fromEntries(o.filter(function(e){return e.block}).map(function(e){var r=e.className;return[e.block.start,r]})),p=Object.fromEntries(o.filter(function(e){return e.block}).map(function(e){var r=e.className;return[e.block.end,r]})),b=0;b<l.length;){var y=l[b].match(s);if(!y){b+=1;continue}var m=y.slice(1).find(function(e){return void 0!==e});d[m]?u[d[m]].range+="".concat(b,","):f[m]?u[f[m]].start=b:p[m]&&(u[p[m]].range+="".concat(u[p[m]].start,"-").concat(b-1,",")),l.splice(b,1)}t=l.join("\n");var h={};return Object.entries(u).forEach(function(e){var r=R(e,2),t=r[0],n=r[1].range;_()(n).forEach(function(e){var r;null!==(r=h[e])&&void 0!==r||(h[e]=[]),h[e].push(t)})}),{lineClassNames:h,code:t}}(C,{metastring:D,language:M,magicComments:V}),K=Q.lineClassNames,et=Q.code;var en=null!=A?A:!!(null==(S=D)?void 0:S.includes("showLineNumbers"));return(0,i.jsxs)(Y,{as:"div",className:(0,l.Z)(B,M&&!B.includes("language-".concat(M))&&"language-".concat(M)),children:[$&&(0,i.jsx)("div",{className:G.codeBlockTitle,children:$}),(0,i.jsxs)("div",{className:G.codeBlockContent,children:[(0,i.jsx)(er.y$,{theme:F,code:et,language:null!=M?M:"text",children:function(e){var r=e.className,t=e.style,n=e.tokens,o=e.getLineProps,a=e.getTokenProps;return(0,i.jsx)("pre",{tabIndex:0,ref:W.codeBlockRef,className:(0,l.Z)(r,G.codeBlock,"thin-scrollbar"),style:t,children:(0,i.jsx)("code",{className:(0,l.Z)(G.codeBlockLines,en&&G.codeBlockLinesWithNumbering),children:n.map(function(e,r){return(0,i.jsx)(eo,{line:e,getLineProps:o,getTokenProps:a,classNames:K[r],showLineNumbers:en},r)})})})}}),(0,i.jsxs)("div",{className:G.buttonGroup,children:[(W.isEnabled||W.isCodeScrollable)&&(0,i.jsx)(ep,{className:G.codeButton,onClick:function(){return W.toggle()},isEnabled:W.isEnabled}),(0,i.jsx)(eu,{className:G.codeButton,code:et})]})]})]})}function ey(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}let em=(a=function(e){var r,t,n,o=e.children,a=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++){if(t=a[n],!(r.indexOf(t)>=0))Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}}return o}(e,["children"]),c=(0,u.Z)();var l=(r=o,s.Children.toArray(r).some(function(e){return(0,s.isValidElement)(e)})?r:Array.isArray(r)?r.join(""):r),d="string"==typeof l?eb:Q;return(0,i.jsx)(d,(t=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},a),n=(n={children:l},n),Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),String(c))},function(e){return e.live?(0,i.jsx)(I,ey({scope:Z},e)):(0,i.jsx)(a,ey({},e))});function eh(e){return(0,i.jsx)(em,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n,o,a;n=e,o=r,a=t[r],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},e))}}}]);