palettecn 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +10 -0
- package/dist/web/nitro.json +17 -0
- package/dist/web/public/assets/abap-BdvmRIgS.js +1 -0
- package/dist/web/public/assets/actionscript-3-et0rQaqm.js +1 -0
- package/dist/web/public/assets/ada-DPgrustg.js +1 -0
- package/dist/web/public/assets/andromeeda-DJl1yeV_.js +1 -0
- package/dist/web/public/assets/angular-html-Dm7s7tSx.js +1 -0
- package/dist/web/public/assets/angular-ts-B_ywTULt.js +1 -0
- package/dist/web/public/assets/apache-CFpsYX8S.js +1 -0
- package/dist/web/public/assets/apex-CN5n6pbI.js +1 -0
- package/dist/web/public/assets/apl-Dm11wHHc.js +1 -0
- package/dist/web/public/assets/applescript-JrY23hsL.js +1 -0
- package/dist/web/public/assets/ara-DR83hn3A.js +1 -0
- package/dist/web/public/assets/asciidoc-Dpu9XLB1.js +1 -0
- package/dist/web/public/assets/asm-BYI3A31V.js +1 -0
- package/dist/web/public/assets/astro-DP1naDCT.js +1 -0
- package/dist/web/public/assets/aurora-x-Nav5jnoQ.js +1 -0
- package/dist/web/public/assets/awk-BIoTx_w6.js +1 -0
- package/dist/web/public/assets/ayu-dark-H5QV5J7K.js +1 -0
- package/dist/web/public/assets/ayu-light-BrwTNGnU.js +1 -0
- package/dist/web/public/assets/ayu-mirage-Bg6FpF5w.js +1 -0
- package/dist/web/public/assets/ballerina-BFvDNd4T.js +1 -0
- package/dist/web/public/assets/bat-DtQkx7Ny.js +1 -0
- package/dist/web/public/assets/beancount-BIjKALa1.js +1 -0
- package/dist/web/public/assets/berry-BPkDN_EZ.js +1 -0
- package/dist/web/public/assets/bibtex-Dur2CNW6.js +1 -0
- package/dist/web/public/assets/bicep-BMz1bZ7m.js +1 -0
- package/dist/web/public/assets/bird2-91rdr9s7.js +1 -0
- package/dist/web/public/assets/blade-DD5O596X.js +1 -0
- package/dist/web/public/assets/bsl-FmB7U2qd.js +1 -0
- package/dist/web/public/assets/bundle-mjs-Bso3xn9x.js +1 -0
- package/dist/web/public/assets/c-DqqBLLyl.js +1 -0
- package/dist/web/public/assets/c3-CJTbEooS.js +1 -0
- package/dist/web/public/assets/cadence-C0GI7BZZ.js +1 -0
- package/dist/web/public/assets/cairo-B5JMmIC0.js +1 -0
- package/dist/web/public/assets/catppuccin-frappe-D76-cUjK.js +1 -0
- package/dist/web/public/assets/catppuccin-latte-DUHNJ_6_.js +1 -0
- package/dist/web/public/assets/catppuccin-macchiato-CFhPH2wd.js +1 -0
- package/dist/web/public/assets/catppuccin-mocha-BRD0cvUW.js +1 -0
- package/dist/web/public/assets/chunk-FRKYWMV7-DUkk3w4h.js +122 -0
- package/dist/web/public/assets/clarity-KgUVrNfC.js +1 -0
- package/dist/web/public/assets/clojure-BhQuoGIG.js +1 -0
- package/dist/web/public/assets/cmake-CA59gUFQ.js +1 -0
- package/dist/web/public/assets/cobol-CCFShgGZ.js +1 -0
- package/dist/web/public/assets/codeowners-CD36YqjJ.js +1 -0
- package/dist/web/public/assets/codeql-CrMosKUt.js +1 -0
- package/dist/web/public/assets/coffee-C-Mn3tBT.js +1 -0
- package/dist/web/public/assets/common-lisp-DYnOjAFz.js +1 -0
- package/dist/web/public/assets/components-DiZ1dSl3.js +77 -0
- package/dist/web/public/assets/coq-BaHtq3Qt.js +1 -0
- package/dist/web/public/assets/cpp-D8Y73ItU.js +1 -0
- package/dist/web/public/assets/crystal-CnXWqbxx.js +1 -0
- package/dist/web/public/assets/csharp-D6sghVPa.js +1 -0
- package/dist/web/public/assets/css-CUGjdPw_.js +1 -0
- package/dist/web/public/assets/csv-DuxyxUAI.js +1 -0
- package/dist/web/public/assets/cue-D9NRAX0_.js +1 -0
- package/dist/web/public/assets/cypher-HJRdtilF.js +1 -0
- package/dist/web/public/assets/d-B4Ont7_X.js +1 -0
- package/dist/web/public/assets/dark-plus-DZSBycyp.js +1 -0
- package/dist/web/public/assets/dart-Dp4asavE.js +1 -0
- package/dist/web/public/assets/dax-DBUubp6S.js +1 -0
- package/dist/web/public/assets/desktop-DQ0n6zIQ.js +1 -0
- package/dist/web/public/assets/diff-CFHlrffC.js +1 -0
- package/dist/web/public/assets/docker-BuefmsF5.js +1 -0
- package/dist/web/public/assets/dotenv-BKTsUQ_r.js +1 -0
- package/dist/web/public/assets/dracula-MOn9qacs.js +1 -0
- package/dist/web/public/assets/dracula-soft-C4r_sC_D.js +1 -0
- package/dist/web/public/assets/dream-maker-BNdv5lLS.js +1 -0
- package/dist/web/public/assets/edge-C-Mi8Oda.js +1 -0
- package/dist/web/public/assets/elixir-CTS5wQtX.js +1 -0
- package/dist/web/public/assets/elm-rM310x8D.js +1 -0
- package/dist/web/public/assets/emacs-lisp-D9FIGRtM.js +1 -0
- package/dist/web/public/assets/erb-oaGjGVGO.js +1 -0
- package/dist/web/public/assets/erlang-q4Mkyw3m.js +1 -0
- package/dist/web/public/assets/everforest-dark-CNa2QFRn.js +1 -0
- package/dist/web/public/assets/everforest-light-DRbUDqJT.js +1 -0
- package/dist/web/public/assets/fennel-DpqQTaVZ.js +1 -0
- package/dist/web/public/assets/field-1-Ujza0S5j.js +1 -0
- package/dist/web/public/assets/fish-hyk5x6Q4.js +1 -0
- package/dist/web/public/assets/fluent-DMll-MGX.js +1 -0
- package/dist/web/public/assets/fortran-fixed-form-BmdfKovV.js +1 -0
- package/dist/web/public/assets/fortran-free-form-MCAifii4.js +1 -0
- package/dist/web/public/assets/fsharp-DLlBn9Nl.js +1 -0
- package/dist/web/public/assets/gdresource-BzFzBRli.js +1 -0
- package/dist/web/public/assets/gdscript-D3R4J0Cv.js +1 -0
- package/dist/web/public/assets/gdshader-BAubtqqN.js +1 -0
- package/dist/web/public/assets/genie-BnIIX2pC.js +1 -0
- package/dist/web/public/assets/gherkin-CL3NUuB1.js +1 -0
- package/dist/web/public/assets/git-commit-BYPE8h85.js +1 -0
- package/dist/web/public/assets/git-rebase-Bmmgf6eN.js +1 -0
- package/dist/web/public/assets/github-dark-default-C6I2oE4c.js +1 -0
- package/dist/web/public/assets/github-dark-dimmed-DEqwxg6D.js +1 -0
- package/dist/web/public/assets/github-dark-high-contrast-DDt3j0cs.js +1 -0
- package/dist/web/public/assets/github-dark-oLN6SDKl.js +1 -0
- package/dist/web/public/assets/github-light-DaN-N2Gj.js +1 -0
- package/dist/web/public/assets/github-light-default-B3EwMbS7.js +1 -0
- package/dist/web/public/assets/github-light-high-contrast-Cl9D0f_e.js +1 -0
- package/dist/web/public/assets/gleam-Cvj8QRtQ.js +1 -0
- package/dist/web/public/assets/glimmer-js-CahbROb1.js +1 -0
- package/dist/web/public/assets/glimmer-ts-JMFYNbot.js +1 -0
- package/dist/web/public/assets/global-XWAvxWcA.css +2 -0
- package/dist/web/public/assets/glsl-BCuCNM3V.js +1 -0
- package/dist/web/public/assets/gn-DxCHSEMl.js +1 -0
- package/dist/web/public/assets/gnuplot-CkGXHK7B.js +1 -0
- package/dist/web/public/assets/go-B_NLCuTj.js +1 -0
- package/dist/web/public/assets/graphql-RXOfHGfI.js +1 -0
- package/dist/web/public/assets/groovy-DVge8oRs.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-hard-BwZz1yni.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-medium-Bqy6jkuO.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-soft-DjUvyUfH.js +1 -0
- package/dist/web/public/assets/gruvbox-light-hard-BTLmfPdm.js +1 -0
- package/dist/web/public/assets/gruvbox-light-medium-DeWqsWs6.js +1 -0
- package/dist/web/public/assets/gruvbox-light-soft-BL8ld-1F.js +1 -0
- package/dist/web/public/assets/hack-BBQpwyf_.js +1 -0
- package/dist/web/public/assets/haml-mWELc9kh.js +1 -0
- package/dist/web/public/assets/handlebars-COrUo8cC.js +1 -0
- package/dist/web/public/assets/haskell-DRmM8XlQ.js +1 -0
- package/dist/web/public/assets/haxe-BEhq8ZEr.js +1 -0
- package/dist/web/public/assets/hcl-B5ZIaGS0.js +1 -0
- package/dist/web/public/assets/highlighted-body-TPN3WLV5-YJgGFx4e.js +1 -0
- package/dist/web/public/assets/hjson-B9uRLqIO.js +1 -0
- package/dist/web/public/assets/hlsl-Hv1kKjrS.js +1 -0
- package/dist/web/public/assets/horizon-ClXGBjWw.js +1 -0
- package/dist/web/public/assets/horizon-bright-CvUCr3ux.js +1 -0
- package/dist/web/public/assets/houston-NqkqG60q.js +1 -0
- package/dist/web/public/assets/html-cmigv1ou.js +1 -0
- package/dist/web/public/assets/html-derivative-B3me0pSu.js +1 -0
- package/dist/web/public/assets/http-BojM9cyU.js +1 -0
- package/dist/web/public/assets/hurl-BxEmMiGP.js +1 -0
- package/dist/web/public/assets/hxml-CoBuVbfs.js +1 -0
- package/dist/web/public/assets/hy-CeISYGGU.js +1 -0
- package/dist/web/public/assets/imba-xjcDFXUW.js +1 -0
- package/dist/web/public/assets/ini-D0ZCSj6e.js +1 -0
- package/dist/web/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/public/assets/java-BvheClGI.js +1 -0
- package/dist/web/public/assets/javascript-DjlJORDg.js +1 -0
- package/dist/web/public/assets/jinja-Bi4sG72X.js +1 -0
- package/dist/web/public/assets/jison-BTz5Ik2Y.js +1 -0
- package/dist/web/public/assets/json-CiTd40Rg.js +1 -0
- package/dist/web/public/assets/json5-FR9EyF7a.js +1 -0
- package/dist/web/public/assets/jsonc-CHIeFfsD.js +1 -0
- package/dist/web/public/assets/jsonl-B4WQkwTf.js +1 -0
- package/dist/web/public/assets/jsonnet-vd-gzGkL.js +1 -0
- package/dist/web/public/assets/jssm-C_bj1LkZ.js +1 -0
- package/dist/web/public/assets/jsx-Bx-RZMFH.js +1 -0
- package/dist/web/public/assets/jsx-runtime-n8k0hwt8.js +1 -0
- package/dist/web/public/assets/julia-BKcIfSxk.js +1 -0
- package/dist/web/public/assets/just-IkZCagAs.js +1 -0
- package/dist/web/public/assets/kanagawa-dragon-B3Cz89vt.js +1 -0
- package/dist/web/public/assets/kanagawa-lotus-CRe_W5Ft.js +1 -0
- package/dist/web/public/assets/kanagawa-wave-BPqZ5XB7.js +1 -0
- package/dist/web/public/assets/kdl-BzL_Ak31.js +1 -0
- package/dist/web/public/assets/kotlin-BQQFk6ql.js +1 -0
- package/dist/web/public/assets/kusto-vWe6OLKV.js +1 -0
- package/dist/web/public/assets/laserwave-CwtvEUcj.js +1 -0
- package/dist/web/public/assets/latex-9N90_WFU.js +1 -0
- package/dist/web/public/assets/lean-CaqenOqv.js +1 -0
- package/dist/web/public/assets/less-CERnPzn6.js +1 -0
- package/dist/web/public/assets/light-plus-B9_M_OKq.js +1 -0
- package/dist/web/public/assets/liquid-CQLPDP7m.js +1 -0
- package/dist/web/public/assets/llvm-BylJXvm7.js +1 -0
- package/dist/web/public/assets/log-CBBcNcbO.js +1 -0
- package/dist/web/public/assets/logo-r-8Jc8Xk.js +1 -0
- package/dist/web/public/assets/lua-BBL6LXKd.js +1 -0
- package/dist/web/public/assets/luau-B2g7L-zP.js +1 -0
- package/dist/web/public/assets/main-0lKVDR64.css +2 -0
- package/dist/web/public/assets/main-CcNf0BOb.js +126 -0
- package/dist/web/public/assets/make-DK-HzJ2w.js +1 -0
- package/dist/web/public/assets/markdown-FgdsukgR.js +1 -0
- package/dist/web/public/assets/marko-CLZwt2N2.js +1 -0
- package/dist/web/public/assets/material-theme-DOJ9PS4O.js +1 -0
- package/dist/web/public/assets/material-theme-darker-DOurH5jT.js +1 -0
- package/dist/web/public/assets/material-theme-lighter-BfPWxCP6.js +1 -0
- package/dist/web/public/assets/material-theme-ocean-BcO5PKoq.js +1 -0
- package/dist/web/public/assets/material-theme-palenight-ClWQBDDd.js +1 -0
- package/dist/web/public/assets/matlab-DwyUVNXd.js +1 -0
- package/dist/web/public/assets/mdc-Bo8CRPg4.js +1 -0
- package/dist/web/public/assets/mdx-3EBShbsD.js +1 -0
- package/dist/web/public/assets/mermaid-ByG2-SLz.js +1 -0
- package/dist/web/public/assets/mermaid-O7DHMXV3-COAgR3aM.js +1 -0
- package/dist/web/public/assets/min-dark-ClJ2x5pc.js +1 -0
- package/dist/web/public/assets/min-light-BsOUz5iE.js +1 -0
- package/dist/web/public/assets/mipsasm-BKDtQCf3.js +1 -0
- package/dist/web/public/assets/mojo-DmEAK7iv.js +1 -0
- package/dist/web/public/assets/monokai-BKc3VADO.js +1 -0
- package/dist/web/public/assets/moonbit-Qm8v_cKN.js +1 -0
- package/dist/web/public/assets/move-CMectUPk.js +1 -0
- package/dist/web/public/assets/narrat-Bdm8NaK8.js +1 -0
- package/dist/web/public/assets/nextflow-BpSt05nC.js +1 -0
- package/dist/web/public/assets/nextflow-groovy-BZ-bqJ-u.js +1 -0
- package/dist/web/public/assets/nginx-ChZL5FWE.js +1 -0
- package/dist/web/public/assets/night-owl-CbFc5pXO.js +1 -0
- package/dist/web/public/assets/night-owl-light-zYbVCVuz.js +1 -0
- package/dist/web/public/assets/nim-5JnPAJWa.js +1 -0
- package/dist/web/public/assets/nix-P5P-2qHs.js +1 -0
- package/dist/web/public/assets/nord-C7hKGudV.js +1 -0
- package/dist/web/public/assets/nushell-DKPnC5RG.js +1 -0
- package/dist/web/public/assets/objective-c-BPwXtM0v.js +1 -0
- package/dist/web/public/assets/objective-cpp-CWYEdWNG.js +1 -0
- package/dist/web/public/assets/ocaml-CL7OJ02v.js +1 -0
- package/dist/web/public/assets/odin-Dtay25eA.js +1 -0
- package/dist/web/public/assets/one-dark-pro-CrdFNNwF.js +1 -0
- package/dist/web/public/assets/one-light-BUiz8X4B.js +1 -0
- package/dist/web/public/assets/openscad-WD4sXUUp.js +1 -0
- package/dist/web/public/assets/pascal-A6-MZnZ8.js +1 -0
- package/dist/web/public/assets/perl-Yq3AfnVV.js +1 -0
- package/dist/web/public/assets/php-CCj0foPx.js +1 -0
- package/dist/web/public/assets/pkl-cmPbg8fI.js +1 -0
- package/dist/web/public/assets/plastic-DtQ_LnDB.js +1 -0
- package/dist/web/public/assets/plsql-DwmuVd7q.js +1 -0
- package/dist/web/public/assets/po-CkVxkZaj.js +1 -0
- package/dist/web/public/assets/poimandres-Dt0xZuaa.js +1 -0
- package/dist/web/public/assets/polar-hStNz_W2.js +1 -0
- package/dist/web/public/assets/postcss-ZIk0AQ7M.js +1 -0
- package/dist/web/public/assets/powerquery-D0gqoHHD.js +1 -0
- package/dist/web/public/assets/powershell-DXB5HoVh.js +1 -0
- package/dist/web/public/assets/prisma-DmTrfxC0.js +1 -0
- package/dist/web/public/assets/prolog-CdoyriEj.js +1 -0
- package/dist/web/public/assets/proto-4MrN11dS.js +1 -0
- package/dist/web/public/assets/pug-svYJKDOQ.js +1 -0
- package/dist/web/public/assets/puppet-MEaLGpAP.js +1 -0
- package/dist/web/public/assets/purescript-CPxCorqB.js +1 -0
- package/dist/web/public/assets/python-f4fp5z0z.js +1 -0
- package/dist/web/public/assets/qml-BzEtWdqI.js +1 -0
- package/dist/web/public/assets/qmldir-DCjSceJ_.js +1 -0
- package/dist/web/public/assets/qss-BdM02NUc.js +1 -0
- package/dist/web/public/assets/r-luosIeJH.js +1 -0
- package/dist/web/public/assets/racket-D2tfa8Zc.js +1 -0
- package/dist/web/public/assets/raku-KeGPJVZg.js +1 -0
- package/dist/web/public/assets/razor-Bokxs4Qx.js +1 -0
- package/dist/web/public/assets/red-C0qZ-1lN.js +1 -0
- package/dist/web/public/assets/reg-DdnswvOj.js +1 -0
- package/dist/web/public/assets/regexp-CYC8h6V9.js +1 -0
- package/dist/web/public/assets/rel-RhzEfSRc.js +1 -0
- package/dist/web/public/assets/riscv-dS5TzX10.js +1 -0
- package/dist/web/public/assets/ron-CQjQSCVp.js +1 -0
- package/dist/web/public/assets/rose-pine-C89ViLdr.js +1 -0
- package/dist/web/public/assets/rose-pine-dawn-Dq2gf0yi.js +1 -0
- package/dist/web/public/assets/rose-pine-moon-CBDvXVs_.js +1 -0
- package/dist/web/public/assets/rosmsg-nvjuSIGu.js +1 -0
- package/dist/web/public/assets/routes-BXqJCOpL.js +542 -0
- package/dist/web/public/assets/rst-1xwvVGf7.js +1 -0
- package/dist/web/public/assets/ruby-Blad-eDx.js +1 -0
- package/dist/web/public/assets/rust-rV8q_xyI.js +1 -0
- package/dist/web/public/assets/sas-DUPWtptg.js +1 -0
- package/dist/web/public/assets/sass-CuxdoNN0.js +1 -0
- package/dist/web/public/assets/scala-Df4L7N3R.js +1 -0
- package/dist/web/public/assets/scheme-DalRmAPH.js +1 -0
- package/dist/web/public/assets/scss-CYQ8LEwP.js +1 -0
- package/dist/web/public/assets/sdbl-B_TmFnGf.js +1 -0
- package/dist/web/public/assets/shaderlab-DYEMDY3e.js +1 -0
- package/dist/web/public/assets/shellscript-DjKZ34ac.js +1 -0
- package/dist/web/public/assets/shellsession-C3kcnBnh.js +1 -0
- package/dist/web/public/assets/slack-dark-ak_jOeLl.js +1 -0
- package/dist/web/public/assets/slack-ochin-ByiYhLwu.js +1 -0
- package/dist/web/public/assets/smalltalk-DTTnjjZJ.js +1 -0
- package/dist/web/public/assets/snazzy-light-BBRYeY60.js +1 -0
- package/dist/web/public/assets/solarized-dark-BtoLnWkw.js +1 -0
- package/dist/web/public/assets/solarized-light-CtzUA7GI.js +1 -0
- package/dist/web/public/assets/solidity-CSIHEQ2t.js +1 -0
- package/dist/web/public/assets/soy-BN0uzUAI.js +1 -0
- package/dist/web/public/assets/sparql-B6k9tA6Q.js +1 -0
- package/dist/web/public/assets/splunk-DkRzN7V_.js +1 -0
- package/dist/web/public/assets/sql-Bx-WX28V.js +1 -0
- package/dist/web/public/assets/ssh-config-Bqp7ng33.js +1 -0
- package/dist/web/public/assets/stata-HAj7doU8.js +1 -0
- package/dist/web/public/assets/stylus-CdbCxDLX.js +1 -0
- package/dist/web/public/assets/surrealql-BkGf0I3k.js +1 -0
- package/dist/web/public/assets/svelte-DtWg6ssL.js +1 -0
- package/dist/web/public/assets/swift-yRu2dtgr.js +1 -0
- package/dist/web/public/assets/synthwave-84-2WIu6MHX.js +1 -0
- package/dist/web/public/assets/system-verilog-GUE_oP1V.js +1 -0
- package/dist/web/public/assets/systemd-FLIJAQZV.js +1 -0
- package/dist/web/public/assets/talonscript-DTR-8ILs.js +1 -0
- package/dist/web/public/assets/tasl-WHNWP-1F.js +1 -0
- package/dist/web/public/assets/tcl-BaBXNNp6.js +1 -0
- package/dist/web/public/assets/templ-Dc9vj00n.js +1 -0
- package/dist/web/public/assets/terraform-uJUFpr8t.js +1 -0
- package/dist/web/public/assets/tex-DA3dAz55.js +1 -0
- package/dist/web/public/assets/tokyo-night-BbogFqAr.js +1 -0
- package/dist/web/public/assets/toml-CyR4Gqq1.js +1 -0
- package/dist/web/public/assets/ts-tags-BD1j21LH.js +1 -0
- package/dist/web/public/assets/tsv-COLVYI6A.js +1 -0
- package/dist/web/public/assets/tsx-CFm2E6uK.js +1 -0
- package/dist/web/public/assets/turtle-PQwt4gkb.js +1 -0
- package/dist/web/public/assets/twig-DrUXy85s.js +1 -0
- package/dist/web/public/assets/typescript-Dy-5sXFx.js +1 -0
- package/dist/web/public/assets/typespec-Bb7qHV0g.js +1 -0
- package/dist/web/public/assets/typst-Bj_JElGz.js +1 -0
- package/dist/web/public/assets/v-BTkrtik4.js +1 -0
- package/dist/web/public/assets/vala-AXT1CI9v.js +1 -0
- package/dist/web/public/assets/vb-DzTKUgW8.js +1 -0
- package/dist/web/public/assets/verilog-aI3j5Xj8.js +1 -0
- package/dist/web/public/assets/vesper-BmnwIC_B.js +1 -0
- package/dist/web/public/assets/vhdl-4IgBB7vO.js +1 -0
- package/dist/web/public/assets/viml-D_XMKSR6.js +1 -0
- package/dist/web/public/assets/vitesse-black-DhmxIXiA.js +1 -0
- package/dist/web/public/assets/vitesse-dark-dvEH_9qt.js +1 -0
- package/dist/web/public/assets/vitesse-light-Ca0W2L1O.js +1 -0
- package/dist/web/public/assets/vue-DC_yTvy2.js +1 -0
- package/dist/web/public/assets/vue-html-Bp8x4gdt.js +1 -0
- package/dist/web/public/assets/vue-vine-ZcUkuUUp.js +1 -0
- package/dist/web/public/assets/vyper-Dz2f7-FK.js +1 -0
- package/dist/web/public/assets/wasm-CuXPCj65.js +1 -0
- package/dist/web/public/assets/wasm-DHkXUMsP.js +1 -0
- package/dist/web/public/assets/wenyan-BRAtM0Iv.js +1 -0
- package/dist/web/public/assets/wgsl-CMpn9jTa.js +1 -0
- package/dist/web/public/assets/wikitext-DRmBVmVA.js +1 -0
- package/dist/web/public/assets/wit-Drp_HLqJ.js +1 -0
- package/dist/web/public/assets/wolfram-C33umj7M.js +1 -0
- package/dist/web/public/assets/xml-BHoOtGbO.js +1 -0
- package/dist/web/public/assets/xsl-CN1PlFqm.js +1 -0
- package/dist/web/public/assets/yaml-DT0mpn8u.js +1 -0
- package/dist/web/public/assets/zenscript-BlYQ_Frf.js +1 -0
- package/dist/web/public/assets/zig-Buk7I0y-.js +1 -0
- package/dist/web/server/_chunks/ssr-renderer.mjs +15 -0
- package/dist/web/server/_libs/@ai-sdk/anthropic+[...].mjs +14021 -0
- package/dist/web/server/_libs/@ai-sdk/moonshotai+[...].mjs +898 -0
- package/dist/web/server/_libs/@ai-sdk/react+[...].mjs +8969 -0
- package/dist/web/server/_libs/@emotion/is-prop-valid+[...].mjs +34 -0
- package/dist/web/server/_libs/@floating-ui/core+[...].mjs +698 -0
- package/dist/web/server/_libs/@floating-ui/dom+[...].mjs +644 -0
- package/dist/web/server/_libs/@floating-ui/react-dom+[...].mjs +475 -0
- package/dist/web/server/_libs/@lobehub/icons+[...].mjs +3079 -0
- package/dist/web/server/_libs/@radix-ui/react-arrow+[...].mjs +184 -0
- package/dist/web/server/_libs/@radix-ui/react-collapsible+[...].mjs +374 -0
- package/dist/web/server/_libs/@radix-ui/react-dialog+[...].mjs +1503 -0
- package/dist/web/server/_libs/@radix-ui/react-menu+[...].mjs +1236 -0
- package/dist/web/server/_libs/@radix-ui/react-select+[...].mjs +1007 -0
- package/dist/web/server/_libs/@shikijs/core+[...].mjs +9017 -0
- package/dist/web/server/_libs/@shikijs/engine-javascript+[...].mjs +3159 -0
- package/dist/web/server/_libs/@streamdown/math+[...].mjs +37559 -0
- package/dist/web/server/_libs/@tanstack/react-router+[...].mjs +14074 -0
- package/dist/web/server/_libs/_.mjs +3 -0
- package/dist/web/server/_libs/_2.mjs +3 -0
- package/dist/web/server/_libs/_3.mjs +2 -0
- package/dist/web/server/_libs/_4.mjs +2 -0
- package/dist/web/server/_libs/ai-sdk__gateway+vercel__oidc.mjs +1255 -0
- package/dist/web/server/_libs/ai-sdk__google.mjs +1630 -0
- package/dist/web/server/_libs/ai-sdk__openai+zod.mjs +4951 -0
- package/dist/web/server/_libs/ai-sdk__provider-utils.mjs +411 -0
- package/dist/web/server/_libs/ai-sdk__provider.mjs +222 -0
- package/dist/web/server/_libs/bail.mjs +13 -0
- package/dist/web/server/_libs/character-entities.mjs +2135 -0
- package/dist/web/server/_libs/class-variance-authority+clsx.mjs +69 -0
- package/dist/web/server/_libs/color+[...].mjs +2185 -0
- package/dist/web/server/_libs/copy-text-to-clipboard.mjs +40 -0
- package/dist/web/server/_libs/d3-array.mjs +231 -0
- package/dist/web/server/_libs/d3-color.mjs +330 -0
- package/dist/web/server/_libs/d3-format.mjs +252 -0
- package/dist/web/server/_libs/d3-interpolate.mjs +207 -0
- package/dist/web/server/_libs/d3-path.mjs +77 -0
- package/dist/web/server/_libs/d3-scale+[...].mjs +1907 -0
- package/dist/web/server/_libs/d3-shape.mjs +818 -0
- package/dist/web/server/_libs/date-fns.mjs +3012 -0
- package/dist/web/server/_libs/date-fns__tz.mjs +249 -0
- package/dist/web/server/_libs/decimal.js-light.mjs +884 -0
- package/dist/web/server/_libs/decode-named-character-reference+[...].mjs +19 -0
- package/dist/web/server/_libs/dexie.mjs +3745 -0
- package/dist/web/server/_libs/escape-string-regexp.mjs +7 -0
- package/dist/web/server/_libs/estree-util-is-identifier-name.mjs +20 -0
- package/dist/web/server/_libs/eventemitter3.mjs +237 -0
- package/dist/web/server/_libs/extend.mjs +75 -0
- package/dist/web/server/_libs/fast-equals.mjs +423 -0
- package/dist/web/server/_libs/framer-motion+[...].mjs +9573 -0
- package/dist/web/server/_libs/fuzzysort.mjs +621 -0
- package/dist/web/server/_libs/h3+rou3+srvx.mjs +1158 -0
- package/dist/web/server/_libs/hast-util-raw+[...].mjs +800 -0
- package/dist/web/server/_libs/hast-util-sanitize.mjs +780 -0
- package/dist/web/server/_libs/hast-util-to-jsx-runtime+[...].mjs +853 -0
- package/dist/web/server/_libs/hookable.mjs +41 -0
- package/dist/web/server/_libs/html-url-attributes.mjs +44 -0
- package/dist/web/server/_libs/is-plain-obj.mjs +8 -0
- package/dist/web/server/_libs/lodash.mjs +4532 -0
- package/dist/web/server/_libs/lucide-react.mjs +605 -0
- package/dist/web/server/_libs/markdown-table.mjs +289 -0
- package/dist/web/server/_libs/marked.mjs +1511 -0
- package/dist/web/server/_libs/mdast-util-find-and-replace.mjs +198 -0
- package/dist/web/server/_libs/mdast-util-from-markdown+[...].mjs +8121 -0
- package/dist/web/server/_libs/mdast-util-gfm+[...].mjs +2060 -0
- package/dist/web/server/_libs/mdast-util-to-hast+[...].mjs +1770 -0
- package/dist/web/server/_libs/micromark-extension-gfm+[...].mjs +2235 -0
- package/dist/web/server/_libs/nanoid.mjs +26 -0
- package/dist/web/server/_libs/next-themes.mjs +124 -0
- package/dist/web/server/_libs/prop-types.mjs +69 -0
- package/dist/web/server/_libs/radix-ui__number.mjs +6 -0
- package/dist/web/server/_libs/radix-ui__primitive.mjs +9 -0
- package/dist/web/server/_libs/radix-ui__react-collection.mjs +80 -0
- package/dist/web/server/_libs/radix-ui__react-direction.mjs +11 -0
- package/dist/web/server/_libs/radix-ui__react-label.mjs +23 -0
- package/dist/web/server/_libs/radix-ui__react-menubar.mjs +400 -0
- package/dist/web/server/_libs/radix-ui__react-popover.mjs +251 -0
- package/dist/web/server/_libs/radix-ui__react-progress.mjs +81 -0
- package/dist/web/server/_libs/radix-ui__react-scroll-area.mjs +669 -0
- package/dist/web/server/_libs/radix-ui__react-separator.mjs +32 -0
- package/dist/web/server/_libs/radix-ui__react-slider.mjs +464 -0
- package/dist/web/server/_libs/radix-ui__react-switch.mjs +120 -0
- package/dist/web/server/_libs/radix-ui__react-tabs.mjs +145 -0
- package/dist/web/server/_libs/radix-ui__react-tooltip.mjs +494 -0
- package/dist/web/server/_libs/react-day-picker.mjs +3510 -0
- package/dist/web/server/_libs/react-is.mjs +48 -0
- package/dist/web/server/_libs/react-resizable-panels.mjs +1517 -0
- package/dist/web/server/_libs/react-smooth.mjs +1024 -0
- package/dist/web/server/_libs/recharts+[...].mjs +12998 -0
- package/dist/web/server/_libs/rehype-harden.mjs +210 -0
- package/dist/web/server/_libs/rehype-raw.mjs +37 -0
- package/dist/web/server/_libs/rehype-sanitize.mjs +27 -0
- package/dist/web/server/_libs/remark-gfm.mjs +34 -0
- package/dist/web/server/_libs/remark-parse.mjs +37 -0
- package/dist/web/server/_libs/remark-rehype.mjs +169 -0
- package/dist/web/server/_libs/remend.mjs +544 -0
- package/dist/web/server/_libs/scule.mjs +55 -0
- package/dist/web/server/_libs/shiki+streamdown__code.mjs +1748 -0
- package/dist/web/server/_libs/shiki.mjs +16 -0
- package/dist/web/server/_libs/shikijs__engine-oniguruma.mjs +387 -0
- package/dist/web/server/_libs/shikijs__langs.mjs +1357 -0
- package/dist/web/server/_libs/shikijs__themes.mjs +268 -0
- package/dist/web/server/_libs/sonner.mjs +909 -0
- package/dist/web/server/_libs/streamdown+[...].mjs +5842 -0
- package/dist/web/server/_libs/tanstack__history.mjs +342 -0
- package/dist/web/server/_libs/tanstack__query-core.mjs +2073 -0
- package/dist/web/server/_libs/tanstack__react-query.mjs +146 -0
- package/dist/web/server/_libs/tanstack__router-core.mjs +6 -0
- package/dist/web/server/_libs/tanstack__zod-adapter.mjs +16 -0
- package/dist/web/server/_libs/ufo.mjs +64 -0
- package/dist/web/server/_libs/ungap__structured-clone.mjs +197 -0
- package/dist/web/server/_libs/use-stick-to-bottom.mjs +410 -0
- package/dist/web/server/_libs/vercel__oidc.mjs +393 -0
- package/dist/web/server/_libs/zhipu-ai-provider.mjs +13483 -0
- package/dist/web/server/_libs/zustand.mjs +48 -0
- package/dist/web/server/_runtime.mjs +35 -0
- package/dist/web/server/_ssr/components-BzCiScpA.mjs +1452 -0
- package/dist/web/server/_ssr/dist-3Mu7PF0n.mjs +137 -0
- package/dist/web/server/_ssr/dist-BRaLXgxZ.mjs +17 -0
- package/dist/web/server/_ssr/field-1-agM60DBf.mjs +167 -0
- package/dist/web/server/_ssr/get-providers-BoYkp0Of.mjs +40 -0
- package/dist/web/server/_ssr/initialize-provider-B6W8V5Eg.mjs +19 -0
- package/dist/web/server/_ssr/model-list-CDFjdz2P.mjs +60 -0
- package/dist/web/server/_ssr/router-BmmOCtJZ.mjs +168 -0
- package/dist/web/server/_ssr/routes-CvlpZK4Q.mjs +2630 -0
- package/dist/web/server/_ssr/schemas-DsZ5O3zp.mjs +67 -0
- package/dist/web/server/_ssr/send-message-DUT1vRvx.mjs +135 -0
- package/dist/web/server/_ssr/ssr.mjs +5253 -0
- package/dist/web/server/_ssr/start-rewezkfD.mjs +4 -0
- package/dist/web/server/_ssr/submit-key-CcCv6-yy.mjs +62 -0
- package/dist/web/server/_ssr/suggestions-B0Uc3p7F.mjs +38 -0
- package/dist/web/server/_ssr/use-providers-Bwqg2U3N.mjs +1554 -0
- package/dist/web/server/_tanstack-start-manifest_v-BMIvh4y6.mjs +60 -0
- package/dist/web/server/index.mjs +2531 -0
- package/dist/web/server/node_modules/tslib/modules/index.js +70 -0
- package/dist/web/server/node_modules/tslib/modules/package.json +3 -0
- package/dist/web/server/node_modules/tslib/package.json +47 -0
- package/dist/web/server/node_modules/tslib/tslib.js +484 -0
- package/package.json +32 -0
|
@@ -0,0 +1,780 @@
|
|
|
1
|
+
import { t as esm_default } from "./ungap__structured-clone.mjs";
|
|
2
|
+
import { i as position } from "./hast-util-raw+[...].mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js
|
|
4
|
+
/**
|
|
5
|
+
* @import {Schema} from 'hast-util-sanitize'
|
|
6
|
+
*/
|
|
7
|
+
var aria = [
|
|
8
|
+
"ariaDescribedBy",
|
|
9
|
+
"ariaLabel",
|
|
10
|
+
"ariaLabelledBy"
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* Default schema.
|
|
14
|
+
*
|
|
15
|
+
* Follows GitHub style sanitation.
|
|
16
|
+
*
|
|
17
|
+
* @type {Schema}
|
|
18
|
+
*/
|
|
19
|
+
var defaultSchema = {
|
|
20
|
+
ancestors: {
|
|
21
|
+
tbody: ["table"],
|
|
22
|
+
td: ["table"],
|
|
23
|
+
th: ["table"],
|
|
24
|
+
thead: ["table"],
|
|
25
|
+
tfoot: ["table"],
|
|
26
|
+
tr: ["table"]
|
|
27
|
+
},
|
|
28
|
+
attributes: {
|
|
29
|
+
a: [
|
|
30
|
+
...aria,
|
|
31
|
+
"dataFootnoteBackref",
|
|
32
|
+
"dataFootnoteRef",
|
|
33
|
+
["className", "data-footnote-backref"],
|
|
34
|
+
"href"
|
|
35
|
+
],
|
|
36
|
+
blockquote: ["cite"],
|
|
37
|
+
code: [["className", /^language-./]],
|
|
38
|
+
del: ["cite"],
|
|
39
|
+
div: ["itemScope", "itemType"],
|
|
40
|
+
dl: [...aria],
|
|
41
|
+
h2: [["className", "sr-only"]],
|
|
42
|
+
img: [
|
|
43
|
+
...aria,
|
|
44
|
+
"longDesc",
|
|
45
|
+
"src"
|
|
46
|
+
],
|
|
47
|
+
input: [["disabled", true], ["type", "checkbox"]],
|
|
48
|
+
ins: ["cite"],
|
|
49
|
+
li: [["className", "task-list-item"]],
|
|
50
|
+
ol: [...aria, ["className", "contains-task-list"]],
|
|
51
|
+
q: ["cite"],
|
|
52
|
+
section: ["dataFootnotes", ["className", "footnotes"]],
|
|
53
|
+
source: ["srcSet"],
|
|
54
|
+
summary: [...aria],
|
|
55
|
+
table: [...aria],
|
|
56
|
+
ul: [...aria, ["className", "contains-task-list"]],
|
|
57
|
+
"*": [
|
|
58
|
+
"abbr",
|
|
59
|
+
"accept",
|
|
60
|
+
"acceptCharset",
|
|
61
|
+
"accessKey",
|
|
62
|
+
"action",
|
|
63
|
+
"align",
|
|
64
|
+
"alt",
|
|
65
|
+
"axis",
|
|
66
|
+
"border",
|
|
67
|
+
"cellPadding",
|
|
68
|
+
"cellSpacing",
|
|
69
|
+
"char",
|
|
70
|
+
"charOff",
|
|
71
|
+
"charSet",
|
|
72
|
+
"checked",
|
|
73
|
+
"clear",
|
|
74
|
+
"colSpan",
|
|
75
|
+
"color",
|
|
76
|
+
"cols",
|
|
77
|
+
"compact",
|
|
78
|
+
"coords",
|
|
79
|
+
"dateTime",
|
|
80
|
+
"dir",
|
|
81
|
+
"encType",
|
|
82
|
+
"frame",
|
|
83
|
+
"hSpace",
|
|
84
|
+
"headers",
|
|
85
|
+
"height",
|
|
86
|
+
"hrefLang",
|
|
87
|
+
"htmlFor",
|
|
88
|
+
"id",
|
|
89
|
+
"isMap",
|
|
90
|
+
"itemProp",
|
|
91
|
+
"label",
|
|
92
|
+
"lang",
|
|
93
|
+
"maxLength",
|
|
94
|
+
"media",
|
|
95
|
+
"method",
|
|
96
|
+
"multiple",
|
|
97
|
+
"name",
|
|
98
|
+
"noHref",
|
|
99
|
+
"noShade",
|
|
100
|
+
"noWrap",
|
|
101
|
+
"open",
|
|
102
|
+
"prompt",
|
|
103
|
+
"readOnly",
|
|
104
|
+
"rev",
|
|
105
|
+
"rowSpan",
|
|
106
|
+
"rows",
|
|
107
|
+
"rules",
|
|
108
|
+
"scope",
|
|
109
|
+
"selected",
|
|
110
|
+
"shape",
|
|
111
|
+
"size",
|
|
112
|
+
"span",
|
|
113
|
+
"start",
|
|
114
|
+
"summary",
|
|
115
|
+
"tabIndex",
|
|
116
|
+
"title",
|
|
117
|
+
"useMap",
|
|
118
|
+
"vAlign",
|
|
119
|
+
"value",
|
|
120
|
+
"width"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
clobber: [
|
|
124
|
+
"ariaDescribedBy",
|
|
125
|
+
"ariaLabelledBy",
|
|
126
|
+
"id",
|
|
127
|
+
"name"
|
|
128
|
+
],
|
|
129
|
+
clobberPrefix: "user-content-",
|
|
130
|
+
protocols: {
|
|
131
|
+
cite: ["http", "https"],
|
|
132
|
+
href: [
|
|
133
|
+
"http",
|
|
134
|
+
"https",
|
|
135
|
+
"irc",
|
|
136
|
+
"ircs",
|
|
137
|
+
"mailto",
|
|
138
|
+
"xmpp"
|
|
139
|
+
],
|
|
140
|
+
longDesc: ["http", "https"],
|
|
141
|
+
src: ["http", "https"]
|
|
142
|
+
},
|
|
143
|
+
required: { input: {
|
|
144
|
+
disabled: true,
|
|
145
|
+
type: "checkbox"
|
|
146
|
+
} },
|
|
147
|
+
strip: ["script"],
|
|
148
|
+
tagNames: [
|
|
149
|
+
"a",
|
|
150
|
+
"b",
|
|
151
|
+
"blockquote",
|
|
152
|
+
"br",
|
|
153
|
+
"code",
|
|
154
|
+
"dd",
|
|
155
|
+
"del",
|
|
156
|
+
"details",
|
|
157
|
+
"div",
|
|
158
|
+
"dl",
|
|
159
|
+
"dt",
|
|
160
|
+
"em",
|
|
161
|
+
"h1",
|
|
162
|
+
"h2",
|
|
163
|
+
"h3",
|
|
164
|
+
"h4",
|
|
165
|
+
"h5",
|
|
166
|
+
"h6",
|
|
167
|
+
"hr",
|
|
168
|
+
"i",
|
|
169
|
+
"img",
|
|
170
|
+
"input",
|
|
171
|
+
"ins",
|
|
172
|
+
"kbd",
|
|
173
|
+
"li",
|
|
174
|
+
"ol",
|
|
175
|
+
"p",
|
|
176
|
+
"picture",
|
|
177
|
+
"pre",
|
|
178
|
+
"q",
|
|
179
|
+
"rp",
|
|
180
|
+
"rt",
|
|
181
|
+
"ruby",
|
|
182
|
+
"s",
|
|
183
|
+
"samp",
|
|
184
|
+
"section",
|
|
185
|
+
"source",
|
|
186
|
+
"span",
|
|
187
|
+
"strike",
|
|
188
|
+
"strong",
|
|
189
|
+
"sub",
|
|
190
|
+
"summary",
|
|
191
|
+
"sup",
|
|
192
|
+
"table",
|
|
193
|
+
"tbody",
|
|
194
|
+
"td",
|
|
195
|
+
"tfoot",
|
|
196
|
+
"th",
|
|
197
|
+
"thead",
|
|
198
|
+
"tr",
|
|
199
|
+
"tt",
|
|
200
|
+
"ul",
|
|
201
|
+
"var"
|
|
202
|
+
]
|
|
203
|
+
};
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region ../../node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.js
|
|
206
|
+
/**
|
|
207
|
+
* @import {
|
|
208
|
+
* Comment,
|
|
209
|
+
* Doctype,
|
|
210
|
+
* ElementContent,
|
|
211
|
+
* Element,
|
|
212
|
+
* Nodes,
|
|
213
|
+
* Properties,
|
|
214
|
+
* RootContent,
|
|
215
|
+
* Root,
|
|
216
|
+
* Text
|
|
217
|
+
* } from 'hast'
|
|
218
|
+
*/
|
|
219
|
+
/**
|
|
220
|
+
* @typedef {[string, ...Array<Exclude<Properties[keyof Properties], Array<any>> | RegExp>] | string} PropertyDefinition
|
|
221
|
+
* Definition for a property.
|
|
222
|
+
*
|
|
223
|
+
* @typedef Schema
|
|
224
|
+
* Schema that defines what nodes and properties are allowed.
|
|
225
|
+
*
|
|
226
|
+
* The default schema is `defaultSchema`, which follows how GitHub cleans.
|
|
227
|
+
* If any top-level key is missing in the given schema, the corresponding
|
|
228
|
+
* value of the default schema is used.
|
|
229
|
+
*
|
|
230
|
+
* To extend the standard schema with a few changes, clone `defaultSchema`
|
|
231
|
+
* like so:
|
|
232
|
+
*
|
|
233
|
+
* ```js
|
|
234
|
+
* import deepmerge from 'deepmerge'
|
|
235
|
+
* import {h} from 'hastscript'
|
|
236
|
+
* import {defaultSchema, sanitize} from 'hast-util-sanitize'
|
|
237
|
+
*
|
|
238
|
+
* // This allows `className` on all elements.
|
|
239
|
+
* const schema = deepmerge(defaultSchema, {attributes: {'*': ['className']}})
|
|
240
|
+
*
|
|
241
|
+
* const tree = sanitize(h('div', {className: ['foo']}), schema)
|
|
242
|
+
*
|
|
243
|
+
* // `tree` still has `className`.
|
|
244
|
+
* console.log(tree)
|
|
245
|
+
* // {
|
|
246
|
+
* // type: 'element',
|
|
247
|
+
* // tagName: 'div',
|
|
248
|
+
* // properties: {className: ['foo']},
|
|
249
|
+
* // children: []
|
|
250
|
+
* // }
|
|
251
|
+
* ```
|
|
252
|
+
* @property {boolean | null | undefined} [allowComments=false]
|
|
253
|
+
* Whether to allow comment nodes (default: `false`).
|
|
254
|
+
*
|
|
255
|
+
* For example:
|
|
256
|
+
*
|
|
257
|
+
* ```js
|
|
258
|
+
* allowComments: true
|
|
259
|
+
* ```
|
|
260
|
+
* @property {boolean | null | undefined} [allowDoctypes=false]
|
|
261
|
+
* Whether to allow doctype nodes (default: `false`).
|
|
262
|
+
*
|
|
263
|
+
* For example:
|
|
264
|
+
*
|
|
265
|
+
* ```js
|
|
266
|
+
* allowDoctypes: true
|
|
267
|
+
* ```
|
|
268
|
+
* @property {Record<string, Array<string>> | null | undefined} [ancestors]
|
|
269
|
+
* Map of tag names to a list of tag names which are required ancestors
|
|
270
|
+
* (default: `defaultSchema.ancestors`).
|
|
271
|
+
*
|
|
272
|
+
* Elements with these tag names will be ignored if they occur outside of one
|
|
273
|
+
* of their allowed parents.
|
|
274
|
+
*
|
|
275
|
+
* For example:
|
|
276
|
+
*
|
|
277
|
+
* ```js
|
|
278
|
+
* ancestors: {
|
|
279
|
+
* tbody: ['table'],
|
|
280
|
+
* // …
|
|
281
|
+
* tr: ['table']
|
|
282
|
+
* }
|
|
283
|
+
* ```
|
|
284
|
+
* @property {Record<string, Array<PropertyDefinition>> | null | undefined} [attributes]
|
|
285
|
+
* Map of tag names to allowed property names (default:
|
|
286
|
+
* `defaultSchema.attributes`).
|
|
287
|
+
*
|
|
288
|
+
* The special key `'*'` as a tag name defines property names allowed on all
|
|
289
|
+
* elements.
|
|
290
|
+
*
|
|
291
|
+
* The special value `'data*'` as a property name can be used to allow all
|
|
292
|
+
* `data` properties.
|
|
293
|
+
*
|
|
294
|
+
* For example:
|
|
295
|
+
*
|
|
296
|
+
* ```js
|
|
297
|
+
* attributes: {
|
|
298
|
+
* 'ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy', …, 'href'
|
|
299
|
+
* // …
|
|
300
|
+
* '*': [
|
|
301
|
+
* 'abbr',
|
|
302
|
+
* 'accept',
|
|
303
|
+
* 'acceptCharset',
|
|
304
|
+
* // …
|
|
305
|
+
* 'vAlign',
|
|
306
|
+
* 'value',
|
|
307
|
+
* 'width'
|
|
308
|
+
* ]
|
|
309
|
+
* }
|
|
310
|
+
* ```
|
|
311
|
+
*
|
|
312
|
+
* Instead of a single string in the array, which allows any property value
|
|
313
|
+
* for the field, you can use an array to allow several values.
|
|
314
|
+
* For example, `input: ['type']` allows `type` set to any value on `input`s.
|
|
315
|
+
* But `input: [['type', 'checkbox', 'radio']]` allows `type` when set to
|
|
316
|
+
* `'checkbox'` or `'radio'`.
|
|
317
|
+
*
|
|
318
|
+
* You can use regexes, so for example `span: [['className', /^hljs-/]]`
|
|
319
|
+
* allows any class that starts with `hljs-` on `span`s.
|
|
320
|
+
*
|
|
321
|
+
* When comma- or space-separated values are used (such as `className`), each
|
|
322
|
+
* value in is checked individually.
|
|
323
|
+
* For example, to allow certain classes on `span`s for syntax highlighting,
|
|
324
|
+
* use `span: [['className', 'number', 'operator', 'token']]`.
|
|
325
|
+
* This will allow `'number'`, `'operator'`, and `'token'` classes, but drop
|
|
326
|
+
* others.
|
|
327
|
+
* @property {Array<string> | null | undefined} [clobber]
|
|
328
|
+
* List of property names that clobber (default: `defaultSchema.clobber`).
|
|
329
|
+
*
|
|
330
|
+
* For example:
|
|
331
|
+
*
|
|
332
|
+
* ```js
|
|
333
|
+
* clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name']
|
|
334
|
+
* ```
|
|
335
|
+
* @property {string | null | undefined} [clobberPrefix]
|
|
336
|
+
* Prefix to use before clobbering properties (default:
|
|
337
|
+
* `defaultSchema.clobberPrefix`).
|
|
338
|
+
*
|
|
339
|
+
* For example:
|
|
340
|
+
*
|
|
341
|
+
* ```js
|
|
342
|
+
* clobberPrefix: 'user-content-'
|
|
343
|
+
* ```
|
|
344
|
+
* @property {Record<string, Array<string> | null | undefined> | null | undefined} [protocols]
|
|
345
|
+
* Map of *property names* to allowed protocols (default:
|
|
346
|
+
* `defaultSchema.protocols`).
|
|
347
|
+
*
|
|
348
|
+
* This defines URLs that are always allowed to have local URLs (relative to
|
|
349
|
+
* the current website, such as `this`, `#this`, `/this`, or `?this`), and
|
|
350
|
+
* only allowed to have remote URLs (such as `https://example.com`) if they
|
|
351
|
+
* use a known protocol.
|
|
352
|
+
*
|
|
353
|
+
* For example:
|
|
354
|
+
*
|
|
355
|
+
* ```js
|
|
356
|
+
* protocols: {
|
|
357
|
+
* cite: ['http', 'https'],
|
|
358
|
+
* // …
|
|
359
|
+
* src: ['http', 'https']
|
|
360
|
+
* }
|
|
361
|
+
* ```
|
|
362
|
+
* @property {Record<string, Record<string, Properties[keyof Properties]>> | null | undefined} [required]
|
|
363
|
+
* Map of tag names to required property names with a default value
|
|
364
|
+
* (default: `defaultSchema.required`).
|
|
365
|
+
*
|
|
366
|
+
* This defines properties that must be set.
|
|
367
|
+
* If a field does not exist (after the element was made safe), these will be
|
|
368
|
+
* added with the given value.
|
|
369
|
+
*
|
|
370
|
+
* For example:
|
|
371
|
+
*
|
|
372
|
+
* ```js
|
|
373
|
+
* required: {
|
|
374
|
+
* input: {disabled: true, type: 'checkbox'}
|
|
375
|
+
* }
|
|
376
|
+
* ```
|
|
377
|
+
*
|
|
378
|
+
* > 👉 **Note**: properties are first checked based on `schema.attributes`,
|
|
379
|
+
* > then on `schema.required`.
|
|
380
|
+
* > That means properties could be removed by `attributes` and then added
|
|
381
|
+
* > again with `required`.
|
|
382
|
+
* @property {Array<string> | null | undefined} [strip]
|
|
383
|
+
* List of tag names to strip from the tree (default: `defaultSchema.strip`).
|
|
384
|
+
*
|
|
385
|
+
* By default, unsafe elements (those not in `schema.tagNames`) are replaced
|
|
386
|
+
* by what they contain.
|
|
387
|
+
* This option can drop their contents.
|
|
388
|
+
*
|
|
389
|
+
* For example:
|
|
390
|
+
*
|
|
391
|
+
* ```js
|
|
392
|
+
* strip: ['script']
|
|
393
|
+
* ```
|
|
394
|
+
* @property {Array<string> | null | undefined} [tagNames]
|
|
395
|
+
* List of allowed tag names (default: `defaultSchema.tagNames`).
|
|
396
|
+
*
|
|
397
|
+
* For example:
|
|
398
|
+
*
|
|
399
|
+
* ```js
|
|
400
|
+
* tagNames: [
|
|
401
|
+
* 'a',
|
|
402
|
+
* 'b',
|
|
403
|
+
* // …
|
|
404
|
+
* 'ul',
|
|
405
|
+
* 'var'
|
|
406
|
+
* ]
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* @typedef State
|
|
410
|
+
* Info passed around.
|
|
411
|
+
* @property {Readonly<Schema>} schema
|
|
412
|
+
* Schema.
|
|
413
|
+
* @property {Array<string>} stack
|
|
414
|
+
* Tag names of ancestors.
|
|
415
|
+
*/
|
|
416
|
+
var own = {}.hasOwnProperty;
|
|
417
|
+
/**
|
|
418
|
+
* Sanitize a tree.
|
|
419
|
+
*
|
|
420
|
+
* @param {Readonly<Nodes>} node
|
|
421
|
+
* Unsafe tree.
|
|
422
|
+
* @param {Readonly<Schema> | null | undefined} [options]
|
|
423
|
+
* Configuration (default: `defaultSchema`).
|
|
424
|
+
* @returns {Nodes}
|
|
425
|
+
* New, safe tree.
|
|
426
|
+
*/
|
|
427
|
+
function sanitize(node, options) {
|
|
428
|
+
/** @type {Nodes} */
|
|
429
|
+
let result = {
|
|
430
|
+
type: "root",
|
|
431
|
+
children: []
|
|
432
|
+
};
|
|
433
|
+
const replace = transform({
|
|
434
|
+
schema: options ? {
|
|
435
|
+
...defaultSchema,
|
|
436
|
+
...options
|
|
437
|
+
} : defaultSchema,
|
|
438
|
+
stack: []
|
|
439
|
+
}, node);
|
|
440
|
+
if (replace) if (Array.isArray(replace)) if (replace.length === 1) result = replace[0];
|
|
441
|
+
else result.children = replace;
|
|
442
|
+
else result = replace;
|
|
443
|
+
return result;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Sanitize `node`.
|
|
447
|
+
*
|
|
448
|
+
* @param {State} state
|
|
449
|
+
* Info passed around.
|
|
450
|
+
* @param {Readonly<unknown>} node
|
|
451
|
+
* Unsafe node.
|
|
452
|
+
* @returns {Array<ElementContent> | Nodes | undefined}
|
|
453
|
+
* Safe result.
|
|
454
|
+
*/
|
|
455
|
+
function transform(state, node) {
|
|
456
|
+
if (node && typeof node === "object") {
|
|
457
|
+
const unsafe = node;
|
|
458
|
+
switch (typeof unsafe.type === "string" ? unsafe.type : "") {
|
|
459
|
+
case "comment": return comment(state, unsafe);
|
|
460
|
+
case "doctype": return doctype(state, unsafe);
|
|
461
|
+
case "element": return element(state, unsafe);
|
|
462
|
+
case "root": return root(state, unsafe);
|
|
463
|
+
case "text": return text(state, unsafe);
|
|
464
|
+
default:
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Make a safe comment.
|
|
470
|
+
*
|
|
471
|
+
* @param {State} state
|
|
472
|
+
* Info passed around.
|
|
473
|
+
* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
|
|
474
|
+
* Unsafe comment-like value.
|
|
475
|
+
* @returns {Comment | undefined}
|
|
476
|
+
* Safe comment (if with `allowComments`).
|
|
477
|
+
*/
|
|
478
|
+
function comment(state, unsafe) {
|
|
479
|
+
if (state.schema.allowComments) {
|
|
480
|
+
const result = typeof unsafe.value === "string" ? unsafe.value : "";
|
|
481
|
+
const index = result.indexOf("-->");
|
|
482
|
+
/** @type {Comment} */
|
|
483
|
+
const node = {
|
|
484
|
+
type: "comment",
|
|
485
|
+
value: index < 0 ? result : result.slice(0, index)
|
|
486
|
+
};
|
|
487
|
+
patch(node, unsafe);
|
|
488
|
+
return node;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Make a safe doctype.
|
|
493
|
+
*
|
|
494
|
+
* @param {State} state
|
|
495
|
+
* Info passed around.
|
|
496
|
+
* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
|
|
497
|
+
* Unsafe doctype-like value.
|
|
498
|
+
* @returns {Doctype | undefined}
|
|
499
|
+
* Safe doctype (if with `allowDoctypes`).
|
|
500
|
+
*/
|
|
501
|
+
function doctype(state, unsafe) {
|
|
502
|
+
if (state.schema.allowDoctypes) {
|
|
503
|
+
/** @type {Doctype} */
|
|
504
|
+
const node = { type: "doctype" };
|
|
505
|
+
patch(node, unsafe);
|
|
506
|
+
return node;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Make a safe element.
|
|
511
|
+
*
|
|
512
|
+
* @param {State} state
|
|
513
|
+
* Info passed around.
|
|
514
|
+
* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
|
|
515
|
+
* Unsafe element-like value.
|
|
516
|
+
* @returns {Array<ElementContent> | Element | undefined}
|
|
517
|
+
* Safe element.
|
|
518
|
+
*/
|
|
519
|
+
function element(state, unsafe) {
|
|
520
|
+
const name = typeof unsafe.tagName === "string" ? unsafe.tagName : "";
|
|
521
|
+
state.stack.push(name);
|
|
522
|
+
const content = children(state, unsafe.children);
|
|
523
|
+
const properties_ = properties(state, unsafe.properties);
|
|
524
|
+
state.stack.pop();
|
|
525
|
+
let safeElement = false;
|
|
526
|
+
if (name && name !== "*" && (!state.schema.tagNames || state.schema.tagNames.includes(name))) {
|
|
527
|
+
safeElement = true;
|
|
528
|
+
if (state.schema.ancestors && own.call(state.schema.ancestors, name)) {
|
|
529
|
+
const ancestors = state.schema.ancestors[name];
|
|
530
|
+
let index = -1;
|
|
531
|
+
safeElement = false;
|
|
532
|
+
while (++index < ancestors.length) if (state.stack.includes(ancestors[index])) safeElement = true;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
if (!safeElement) return state.schema.strip && !state.schema.strip.includes(name) ? content : void 0;
|
|
536
|
+
/** @type {Element} */
|
|
537
|
+
const node = {
|
|
538
|
+
type: "element",
|
|
539
|
+
tagName: name,
|
|
540
|
+
properties: properties_,
|
|
541
|
+
children: content
|
|
542
|
+
};
|
|
543
|
+
patch(node, unsafe);
|
|
544
|
+
return node;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Make a safe root.
|
|
548
|
+
*
|
|
549
|
+
* @param {State} state
|
|
550
|
+
* Info passed around.
|
|
551
|
+
* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
|
|
552
|
+
* Unsafe root-like value.
|
|
553
|
+
* @returns {Root}
|
|
554
|
+
* Safe root.
|
|
555
|
+
*/
|
|
556
|
+
function root(state, unsafe) {
|
|
557
|
+
/** @type {Root} */
|
|
558
|
+
const node = {
|
|
559
|
+
type: "root",
|
|
560
|
+
children: children(state, unsafe.children)
|
|
561
|
+
};
|
|
562
|
+
patch(node, unsafe);
|
|
563
|
+
return node;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Make a safe text.
|
|
567
|
+
*
|
|
568
|
+
* @param {State} _
|
|
569
|
+
* Info passed around.
|
|
570
|
+
* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
|
|
571
|
+
* Unsafe text-like value.
|
|
572
|
+
* @returns {Text}
|
|
573
|
+
* Safe text.
|
|
574
|
+
*/
|
|
575
|
+
function text(_, unsafe) {
|
|
576
|
+
/** @type {Text} */
|
|
577
|
+
const node = {
|
|
578
|
+
type: "text",
|
|
579
|
+
value: typeof unsafe.value === "string" ? unsafe.value : ""
|
|
580
|
+
};
|
|
581
|
+
patch(node, unsafe);
|
|
582
|
+
return node;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Make children safe.
|
|
586
|
+
*
|
|
587
|
+
* @param {State} state
|
|
588
|
+
* Info passed around.
|
|
589
|
+
* @param {Readonly<unknown>} children
|
|
590
|
+
* Unsafe value.
|
|
591
|
+
* @returns {Array<Nodes>}
|
|
592
|
+
* Safe children.
|
|
593
|
+
*/
|
|
594
|
+
function children(state, children) {
|
|
595
|
+
/** @type {Array<Nodes>} */
|
|
596
|
+
const results = [];
|
|
597
|
+
if (Array.isArray(children)) {
|
|
598
|
+
const childrenUnknown = children;
|
|
599
|
+
let index = -1;
|
|
600
|
+
while (++index < childrenUnknown.length) {
|
|
601
|
+
const value = transform(state, childrenUnknown[index]);
|
|
602
|
+
if (value) if (Array.isArray(value)) results.push(...value);
|
|
603
|
+
else results.push(value);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return results;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Make element properties safe.
|
|
610
|
+
*
|
|
611
|
+
* @param {State} state
|
|
612
|
+
* Info passed around.
|
|
613
|
+
* @param {Readonly<unknown>} properties
|
|
614
|
+
* Unsafe value.
|
|
615
|
+
* @returns {Properties}
|
|
616
|
+
* Safe value.
|
|
617
|
+
*/
|
|
618
|
+
function properties(state, properties) {
|
|
619
|
+
const tagName = state.stack[state.stack.length - 1];
|
|
620
|
+
const attributes = state.schema.attributes;
|
|
621
|
+
const required = state.schema.required;
|
|
622
|
+
const specific = attributes && own.call(attributes, tagName) ? attributes[tagName] : void 0;
|
|
623
|
+
const defaults = attributes && own.call(attributes, "*") ? attributes["*"] : void 0;
|
|
624
|
+
const properties_ = properties && typeof properties === "object" ? properties : {};
|
|
625
|
+
/** @type {Properties} */
|
|
626
|
+
const result = {};
|
|
627
|
+
/** @type {string} */
|
|
628
|
+
let key;
|
|
629
|
+
for (key in properties_) if (own.call(properties_, key)) {
|
|
630
|
+
const unsafe = properties_[key];
|
|
631
|
+
let safe = propertyValue(state, findDefinition(specific, key), key, unsafe);
|
|
632
|
+
if (safe === null || safe === void 0) safe = propertyValue(state, findDefinition(defaults, key), key, unsafe);
|
|
633
|
+
if (safe !== null && safe !== void 0) result[key] = safe;
|
|
634
|
+
}
|
|
635
|
+
if (required && own.call(required, tagName)) {
|
|
636
|
+
const properties = required[tagName];
|
|
637
|
+
for (key in properties) if (own.call(properties, key) && !own.call(result, key)) result[key] = properties[key];
|
|
638
|
+
}
|
|
639
|
+
return result;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Sanitize a property value.
|
|
643
|
+
*
|
|
644
|
+
* @param {State} state
|
|
645
|
+
* Info passed around.
|
|
646
|
+
* @param {Readonly<PropertyDefinition> | undefined} definition
|
|
647
|
+
* Definition.
|
|
648
|
+
* @param {string} key
|
|
649
|
+
* Field name.
|
|
650
|
+
* @param {Readonly<unknown>} value
|
|
651
|
+
* Unsafe value (but an array).
|
|
652
|
+
* @returns {Array<number | string> | boolean | number | string | undefined}
|
|
653
|
+
* Safe value.
|
|
654
|
+
*/
|
|
655
|
+
function propertyValue(state, definition, key, value) {
|
|
656
|
+
return definition ? Array.isArray(value) ? propertyValueMany(state, definition, key, value) : propertyValuePrimitive(state, definition, key, value) : void 0;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Sanitize a property value which is a list.
|
|
660
|
+
*
|
|
661
|
+
* @param {State} state
|
|
662
|
+
* Info passed around.
|
|
663
|
+
* @param {Readonly<PropertyDefinition>} definition
|
|
664
|
+
* Definition.
|
|
665
|
+
* @param {string} key
|
|
666
|
+
* Field name.
|
|
667
|
+
* @param {Readonly<Array<Readonly<unknown>>>} values
|
|
668
|
+
* Unsafe value (but an array).
|
|
669
|
+
* @returns {Array<number | string>}
|
|
670
|
+
* Safe value.
|
|
671
|
+
*/
|
|
672
|
+
function propertyValueMany(state, definition, key, values) {
|
|
673
|
+
let index = -1;
|
|
674
|
+
/** @type {Array<number | string>} */
|
|
675
|
+
const result = [];
|
|
676
|
+
while (++index < values.length) {
|
|
677
|
+
const value = propertyValuePrimitive(state, definition, key, values[index]);
|
|
678
|
+
if (typeof value === "number" || typeof value === "string") result.push(value);
|
|
679
|
+
}
|
|
680
|
+
return result;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Sanitize a property value which is a primitive.
|
|
684
|
+
*
|
|
685
|
+
* @param {State} state
|
|
686
|
+
* Info passed around.
|
|
687
|
+
* @param {Readonly<PropertyDefinition>} definition
|
|
688
|
+
* Definition.
|
|
689
|
+
* @param {string} key
|
|
690
|
+
* Field name.
|
|
691
|
+
* @param {Readonly<unknown>} value
|
|
692
|
+
* Unsafe value (but not an array).
|
|
693
|
+
* @returns {boolean | number | string | undefined}
|
|
694
|
+
* Safe value.
|
|
695
|
+
*/
|
|
696
|
+
function propertyValuePrimitive(state, definition, key, value) {
|
|
697
|
+
if (typeof value !== "boolean" && typeof value !== "number" && typeof value !== "string") return;
|
|
698
|
+
if (!safeProtocol(state, key, value)) return;
|
|
699
|
+
if (typeof definition === "object" && definition.length > 1) {
|
|
700
|
+
let ok = false;
|
|
701
|
+
let index = 0;
|
|
702
|
+
while (++index < definition.length) {
|
|
703
|
+
const allowed = definition[index];
|
|
704
|
+
if (allowed && typeof allowed === "object" && "flags" in allowed) {
|
|
705
|
+
if (allowed.test(String(value))) {
|
|
706
|
+
ok = true;
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
} else if (allowed === value) {
|
|
710
|
+
ok = true;
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if (!ok) return;
|
|
715
|
+
}
|
|
716
|
+
return state.schema.clobber && state.schema.clobberPrefix && state.schema.clobber.includes(key) ? state.schema.clobberPrefix + value : value;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Check whether `value` is a safe URL.
|
|
720
|
+
*
|
|
721
|
+
* @param {State} state
|
|
722
|
+
* Info passed around.
|
|
723
|
+
* @param {string} key
|
|
724
|
+
* Field name.
|
|
725
|
+
* @param {Readonly<unknown>} value
|
|
726
|
+
* Unsafe value.
|
|
727
|
+
* @returns {boolean}
|
|
728
|
+
* Whether it’s a safe value.
|
|
729
|
+
*/
|
|
730
|
+
function safeProtocol(state, key, value) {
|
|
731
|
+
const protocols = state.schema.protocols && own.call(state.schema.protocols, key) ? state.schema.protocols[key] : void 0;
|
|
732
|
+
if (!protocols || protocols.length === 0) return true;
|
|
733
|
+
const url = String(value);
|
|
734
|
+
const colon = url.indexOf(":");
|
|
735
|
+
const questionMark = url.indexOf("?");
|
|
736
|
+
const numberSign = url.indexOf("#");
|
|
737
|
+
const slash = url.indexOf("/");
|
|
738
|
+
if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign) return true;
|
|
739
|
+
let index = -1;
|
|
740
|
+
while (++index < protocols.length) {
|
|
741
|
+
const protocol = protocols[index];
|
|
742
|
+
if (colon === protocol.length && url.slice(0, protocol.length) === protocol) return true;
|
|
743
|
+
}
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Add data and position.
|
|
748
|
+
*
|
|
749
|
+
* @param {Nodes} node
|
|
750
|
+
* Node to patch safe data and position on.
|
|
751
|
+
* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe
|
|
752
|
+
* Unsafe node-like value.
|
|
753
|
+
* @returns {undefined}
|
|
754
|
+
* Nothing.
|
|
755
|
+
*/
|
|
756
|
+
function patch(node, unsafe) {
|
|
757
|
+
const cleanPosition = position(unsafe);
|
|
758
|
+
if (unsafe.data) node.data = esm_default(unsafe.data);
|
|
759
|
+
if (cleanPosition) node.position = cleanPosition;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
*
|
|
763
|
+
* @param {Readonly<Array<PropertyDefinition>> | undefined} definitions
|
|
764
|
+
* @param {string} key
|
|
765
|
+
* @returns {Readonly<PropertyDefinition> | undefined}
|
|
766
|
+
*/
|
|
767
|
+
function findDefinition(definitions, key) {
|
|
768
|
+
/** @type {PropertyDefinition | undefined} */
|
|
769
|
+
let dataDefault;
|
|
770
|
+
let index = -1;
|
|
771
|
+
if (definitions) while (++index < definitions.length) {
|
|
772
|
+
const entry = definitions[index];
|
|
773
|
+
const name = typeof entry === "string" ? entry : entry[0];
|
|
774
|
+
if (name === key) return entry;
|
|
775
|
+
if (name === "data*") dataDefault = entry;
|
|
776
|
+
}
|
|
777
|
+
if (key.length > 4 && key.slice(0, 4).toLowerCase() === "data") return dataDefault;
|
|
778
|
+
}
|
|
779
|
+
//#endregion
|
|
780
|
+
export { defaultSchema as n, sanitize as t };
|