import{s as m}from"./chunk-DZLz74EQ.js";import{t as l}from"./react-BcIddLXZ.js";import"./react-dom-D6bRRS5R.js";import"./zod-U2NFpcFA.js";import{t as u}from"./jsx-runtime-DvsdsEjx.js";import{u as d}from"./hotkeys-Lbk6RHir.js";import"./useEventListener-C5BS4xuN.js";import"./cn-C5VTNYKf.js";import"./button-nRVaalxL.js";import"./dist-BPcMnGQn.js";import"./dist-pZAIwcZo.js";import"./dist-C13bkrcz.js";import"./dist-DZNGKufD.js";import"./dist-DBeOBCHw.js";import"./dist-Ba10OKR3.js";import"./dist-D-CsU-_R.js";import"./dist-ClBFnEcy.js";import"./stex-LEaAsvUb.js";import"./use-toast-BiL_AQz9.js";import"./dist-Q3T6mWQ0.js";import"./createLucideIcon-DA8ZBm4D.js";import"./check-BUgsJwxM.js";import"./copy-CWjpIcfl.js";import"./Combination-DR4iFoRS.js";import"./dist-Cei_8ikW.js";import"./tooltip-BQKXsEoT.js";import"./tslib.es6-sakIzgHM.js";import"./alert-dialog-DM1h8RhU.js";import"./errors-5BnWGoql.js";import"./copy-DAqXDCGN.js";import{t as f}from"./copy-icon-5DWltDxB.js";import"./extends-C-tvimwN.js";import"./objectWithoutPropertiesLoose-DDvr5cHq.js";import{n as c}from"./error-banner-RIuTelB8.js";import{t as g}from"./esm-ChGlv0th.js";import"./dist-DOg_DNWV.js";import"./dist-Bztoy_V_.js";import"./dist-DI9MeT7Y.js";import"./dist-CDb8BikS.js";import"./dist-HbBFu0Hw.js";import"./dist-C5ypE-xK.js";import"./dist-DgRIgdnS.js";import"./dist-BF_WTga9.js";import"./dist-DoLsMp73.js";import"./dist-DleXuWcB.js";import"./dist-nfVGAiua.js";import"./dist-DXQZ2qpx.js";import"./apl-DA5FS-jg.js";import"./asciiarmor-BqYC8972.js";import"./asn1-CV308CV7.js";import"./brainfuck-JVVuXNr9.js";import"./cobol-BkP6Ajjp.js";import"./clike-BRQvCw2t.js";import"./clojure-CxEG72Vt.js";import"./css-CAhmSbgi.js";import"./cmake-Db6MlmXu.js";import"./coffeescript-JRe5aZz8.js";import"./commonlisp-D9wKGkUX.js";import"./cypher-CgHLgHbV.js";import"./python-C6KZGpy1.js";import"./crystal-CDUaptrE.js";import"./d-BUlepkAd.js";import"./diff-C3_Npxuv.js";import"./dtd-_OGR-47e.js";import"./dylan-B7e-HXd4.js";import"./ecl-Bmb3ojXd.js";import"./eiffel-D9YEZupi.js";import"./elm-DjAG68Xr.js";import"./erlang-CEhNn9ee.js";import"./simple-mode-DrtN-JC1.js";import"./factor-DjTCV0tC.js";import"./forth-DDK1MZGo.js";import"./fortran-DFBw9BHL.js";import"./mllike-Bk0kvFR5.js";import"./gas-CeJahU84.js";import"./gherkin-BjPrVVCm.js";import"./groovy-BhSsiYa2.js";import"./haskell-CnqE89TS.js";import"./haxe-tz3dS1Ms.js";import"./idl-CkWqZUmz.js";import"./javascript--WFQrQGu.js";import"./jinja2-DdXbUzg-.js";import"./julia-sSC0A2QC.js";import"./livescript-BrGDWGj5.js";import"./lua-BgywVrLy.js";import"./mirc-CndxT3S-.js";import"./mathematica-CXqFqAlK.js";import"./modelica-BESTN_Yb.js";import"./mumps-C1cvIlnt.js";import"./mbox-B1eeU--v.js";import"./nsis-BLZx23sj.js";import"./ntriples-Bnb5pPta.js";import"./octave-FcRMzfM9.js";import"./oz-DL18r1EA.js";import"./pascal-CySNBvQR.js";import"./perl-lfRKrssY.js";import"./pig-lSzmTbd2.js";import"./powershell-L_F0rY6B.js";import"./properties-BVcJ2l9p.js";import"./protobuf-eME7rUY3.js";import"./pug-CC2LN4Ib.js";import"./puppet-0JRLgwf6.js";import"./q-BJQq3HSY.js";import"./r-B11tLzMa.js";import"./rpm-zwHK3PeN.js";import"./ruby-BjRVRq_k.js";import"./sas-g1MjHO-z.js";import"./scheme-CGMbgbRs.js";import"./shell-C7_H8y4W.js";import"./sieve-CEOxhP-I.js";import"./smalltalk-C-2o9ebc.js";import"./sparql-87z_UEc4.js";import"./stylus-Bvvi8MmW.js";import"./swift-DeJEO5nK.js";import"./verilog-DKBTg4jR.js";import"./tcl-CTRWqPLR.js";import"./textile-C5KboBqI.js";import"./toml-BiRQJsN4.js";import"./troff-CIdymZ6G.js";import"./ttcn-NLOJFaBh.js";import"./ttcn-cfg-BxG4drVc.js";import"./turtle-c5oFjZu2.js";import"./webidl-vigh4ITk.js";import"./vb-DLYFo3qd.js";import"./vbscript-B-Swk_a6.js";import"./velocity-CL_O0nuc.js";import"./vhdl-B_K9_xTH.js";import"./xquery-Df6PFV-u.js";import"./yacas-B7BpVY8m.js";import"./z80-B9-UrYYz.js";import"./mscgen-CCAKOoJb.js";import"./dist-CFxk591T.js";import{n as v,t as a}from"./esm-CphaRm2f.js";var j=m(l(),1),t=m(u(),1);const s={python:"py",javascript:"js",typescript:"ts"};var x=({language:o,showCopyButton:e,extensions:r=[],...p})=>{o=s[o||""]||o;let i=o&&!(o in a);i&&d.warn(`Language ${o} not found in CodeMirror.`);let n=(0,j.useMemo)(()=>o?[v(o),...r].filter(Boolean):r,[o,r]);return(0,t.jsxs)("div",{className:"relative w-full group hover-actions-parent",children:[i&&(0,t.jsx)(c,{className:"mb-1 rounded-sm",error:`Language ${o} not supported. 

Supported languages are: ${Object.keys(a).join(", ")}`}),e&&!i&&(0,t.jsx)(f,{tooltip:!1,className:"absolute top-2 right-2 p-1 hover-action z-10 text-muted-foreground",value:p.value||"",toastTitle:"Copied to clipboard"}),(0,t.jsx)(g,{...p,extensions:n})]})};export{s as LANGUAGE_MAP,x as default};
